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 #ifndef INCLUDED_SC_SOURCE_FILTER_INC_PIVOTCACHEBUFFER_HXX
21 #define INCLUDED_SC_SOURCE_FILTER_INC_PIVOTCACHEBUFFER_HXX
22 
23 #include <com/sun/star/util/DateTime.hpp>
25 #include <oox/helper/refvector.hxx>
26 #include "workbookhelper.hxx"
27 
28 namespace oox { class AttributeList; }
29 namespace oox { class SequenceInputStream; }
30 
31 namespace com::sun::star {
32  namespace sheet { class XDataPilotField; }
33 }
34 
35 namespace oox::core { class Relations; }
36 
37 class ScDPSaveDimension;
38 class ScDPObject;
39 class DateTime;
40 
41 namespace oox::xls {
42 
44 
45 typedef ::std::pair< sal_Int32, OUString > IdCaptionPair;
46 typedef ::std::vector< IdCaptionPair > IdCaptionPairList;
47 
49 {
50 public:
51  explicit PivotCacheItem();
52 
54  void readString( const AttributeList& rAttribs );
56  void readNumeric( const AttributeList& rAttribs );
58  void readDate( const AttributeList& rAttribs );
60  void readBool( const AttributeList& rAttribs );
62  void readError( const AttributeList& rAttribs );
64  void readIndex( const AttributeList& rAttribs );
65 
69  void readDouble( SequenceInputStream& rStrm );
71  void readDate( SequenceInputStream& rStrm );
73  void readBool( SequenceInputStream& rStrm );
75  void readError( SequenceInputStream& rStrm );
77  void readIndex( SequenceInputStream& rStrm );
78 
80  sal_Int32 getType() const { return mnType; }
82  const css::uno::Any& getValue() const { return maValue; }
84  OUString getName() const;
85 
87  OUString getFormattedName(const ScDPSaveDimension& rSaveDim, ScDPObject* pObj, const DateTime& rNullDate) const;
89  bool isUnused() const { return mbUnused; }
90 
91 private:
92 friend class PivotCacheItemList;
93  // #FIXME hack Sets the value of this item to the given string ( and overwrites type if necessary
94  void setStringValue( const OUString& sName );
95  css::uno::Any maValue;
96  sal_Int32 mnType;
97  bool mbUnused;
98 };
99 
101 {
102 public:
103  explicit PivotCacheItemList( const WorkbookHelper& rHelper );
104 
106  void importItem( sal_Int32 nElement, const AttributeList& rAttribs );
108  void importItem( sal_Int32 nRecId, SequenceInputStream& rStrm );
109 
111  bool empty() const { return maItems.empty(); }
113  size_t size() const { return maItems.size(); }
114 
116  const PivotCacheItem* getCacheItem( sal_Int32 nItemIdx ) const;
118  void getCacheItemNames( ::std::vector< OUString >& orItemNames ) const;
119  void applyItemCaptions( const IdCaptionPairList& vCaptions );
120 
121 private:
125  void importArray( SequenceInputStream& rStrm );
126 
127 private:
128  std::vector< PivotCacheItem > maItems;
129 };
130 
132 {
133  OUString maName;
134  OUString maCaption;
135  OUString maPropertyName;
136  OUString maFormula;
137  sal_Int32 mnNumFmtId;
138  sal_Int32 mnSqlType;
139  sal_Int32 mnHierarchy;
140  sal_Int32 mnLevel;
141  sal_Int32 mnMappingCount;
146 
147  explicit PCFieldModel();
148 };
149 
151 {
154  bool mbHasDate;
155  bool mbHasString;
156  bool mbHasBlank;
157  bool mbHasMixed;
158  bool mbIsNumeric;
159  bool mbIsInteger;
161 
162  explicit PCSharedItemsModel();
163 };
164 
166 {
167  css::util::DateTime maStartDate;
168  css::util::DateTime maEndDate;
169  double mfStartValue;
170  double mfEndValue;
171  double mfInterval;
172  sal_Int32 mnParentField;
173  sal_Int32 mnBaseField;
174  sal_Int32 mnGroupBy;
176  bool mbDateGroup;
177  bool mbAutoStart;
178  bool mbAutoEnd;
179  OUString msFinalGroupName ;
180 
181 
182  explicit PCFieldGroupModel();
183 
185  void setBiffGroupBy( sal_uInt8 nGroupBy );
186 };
187 
190 {
191  OUString maOrigName;
192  OUString maGroupName;
193 
194  explicit PivotCacheGroupItem( const OUString& rItemName ) :
195  maOrigName( rItemName ), maGroupName( rItemName ) {}
196 };
197 
198 typedef ::std::vector< PivotCacheGroupItem > PivotCacheGroupItemVector;
199 
201 {
202 public:
203  explicit PivotCacheField( const WorkbookHelper& rHelper, bool bIsDatabaseField );
204 
206  void importCacheField( const AttributeList& rAttribs );
208  void importSharedItems( const AttributeList& rAttribs );
210  void importSharedItem( sal_Int32 nElement, const AttributeList& rAttribs );
212  void importFieldGroup( const AttributeList& rAttribs );
214  void importRangePr( const AttributeList& rAttribs );
216  void importDiscretePrItem( sal_Int32 nElement, const AttributeList& rAttribs );
218  void importGroupItem( sal_Int32 nElement, const AttributeList& rAttribs );
219 
225  void importPCDFSharedItem( sal_Int32 nRecId, SequenceInputStream& rStrm );
229  void importPCDFRangePr( SequenceInputStream& rStrm );
231  void importPCDFDiscretePrItem( sal_Int32 nRecId, SequenceInputStream& rStrm );
233  void importPCDFGroupItem( sal_Int32 nRecId, SequenceInputStream& rStrm );
234 
236  void applyItemCaptions( const IdCaptionPairList& vCaptions );
237 
240 
242  bool hasSharedItems() const { return !maSharedItems.empty(); }
244  bool hasGroupItems() const { return !maGroupItems.empty(); }
250  bool hasParentGrouping() const { return maFieldGroupModel.mnParentField >= 0; }
251 
253  const OUString& getName() const { return maFieldModel.maName; }
257  sal_Int32 getGroupBaseField() const { return maFieldGroupModel.mnBaseField; }
259  const OUString& getFinalGroupName() const { return maFieldGroupModel.msFinalGroupName; }
261  void setFinalGroupName(const OUString& rFinalGroupName) { maFieldGroupModel.msFinalGroupName = rFinalGroupName; }
262 
264  const PivotCacheItem* getCacheItem( sal_Int32 nItemIdx ) const;
266  void getCacheItemNames( ::std::vector< OUString >& orItemNames ) const;
268  const PivotCacheItemList& getCacheItems() const;
269 
272  const css::uno::Reference< css::sheet::XDataPilotField >& rxDPField ) const;
274  OUString createDateGroupField(
275  const css::uno::Reference< css::sheet::XDataPilotField >& rxBaseDPField ) const;
277  OUString createParentGroupField(
278  const css::uno::Reference< css::sheet::XDataPilotField >& rxBaseDPField,
279  const PivotCacheField& rBaseCacheField,
280  PivotCacheGroupItemVector& orItemNames ) const;
281 
283  void writeSourceHeaderCell( const WorksheetHelper& rSheetHelper,
284  sal_Int32 nCol, sal_Int32 nRow ) const;
286  void writeSourceDataCell( const WorksheetHelper& rSheetHelper,
287  sal_Int32 nCol, sal_Int32 nRow,
288  const PivotCacheItem& rItem ) const;
289 
292  const WorksheetHelper& rSheetHelper, sal_Int32 nCol, sal_Int32 nRow ) const;
293 
294 private:
296  static void writeItemToSourceDataCell( const WorksheetHelper& rSheetHelper,
297  sal_Int32 nCol, sal_Int32 nRow, const PivotCacheItem& rItem );
299  void writeSharedItemToSourceDataCell( const WorksheetHelper& rSheetHelper,
300  sal_Int32 nCol, sal_Int32 nRow, sal_Int32 nItemIdx ) const;
301 
302 private:
303  typedef ::std::vector< sal_Int32 > IndexVector;
304 
307  IndexVector maDiscreteItems;
311 };
312 
314 {
315  OUString maRelId;
316  OUString maRefreshedBy;
318  sal_Int32 mnRecords;
319  sal_Int32 mnMissItemsLimit;
320  bool mbInvalid;
321  bool mbSaveData;
330 
331  explicit PCDefinitionModel();
332 };
333 
335 {
336  sal_Int32 mnSourceType;
337  sal_Int32 mnConnectionId;
338 
339  explicit PCSourceModel();
340 };
341 
343 {
344  OUString maRelId;
345  OUString maSheet;
346  OUString maDefName;
348 
349  explicit PCWorksheetSourceModel();
350 };
351 
353 {
354 public:
355  explicit PivotCache( const WorkbookHelper& rHelper );
356 
358  void importPivotCacheDefinition( const AttributeList& rAttribs );
360  void importCacheSource( const AttributeList& rAttribs );
362  void importWorksheetSource( const AttributeList& rAttribs, const ::oox::core::Relations& rRelations );
363 
367  void importPCDSource( SequenceInputStream& rStrm );
369  void importPCDSheetSource( SequenceInputStream& rStrm, const ::oox::core::Relations& rRelations );
370 
374  void finalizeImport();
375 
378  bool isValidDataSource() const { return mbValidSource; }
380  bool isBasedOnDummySheet() const { return mbDummySheet; }
382  const ScRange&
385  const OUString& getRecordsRelId() const { return maDefModel.maRelId; }
386 
388  PivotCacheField* getCacheField( sal_Int32 nFieldIdx );
389  const PivotCacheField* getCacheField( sal_Int32 nFieldIdx ) const;
391  sal_Int32 getCacheDatabaseIndex( sal_Int32 nFieldIdx ) const;
392 
394  void writeSourceHeaderCells( const WorksheetHelper& rSheetHelper ) const;
396  void writeSourceDataCell( const WorksheetHelper& rSheetHelper,
397  sal_Int32 nColIdx, sal_Int32 nRowIdx,
398  const PivotCacheItem& rItem ) const;
399 
401  void importPCRecord( SequenceInputStream& rStrm,
402  const WorksheetHelper& rSheetHelper, sal_Int32 nRowIdx ) const;
403 
404 private:
405 
411  void prepareSourceDataSheet();
413  void updateSourceDataRow( const WorksheetHelper& rSheetHelper, sal_Int32 nRow ) const;
414 
415 private:
417  typedef ::std::vector< sal_Int32 > IndexVector;
418 
419  PivotCacheFieldVector maFields;
420  PivotCacheFieldVector maDatabaseFields;
421  IndexVector maDatabaseIndexes;
426  OUString maTargetUrl;
427  mutable sal_Int32 mnCurrRow;
430 };
431 
433 {
434 public:
435  explicit PivotCacheBuffer( const WorkbookHelper& rHelper );
436 
438  void registerPivotCacheFragment( sal_Int32 nCacheId, const OUString& rFragmentPath );
439 
442  PivotCache* importPivotCacheFragment( sal_Int32 nCacheId );
443 
444 private:
446  PivotCache& createPivotCache( sal_Int32 nCacheId );
447 
448 private:
449  typedef ::std::map< sal_Int32, OUString > FragmentPathMap;
451 
452  FragmentPathMap maFragmentPaths;
453  PivotCacheMap maCaches;
454  std::vector< sal_Int32 > maCacheIds;
455 };
456 
457 } // namespace oox::xls
458 
459 #endif
460 
461 /* 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