/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
class ScDocument; struct ScSortParam; struct ScQueryParam; struct ScSubTotalParam;
/** Enum used to indicate which portion of the DBArea is to be considered. */ enumclass ScDBDataPortion
{
TOP_LEFT, ///< top left cell of area
AREA ///< entire area
};
/** Container base class to provide selected access for ScDBData. */ class ScDBDataContainerBase
{ public:
ScDBDataContainerBase( ScDocument& rDoc ) : mrDoc(rDoc) {} virtual ~ScDBDataContainerBase() {}
ScDocument& GetDocument() const;
ScRangeList& GetDirtyTableColumnNames();
class SAL_DLLPUBLIC_RTTI ScDBData final : public SvtListener, public ScRefreshTimer
{ private:
std::unique_ptr<ScSortParam> mpSortParam;
std::unique_ptr<ScQueryParam> mpQueryParam;
std::unique_ptr<ScSubTotalParam> mpSubTotal;
std::unique_ptr<ScImportParam> mpImportParam;
/** Refresh/update the column names with the header row's cell contents. */
SC_DLLPUBLIC void RefreshTableColumnNames( ScDocument* pDoc );
/** Refresh/update the column names with the header row's cell contents
within the given range. */ void RefreshTableColumnNames( ScDocument& rDoc, const ScRange& rRange );
/** Finds the column named rName and returns the corresponding offset within the table. @returns -1 if not found.
XXX NOTE: there is no refresh of names or anything implemented yet, use this only during document load time.
*/
sal_Int32 GetColumnNameOffset( const OUString& rName ) const;
/** Returns table column name if nCol is within column range and name
is stored, else empty string. */ const OUString & GetTableColumnName( SCCOL nCol ) const;
/** Remember some more settings of ScSortParam, only to be called at
anonymous DB ranges as it at least overwrites bHasHeader. */ void UpdateFromSortParam( const ScSortParam& rSortParam );
/** Takes ownership of p and attempts to insert it into the collection. Deletes p if it could not be inserted, i.e. duplicate name. @return <TRUE/> if inserted, else <FALSE/>.
*/ bool insert(std::unique_ptr<ScDBData> p);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.