LibreOffice Module sc (master)  1
pivotcachebuffer.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #pragma once
21 
22 #include <com/sun/star/util/DateTime.hpp>
24 #include <oox/helper/refvector.hxx>
25 #include "workbookhelper.hxx"
26 
27 namespace oox { class AttributeList; }
28 namespace oox { class SequenceInputStream; }
29 
30 namespace com::sun::star {
31  namespace sheet { class XDataPilotField; }
32 }
33 
34 namespace oox::core { class Relations; }
35 
36 class ScDPSaveDimension;
37 class ScDPObject;
38 class DateTime;
39 
40 namespace oox::xls {
41 
43 
44 typedef ::std::pair< sal_Int32, OUString > IdCaptionPair;
45 typedef ::std::vector< IdCaptionPair > IdCaptionPairList;
46 
48 {
49 public:
50  explicit PivotCacheItem();
51 
53  void readString( const AttributeList& rAttribs );
55  void readNumeric( const AttributeList& rAttribs );
57  void readDate( const AttributeList& rAttribs );
59  void readBool( const AttributeList& rAttribs );
61  void readError( const AttributeList& rAttribs );
63  void readIndex( const AttributeList& rAttribs );
64 
68  void readDouble( SequenceInputStream& rStrm );
70  void readDate( SequenceInputStream& rStrm );
72  void readBool( SequenceInputStream& rStrm );
74  void readError( SequenceInputStream& rStrm );
76  void readIndex( SequenceInputStream& rStrm );
77 
79  sal_Int32 getType() const { return mnType; }
81  const css::uno::Any& getValue() const { return maValue; }
83  OUString getName() const;
84 
86  OUString getFormattedName(const ScDPSaveDimension& rSaveDim, ScDPObject* pObj, const DateTime& rNullDate) const;
88  bool isUnused() const { return mbUnused; }
89 
90 private:
91 friend class PivotCacheItemList;
92  // #FIXME hack Sets the value of this item to the given string ( and overwrites type if necessary
93  void setStringValue( const OUString& sName );
94  css::uno::Any maValue;
95  sal_Int32 mnType;
96  bool mbUnused;
97 };
98 
100 {
101 public:
102  explicit PivotCacheItemList( const WorkbookHelper& rHelper );
103 
105  void importItem( sal_Int32 nElement, const AttributeList& rAttribs );
107  void importItem( sal_Int32 nRecId, SequenceInputStream& rStrm );
108 
110  bool empty() const { return maItems.empty(); }
112  size_t size() const { return maItems.size(); }
113 
115  const PivotCacheItem* getCacheItem( sal_Int32 nItemIdx ) const;
117  void getCacheItemNames( ::std::vector< OUString >& orItemNames ) const;
118  void applyItemCaptions( const IdCaptionPairList& vCaptions );
119 
120 private:
124  void importArray( SequenceInputStream& rStrm );
125 
126 private:
127  std::vector< PivotCacheItem > maItems;
128 };
129 
131 {
132  OUString maName;
133  OUString maCaption;
134  OUString maPropertyName;
135  OUString maFormula;
136  sal_Int32 mnNumFmtId;
137  sal_Int32 mnSqlType;
138  sal_Int32 mnHierarchy;
139  sal_Int32 mnLevel;
140  sal_Int32 mnMappingCount;
145 
146  explicit PCFieldModel();
147 };
148 
150 {
153  bool mbHasDate;
154  bool mbHasString;
155  bool mbHasBlank;
156  bool mbHasMixed;
157  bool mbIsNumeric;
158  bool mbIsInteger;
160 
161  explicit PCSharedItemsModel();
162 };
163 
165 {
166  css::util::DateTime maStartDate;
167  css::util::DateTime maEndDate;
168  double mfStartValue;
169  double mfEndValue;
170  double mfInterval;
171  sal_Int32 mnParentField;
172  sal_Int32 mnBaseField;
173  sal_Int32 mnGroupBy;
175  bool mbDateGroup;
176  bool mbAutoStart;
177  bool mbAutoEnd;
178  OUString msFinalGroupName ;
179 
180 
181  explicit PCFieldGroupModel();
182 
184  void setBiffGroupBy( sal_uInt8 nGroupBy );
185 };
186 
189 {
190  OUString maOrigName;
191  OUString maGroupName;
192 
193  explicit PivotCacheGroupItem( const OUString& rItemName ) :
194  maOrigName( rItemName ), maGroupName( rItemName ) {}
195 };
196 
197 typedef ::std::vector< PivotCacheGroupItem > PivotCacheGroupItemVector;
198 
200 {
201 public:
202  explicit PivotCacheField( const WorkbookHelper& rHelper, bool bIsDatabaseField );
203 
205  void importCacheField( const AttributeList& rAttribs );
207  void importSharedItems( const AttributeList& rAttribs );
209  void importSharedItem( sal_Int32 nElement, const AttributeList& rAttribs );
211  void importFieldGroup( const AttributeList& rAttribs );
213  void importRangePr( const AttributeList& rAttribs );
215  void importDiscretePrItem( sal_Int32 nElement, const AttributeList& rAttribs );
217  void importGroupItem( sal_Int32 nElement, const AttributeList& rAttribs );
218 
224  void importPCDFSharedItem( sal_Int32 nRecId, SequenceInputStream& rStrm );
228  void importPCDFRangePr( SequenceInputStream& rStrm );
230  void importPCDFDiscretePrItem( sal_Int32 nRecId, SequenceInputStream& rStrm );
232  void importPCDFGroupItem( sal_Int32 nRecId, SequenceInputStream& rStrm );
233 
235  void applyItemCaptions( const IdCaptionPairList& vCaptions );
236 
239 
241  bool hasSharedItems() const { return !maSharedItems.empty(); }
243  bool hasGroupItems() const { return !maGroupItems.empty(); }
249  bool hasParentGrouping() const { return maFieldGroupModel.mnParentField >= 0; }
250 
252  const OUString& getName() const { return maFieldModel.maName; }
256  sal_Int32 getGroupBaseField() const { return maFieldGroupModel.mnBaseField; }
258  const OUString& getFinalGroupName() const { return maFieldGroupModel.msFinalGroupName; }
260  void setFinalGroupName(const OUString& rFinalGroupName) { maFieldGroupModel.msFinalGroupName = rFinalGroupName; }
261 
263  const PivotCacheItem* getCacheItem( sal_Int32 nItemIdx ) const;
265  void getCacheItemNames( ::std::vector< OUString >& orItemNames ) const;
267  const PivotCacheItemList& getCacheItems() const;
268 
271  const css::uno::Reference< css::sheet::XDataPilotField >& rxDPField ) const;
273  OUString createDateGroupField(
274  const css::uno::Reference< css::sheet::XDataPilotField >& rxBaseDPField ) const;
276  OUString createParentGroupField(
277  const css::uno::Reference< css::sheet::XDataPilotField >& rxBaseDPField,
278  const PivotCacheField& rBaseCacheField,
279  PivotCacheGroupItemVector& orItemNames ) const;
280 
282  void writeSourceHeaderCell( const WorksheetHelper& rSheetHelper,
283  sal_Int32 nCol, sal_Int32 nRow ) const;
285  void writeSourceDataCell( const WorksheetHelper& rSheetHelper,
286  sal_Int32 nCol, sal_Int32 nRow,
287  const PivotCacheItem& rItem ) const;
288 
291  const WorksheetHelper& rSheetHelper, sal_Int32 nCol, sal_Int32 nRow ) const;
292 
293 private:
295  static void writeItemToSourceDataCell( const WorksheetHelper& rSheetHelper,
296  sal_Int32 nCol, sal_Int32 nRow, const PivotCacheItem& rItem );
298  void writeSharedItemToSourceDataCell( const WorksheetHelper& rSheetHelper,
299  sal_Int32 nCol, sal_Int32 nRow, sal_Int32 nItemIdx ) const;
300 
301 private:
302  typedef ::std::vector< sal_Int32 > IndexVector;
303 
306  IndexVector maDiscreteItems;
310 };
311 
313 {
314  OUString maRelId;
315  OUString maRefreshedBy;
317  sal_Int32 mnRecords;
318  sal_Int32 mnMissItemsLimit;
319  bool mbInvalid;
320  bool mbSaveData;
329 
330  explicit PCDefinitionModel();
331 };
332 
334 {
335  sal_Int32 mnSourceType;
336  sal_Int32 mnConnectionId;
337 
338  explicit PCSourceModel();
339 };
340 
342 {
343  OUString maRelId;
344  OUString maSheet;
345  OUString maDefName;
347 
348  explicit PCWorksheetSourceModel();
349 };
350 
352 {
353 public:
354  explicit PivotCache( const WorkbookHelper& rHelper );
355 
357  void importPivotCacheDefinition( const AttributeList& rAttribs );
359  void importCacheSource( const AttributeList& rAttribs );
361  void importWorksheetSource( const AttributeList& rAttribs, const ::oox::core::Relations& rRelations );
362 
366  void importPCDSource( SequenceInputStream& rStrm );
368  void importPCDSheetSource( SequenceInputStream& rStrm, const ::oox::core::Relations& rRelations );
369 
373  void finalizeImport();
374 
377  bool isValidDataSource() const { return mbValidSource; }
379  bool isBasedOnDummySheet() const { return mbDummySheet; }
381  const ScRange&
384  const OUString& getRecordsRelId() const { return maDefModel.maRelId; }
385 
387  PivotCacheField* getCacheField( sal_Int32 nFieldIdx );
388  const PivotCacheField* getCacheField( sal_Int32 nFieldIdx ) const;
390  sal_Int32 getCacheDatabaseIndex( sal_Int32 nFieldIdx ) const;
391 
393  void writeSourceHeaderCells( const WorksheetHelper& rSheetHelper ) const;
395  void writeSourceDataCell( const WorksheetHelper& rSheetHelper,
396  sal_Int32 nColIdx, sal_Int32 nRowIdx,
397  const PivotCacheItem& rItem ) const;
398 
400  void importPCRecord( SequenceInputStream& rStrm,
401  const WorksheetHelper& rSheetHelper, sal_Int32 nRowIdx ) const;
402 
403 private:
404 
410  void prepareSourceDataSheet();
412  void updateSourceDataRow( const WorksheetHelper& rSheetHelper, sal_Int32 nRow ) const;
413 
414 private:
416  typedef ::std::vector< sal_Int32 > IndexVector;
417 
418  PivotCacheFieldVector maFields;
419  PivotCacheFieldVector maDatabaseFields;
420  IndexVector maDatabaseIndexes;
425  OUString maTargetUrl;
426  mutable sal_Int32 mnCurrRow;
429 };
430 
432 {
433 public:
434  explicit PivotCacheBuffer( const WorkbookHelper& rHelper );
435 
437  void registerPivotCacheFragment( sal_Int32 nCacheId, const OUString& rFragmentPath );
438 
441  PivotCache* importPivotCacheFragment( sal_Int32 nCacheId );
442 
443 private:
445  PivotCache& createPivotCache( sal_Int32 nCacheId );
446 
447 private:
448  typedef ::std::map< sal_Int32, OUString > FragmentPathMap;
450 
451  FragmentPathMap maFragmentPaths;
452  PivotCacheMap maCaches;
453  std::vector< sal_Int32 > maCacheIds;
454 };
455 
456 } // namespace oox::xls
457 
458 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Helper class to provide access to global workbook data.
void importDiscretePrItem(sal_Int32 nElement, const AttributeList &rAttribs)
Imports an item of the mapping between group items and base items from the passed element...
::std::vector< IdCaptionPair > IdCaptionPairList
void importPCDFGroupItem(sal_Int32 nRecId, SequenceInputStream &rStrm)
Imports one or more group items from the passed record.
const PivotCacheItem * getCacheItem(sal_Int32 nItemIdx) const
Returns the specified item.
bool mbBackgroundQuery
True = refreshing cache is enabled in UI.
OUString createParentGroupField(const css::uno::Reference< css::sheet::XDataPilotField > &rxBaseDPField, const PivotCacheField &rBaseCacheField, PivotCacheGroupItemVector &orItemNames) const
Creates a new grouped DataPilot field and returns its name.
bool hasSharedItems() const
Returns true, if the field contains a list of shared items.
bool mbServerField
True = field from source data; false = calculated field.
bool mbDummySheet
True = pivot cache is based on supported data source.
void setBiffGroupBy(sal_uInt8 nGroupBy)
Sets the group-by value for BIFF import.
void importSharedItems(const AttributeList &rAttribs)
Imports shared items settings from the sharedItems element.
void importPCDFSharedItems(SequenceInputStream &rStrm)
Imports shared items settings from the PCDFSHAREDITEMS record.
PCFieldModel maFieldModel
Mapping between group and base items.
bool mbEnableRefresh
True = application may optimize memory usage.
double mfRefreshedDate
Name of user who last refreshed the cache.
sal_Int32 mnMissItemsLimit
Number of data records in the cache.
css::util::DateTime maEndDate
Manual or calculated start date for range grouping.
const OUString & getFinalGroupName() const
Returns the finalized group name of this field.
void importPCDefinition(SequenceInputStream &rStrm)
Reads pivot cache global settings from the PCDEFINITION record.
bool mbHasLongText
True = has numeric item(s) with only integers, maybe other types except date.
const OUString & getRecordsRelId() const
Returns the relation identifier of the pivot cache records fragment.
void writeSourceDataCell(const WorksheetHelper &rSheetHelper, sal_Int32 nCol, sal_Int32 nRow, const PivotCacheItem &rItem) const
Writes a source field item value into the passed sheet.
PivotCacheFieldVector maDatabaseFields
All pivot cache fields.
PivotCacheField & createCacheField()
Creates and returns a new pivot cache field.
bool hasDateGrouping() const
Returns true, if the field has inplace date grouping settings.
void importPCDSource(SequenceInputStream &rStrm)
Reads cache source settings from the PCDSOURCE record.
IndexVector maDatabaseIndexes
All cache fields that are based on source data.
bool mbAutoStart
True = items are grouped by date ranges or by item names.
PCFieldModel()
True = contains OLAP member properties.
sal_Int32 mnNumFmtId
Formula of a calculated field.
PCDefinitionModel maDefModel
Database field index for all fields.
bool mbUniqueList
True = ODBC server-based page field.
const PivotCacheItem * getCacheItem(sal_Int32 nItemIdx) const
Returns the shared or group item with the specified index.
bool hasGroupItems() const
Returns true, if the field contains a list of grouping items.
std::vector< PivotCacheItem > maItems
void writeSourceDataCell(const WorksheetHelper &rSheetHelper, sal_Int32 nColIdx, sal_Int32 nRowIdx, const PivotCacheItem &rItem) const
Writes a source field item value into the passed sheet.
const ScRange & getSourceRange() const
Returns the internal cell range the cache is based on.
PCSharedItemsModel maSharedItemsModel
Settings for this cache field.
double mfEndValue
Manual or calculated start value for range grouping.
bool mbDatabaseField
Number of property mappings.
PivotCacheGroupItem(const OUString &rItemName)
OUString maDefName
Sheet name for cell range or sheet-local defined names.
void finalizeExternalSheetSource()
Finalizes the pivot cache if it is based on sheet data of an external spreadsheet document...
void writeSharedItemToSourceDataCell(const WorksheetHelper &rSheetHelper, sal_Int32 nCol, sal_Int32 nRow, sal_Int32 nItemIdx) const
Tries to write the value of a shared item to the passed sheet position.
PivotCacheItem & createItem()
Creates and returns a new item at the end of the items list.
void getCacheItemNames(::std::vector< OUString > &orItemNames) const
Returns the names of all items.
void registerPivotCacheFragment(sal_Int32 nCacheId, const OUString &rFragmentPath)
Registers a pivot cache definition fragment.
void importItem(sal_Int32 nElement, const AttributeList &rAttribs)
Imports the item from the passed attribute list.
void applyItemCaptions(const IdCaptionPairList &vCaptions)
exports com.sun.star. sheet
void importWorksheetSource(const AttributeList &rAttribs, const ::oox::core::Relations &rRelations)
Reads sheet source settings from the worksheetSource element.
sal_Int32 getCacheDatabaseIndex(sal_Int32 nFieldIdx) const
Returns the source column index of the field with the passed index.
sal_Int32 mnType
Value of the item.
void importGroupItem(sal_Int32 nElement, const AttributeList &rAttribs)
Imports a group item from the passed element.
bool mbSaveData
True = cache needs refresh.
::std::pair< sal_Int32, OUString > IdCaptionPair
static void writeItemToSourceDataCell(const WorksheetHelper &rSheetHelper, sal_Int32 nCol, sal_Int32 nRow, const PivotCacheItem &rItem)
Tries to write the passed value to the passed sheet position.
PivotCache(const WorkbookHelper &rHelper)
bool mbAutoEnd
True = start value for range groups is calculated from source data.
sal_Int32 mnHierarchy
Data type from ODBC data source.
void importPivotCacheDefinition(const AttributeList &rAttribs)
Reads pivot cache global settings from the pivotCacheDefinition element.
PivotCacheItemList(const WorkbookHelper &rHelper)
::std::vector< sal_Int32 > IndexVector
bool mbSupportDrill
True = data source supports subqueries.
bool isDatabaseField() const
Returns true, if the field is based on source data, or false if it is grouped or calculated.
OUString maPropertyName
Caption of the cache field.
PCWorksheetSourceModel maSheetSrcModel
Pivot cache source settings.
void readNumeric(const AttributeList &rAttribs)
Reads the double value from a pivot cache item.
bool hasNumericGrouping() const
Returns true, if the field has inplace numeric grouping settings.
sal_Int32 mnGroupBy
Index of cache field this grouped field is based on.
PivotCacheBuffer(const WorkbookHelper &rHelper)
void finalizeInternalSheetSource()
Finalizes the pivot cache if it is based on internal sheet data.
void importFieldGroup(const AttributeList &rAttribs)
Imports grouping settings from the fieldGroup element.
PCFieldGroupModel()
Finalized group name of this field used in internal pivot table collection.
void importPCRecordItem(SequenceInputStream &rStrm, const WorksheetHelper &rSheetHelper, sal_Int32 nCol, sal_Int32 nRow) const
Reads an item from the PCRECORD record and writes it to the passed sheet.
void updateSourceDataRow(const WorksheetHelper &rSheetHelper, sal_Int32 nRow) const
Checks, if the row index has changed since last call, and initializes the sheet data buffer...
IndexVector maDiscreteItems
All group items of this field.
bool mbUpgradeOnRefresh
True = application queries data asynchronously.
PCWorksheetSourceModel()
Source cell range of the data.
ValueRangeSet maColSpans
Sheet source data if cache type is sheet.
bool mbOptimizeMemory
True = try to refresh cache on load.
PivotCacheItemList maGroupItems
All shared items of this field.
::std::map< sal_Int32, OUString > FragmentPathMap
void writeSourceHeaderCell(const WorksheetHelper &rSheetHelper, sal_Int32 nCol, sal_Int32 nRow) const
Writes the title of the field into the passed sheet at the passed address.
void importRangePr(const AttributeList &rAttribs)
Imports numeric grouping settings from the rangePr element.
void readDouble(SequenceInputStream &rStrm)
Reads the double value from a pivot cache item.
const PivotCacheItemList & getCacheItems() const
Returns shared or group items.
bool mbHasNonDate
True = has (blank|string|bool|error) item(s), maybe other types.
PCSourceModel maSourceModel
Global pivot cache settings.
bool empty() const
Returns true, if this item list is empty.
void convertNumericGrouping(const css::uno::Reference< css::sheet::XDataPilotField > &rxDPField) const
Creates inplace numeric grouping settings.
void importPCDFieldGroup(SequenceInputStream &rStrm)
Imports grouping settings from the PCDFIELDGROUP record.
::std::vector< sal_Int32 > IndexVector
OUString maCaption
Fixed name of the cache field.
double mfInterval
Manual or calculated end value for range grouping.
bool mbHasDate
True = has non-date item(s), maybe date items.
bool mbIsNumeric
True = has [(string|bool|error) and (number|date)] or (number and date).
OUString maTargetUrl
Column spans used by SheetDataBuffer for optimized cell import.
sal_Int32 mnSqlType
Number format for all items.
bool mbRefreshOnLoad
True = cached item values are present.
bool mbMemberPropField
True = list of unique ODBC items exists.
OUString maFormula
OLAP property name.
void importSharedItem(sal_Int32 nElement, const AttributeList &rAttribs)
Imports a shared item from the passed element.
bool mbTupleCache
True = application may upgrade cache version.
void setFinalGroupName(const OUString &rFinalGroupName)
Set the finalized group name of this field.
bool isBasedOnDummySheet() const
Returns true, if the pivot cache is based on a dummy sheet created in finalizeImport.
PivotCacheFieldVector maFields
sal_Int32 mnParentField
Interval for numeric range grouping.
bool mbDateGroup
True = items are grouped by numeric ranges or date ranges.
void importCacheSource(const AttributeList &rAttribs)
Reads cache source settings from the cacheSource element.
void applyItemCaptions(const IdCaptionPairList &vCaptions)
Apply user Captions to imported group data.
void readBool(const AttributeList &rAttribs)
Reads the boolean value from a pivot cache item.
void setStringValue(const OUString &sName)
OUString getName() const
Returns the string representation of the item.
size_t size() const
Returns the size of the item list.
sal_Int32 getType() const
Returns the type of the item.
std::vector< sal_Int32 > maCacheIds
bool hasParentGrouping() const
Returns true, if the field has a parent group field that groups the items of this field...
bool mbIsInteger
True = has numeric item(s), maybe other types except date.
PCSourceModel()
Connection identifier for external data source.
void writeSourceHeaderCells(const WorksheetHelper &rSheetHelper) const
Writes the titles of all source fields into the passed sheet.
bool mbHasMixed
True = has blank item(s), maybe other types.
void readError(const AttributeList &rAttribs)
Reads the error code value from a pivot cache item.
OUString maSheet
Relation identifier for an external document URL.
void importPCDField(SequenceInputStream &rStrm)
Imports pivot cache field settings from the PCDFIELD record.
sal_Int32 mnMappingCount
Hierarchy level this field is part of.
PCDefinitionModel()
True = data source supports drilldown.
Helper struct for mapping original item names from/to group item names.
OUString maRefreshedBy
Relation identifier for cache records fragment.
bool mbHasBlank
True = has (string|bool|error) item(s), maybe other types.
PivotCacheField * getCacheField(sal_Int32 nFieldIdx)
Returns the cache field with the specified index.
PivotCacheItemList maSharedItems
RefVector< PivotCacheField > PivotCacheFieldVector
unsigned char sal_uInt8
void importPCDFRangePr(SequenceInputStream &rStrm)
Imports numeric grouping settings from the PCDFRANGEPR record.
void readIndex(const AttributeList &rAttribs)
Reads the index of a shared item.
bool mbHasString
True = has date item(s), maybe other types.
void finalizeImport()
Checks validity of source data and creates a dummy data sheet for external sheet sources.
RefMap< sal_Int32, PivotCache > PivotCacheMap
bool mbInvalid
Limit for discarding unused items.
void prepareSourceDataSheet()
Creates a dummy sheet that will be filled with the pivot cache data.
PCFieldGroupModel maFieldGroupModel
Settings for shared items.
OUString createDateGroupField(const css::uno::Reference< css::sheet::XDataPilotField > &rxBaseDPField) const
Creates inplace date grouping settings or a new date group field.
const css::uno::Any & getValue() const
Returns the value of the item.
double mfStartValue
Manual or calculated end date for range grouping.
bool isValidDataSource() const
Returns true, if the pivot cache is based on a valid data source, so that pivot tables can be created...
OUString getFormattedName(const ScDPSaveDimension &rSaveDim, ScDPObject *pObj, const DateTime &rNullDate) const
Returns the string representation of the item, using the actual formatting.
sal_Int32 getGroupBaseField() const
Returns the index of the base field grouping is based on.
sal_Int32 mnLevel
Hierarchy this field is part of.
void importPCRecord(SequenceInputStream &rStrm, const WorksheetHelper &rSheetHelper, sal_Int32 nRowIdx) const
Reads a PCRECORD record and writes all item values to the passed sheet.
bool mbUnused
Value type (OOXML token identifier).
void readDate(const AttributeList &rAttribs)
Reads the date/time value from a pivot cache item.
OUString msFinalGroupName
True = end value for range groups is calculated from source data.
bool isUnused() const
Returns true if the item is unused.
PCSharedItemsModel()
True = contains strings with >255 characters.
sal_Int32 mnCurrRow
URL of an external source document.
sal_Int32 mnRecords
Date/time of last refresh.
void importCacheField(const AttributeList &rAttribs)
Imports pivot cache field settings from the cacheField element.
bool mbSupportSubquery
True = cache stores OLAP functions.
void importPCDFSharedItem(sal_Int32 nRecId, SequenceInputStream &rStrm)
Imports one or more shared items from the passed record.
PivotCacheField(const WorkbookHelper &rHelper, bool bIsDatabaseField)
void importArray(SequenceInputStream &rStrm)
Imports an array of items from the PCITEM_ARRAY record.
void SvStream & rStrm
ScRange maRange
Defined name containing a cell range if present.
void importPCDFDiscretePrItem(sal_Int32 nRecId, SequenceInputStream &rStrm)
Imports an item of the mapping between group items and base items from the passed record...
bool mbValidSource
Current row index in dummy sheet.
sal_Int32 getParentGroupField() const
Returns the index of the parent group field that groups the items of this field.
void getCacheItemNames(::std::vector< OUString > &orItemNames) const
Returns the names of all shared or group items.
::std::vector< PivotCacheGroupItem > PivotCacheGroupItemVector
void importPCDSheetSource(SequenceInputStream &rStrm, const ::oox::core::Relations &rRelations)
Reads sheet source settings from the PCDSHEETSOURCE record.
PivotCache * importPivotCacheFragment(sal_Int32 nCacheId)
Imports and stores a pivot cache definition fragment on first call, returns the imported cache on sub...
const OUString & getName() const
Returns the name of the cache field.
sal_Int32 mnConnectionId
Type of the source data (sheet, consolidation, scenario, external).
sal_Int32 mnBaseField
Index of cache field that contains item groups based on this field.
PivotCache & createPivotCache(sal_Int32 nCacheId)
Creates and returns a new pivot cache object with the passed identifier.
bool mbRangeGroup
Type of numeric or date range grouping.
void readString(const AttributeList &rAttribs)
Reads the string value from a pivot cache item.
css::util::DateTime maStartDate