/* -*- 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 .
*/ #pragma once
struct ScQueryParam; class ScDPObject; class ScDocument; struct ScInterpreterContext;
enumclass SvNumFormatType : sal_Int16;
/** * This class represents the cached data part of the datapilot cache table * implementation.
*/ class ScDPCache
{ public: typedef std::unordered_set<OUString> StringSetType; typedef mdds::flat_segment_tree<SCROW, bool> EmptyRowsType; typedef std::vector<ScDPItemData> ScDPItemDataVec; typedef o3tl::sorted_vector<ScDPObject*> ScDPObjectSet; typedef std::vector<SCROW> IndexArrayType;
struct Field
{ /** * Optional items for grouped field.
*/
std::unique_ptr<GroupItems> mpGroup;
/** * Unique values in the field, stored in ascending order.
*/
ScDPItemDataVec maItems;
/** * Original source data represented as indices to the unique value * list. The order of the data is as they appear in the original * data source.
*/
IndexArrayType maData;
FieldsType maFields;
GroupFieldsType maGroupFields;
std::vector<StringSetType> maStringPools; // one for each field.
std::vector<OUString> maLabelNames; // Stores dimension names and the data layout dimension name at position 0.
EmptyRowsType maEmptyRows;
SCROW mnDataSize;
SCROW mnRowCount;
/** * Return a group type identifier. The values correspond with * css::sheet::DataPilotFieldGroupBy constant values. * * @param nDim 0-based dimension index. * * @return group type identifier, or 0 on failure.
*/
SC_DLLPUBLIC sal_Int32 GetGroupType(tools::Long nDim) const;
/** * Row count is the number of records plus any trailing empty rows in case * the source data is sheet and contains trailing empty rows.
*/
SCROW GetRowCount() const;
/** * Data size is the number of records without any trailing empty rows for * sheet source data. For any other source type, this should equal the * row count.
*/
SC_DLLPUBLIC SCROW GetDataSize() const;
SCROW GetItemDataId( sal_uInt16 nDim, SCROW nRow, bool bRepeatIfEmpty ) const;
SC_DLLPUBLIC const OUString & GetDimensionName(std::vector<OUString>::size_type nDim) const; bool IsRowEmpty(SCROW nRow) const; bool ValidQuery(SCROW nRow, const ScQueryParam& rQueryParam) const;
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.