LibreOffice Module sc (master)  1
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
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 .
18  */
20 #pragma once
22 #include "xerecord.hxx"
23 #include "xlpivot.hxx"
24 #include "xeroot.hxx"
26 class ScDPObject;
27 class ScDPSaveData;
28 class ScDPSaveDimension;
29 class ScDPSaveMember;
31 struct ScDPNumGroupInfo;
33 // Pivot cache
36 class XclExpPCItem : public XclExpRecord, public XclPCItem
37 {
38 public:
39  explicit XclExpPCItem( const OUString& rText );
40  explicit XclExpPCItem( double fValue, const OUString& rText = OUString() );
41  explicit XclExpPCItem( const DateTime& rDateTime, const OUString& rText = OUString() );
42  explicit XclExpPCItem( sal_Int16 nValue );
43  explicit XclExpPCItem( bool bValue, const OUString& rText );
45  sal_uInt16 GetTypeFlag() const { return mnTypeFlag; }
47  bool EqualsText( std::u16string_view rText ) const;
48  bool EqualsDouble( double fValue ) const;
49  bool EqualsDateTime( const DateTime& rDateTime ) const;
50  bool EqualsBool( bool bValue ) const;
52 private:
53  virtual void WriteBody( XclExpStream& rStrm ) override;
55 private:
56  sal_uInt16 mnTypeFlag;
57 };
59 class XclExpPCField : public XclExpRecord, public XclPCField, protected XclExpRoot
60 {
61 public:
63  explicit XclExpPCField( const XclExpRoot& rRoot,
64  sal_uInt16 nFieldIdx,
65  const ScDPObject& rDPObj, const ScRange& rRange );
67  explicit XclExpPCField( const XclExpRoot& rRoot,
68  sal_uInt16 nFieldIdx,
69  const ScDPObject& rDPObj, const ScDPSaveGroupDimension& rGroupDim,
70  const XclExpPCField& rBaseField );
71  virtual ~XclExpPCField() override;
74  void SetGroupChildField( const XclExpPCField& rChildField );
77  const OUString& GetFieldName() const { return maFieldInfo.maName; }
80  sal_uInt16 GetItemCount() const;
82  const XclExpPCItem* GetItem( sal_uInt16 nItemIdx ) const;
84  sal_uInt16 GetItemIndex( std::u16string_view rItemName ) const;
87  std::size_t GetIndexSize() const;
89  void WriteIndex( XclExpStream& rStrm, sal_uInt32 nSrcRow ) const;
92  virtual void Save( XclExpStream& rStrm ) override;
94 private:
100  const XclExpPCItemList& GetVisItemList() const;
103  void InitStandardField( const ScRange& rRange );
105  void InitStdGroupField( const XclExpPCField& rBaseField, const ScDPSaveGroupDimension& rGroupDim );
107  void InitNumGroupField( const ScDPObject& rDPObj, const ScDPNumGroupInfo& rNumInfo );
109  void InitDateGroupField( const ScDPObject& rDPObj, const ScDPNumGroupInfo& rDateInfo, sal_Int32 nDatePart );
112  void InsertItemArrayIndex( size_t nListPos );
114  void InsertOrigItem( XclExpPCItem* pNewItem );
116  void InsertOrigTextItem( const OUString& rText );
118  void InsertOrigDoubleItem( double fValue, const OUString& rText );
120  void InsertOrigDateTimeItem( const DateTime& rDateTime, const OUString& rText );
122  void InsertOrigBoolItem( bool bValue, const OUString& rText );
126  sal_uInt16 InsertGroupItem( XclExpPCItem* pNewItem );
128  void InsertNumDateGroupItems( const ScDPObject& rDPObj, const ScDPNumGroupInfo& rNumInfo, sal_Int32 nDatePart = 0 );
131  void SetNumGroupLimit( const ScDPNumGroupInfo& rNumInfo );
134  void SetDateGroupLimit( const ScDPNumGroupInfo& rDateInfo, bool bUseStep );
137  void Finalize();
140  void WriteSxnumgroup( XclExpStream& rStrm );
142  void WriteSxgroupinfo( XclExpStream& rStrm );
145  virtual void WriteBody( XclExpStream& rStrm ) override;
147 private:
148  XclExpPCItemList maOrigItemList;
149  XclExpPCItemList maGroupItemList;
151  XclExpPCItemList maNumGroupLimits;
152  sal_uInt16 mnTypeFlags;
153 };
156 {
157 public:
158  explicit XclExpPivotCache( const XclExpRoot& rRoot,
159  const ScDPObject& rDPObj, sal_uInt16 nListIdx );
162  bool IsValid() const { return mbValid; }
164  bool HasItemIndexList() const;
167  sal_uInt16 GetCacheIndex() const { return mnListIdx; }
170  sal_uInt16 GetFieldCount() const;
172  const XclExpPCField* GetField( sal_uInt16 nFieldIdx ) const;
174  bool HasAddFields() const;
177  bool HasEqualDataSource( const ScDPObject& rDPObj ) const;
180  void Save( XclExpStream& rStrm );
181  static void SaveXml( XclExpXmlStream& rStrm );
183 private:
185  void AddFields( const ScDPObject& rDPObj );
188  void AddStdFields( const ScDPObject& rDPObj );
190  void AddGroupFields( const ScDPObject& rDPObj );
193  void WriteDconref( XclExpStream& rStrm ) const;
195  void WriteDConName( XclExpStream& rStrm ) const;
198  void WriteCacheStream();
200  void WriteSxdb( XclExpStream& rStrm ) const;
202  static void WriteSxdbex( XclExpStream& rStrm );
204  void WriteSxindexlistList( XclExpStream& rStrm ) const;
206 private:
211  XclExpPCFieldList maFieldList;
212  OUString maTabName;
213  OUString maSrcRangeName;
217  sal_uInt16 mnListIdx;
218  bool mbValid;
219 };
223 // Pivot table
228 typedef ::std::pair< sal_uInt16, sal_uInt16 > XclPTDataFieldPos;
231 {
232 public:
233  explicit XclExpPTItem( const XclExpPCField& rCacheField, sal_uInt16 nCacheIdx );
234  explicit XclExpPTItem( sal_uInt16 nItemType, sal_uInt16 nCacheIdx );
237  OUString GetItemName() const;
240  void SetPropertiesFromMember( const ScDPSaveMember& rSaveMem );
242 private:
244  virtual void WriteBody( XclExpStream& rStrm ) override;
246 private:
249 };
252 {
253 public:
254  explicit XclExpPTField( const XclExpPivotTable& rPTable, sal_uInt16 nCacheIdx );
256  // data access ------------------------------------------------------------
259  OUString GetFieldName() const;
263  sal_uInt16 GetFieldIndex() const { return maFieldInfo.mnCacheIdx; }
266  sal_uInt16 GetLastDataInfoIndex() const;
270  sal_uInt16 GetItemIndex( std::u16string_view rName, sal_uInt16 nDefaultIdx ) const;
272  // fill data --------------------------------------------------------------
275  void SetPropertiesFromDim( const ScDPSaveDimension& rSaveDim );
277  void SetDataPropertiesFromDim( const ScDPSaveDimension& rSaveDim );
280  void AppendSubtotalItems();
282  // records ----------------------------------------------------------------
285  void WriteSxpiEntry( XclExpStream& rStrm ) const;
287  void WriteSxdi( XclExpStream& rStrm, sal_uInt16 nDataInfoIdx ) const;
290  virtual void Save( XclExpStream& rStrm ) override;
292 private:
294  XclExpPTItem* GetItemAcc( std::u16string_view rName );
297  void AppendSubtotalItem( sal_uInt16 nItemType );
300  void WriteSxvd( XclExpStream& rStrm ) const;
302  void WriteSxvdex( XclExpStream& rStrm ) const;
304 private:
311  std::vector< XclPTDataFieldInfo >
315 };
318 {
319 public:
320  explicit XclExpPivotTable( const XclExpRoot& rRoot,
321  const ScDPObject& rDPObj, const XclExpPivotCache& rPCache );
324  const XclExpPCField* GetCacheField( sal_uInt16 nCacheIdx ) const;
327  SCTAB GetScTab() const { return mnOutScTab; }
330  const XclExpPTField* GetField( sal_uInt16 nFieldIdx ) const;
332  const XclExpPTField* GetField( std::u16string_view rName ) const;
336  sal_uInt16 GetDataFieldIndex( const OUString& rName, sal_uInt16 nDefaultIdx ) const;
339  virtual void Save( XclExpStream& rStrm ) override;
341 private:
343  XclExpPTField* GetFieldAcc( std::u16string_view rName );
345  XclExpPTField* GetFieldAcc( const ScDPSaveDimension& rSaveDim );
347  // fill data --------------------------------------------------------------
350  void SetPropertiesFromDP( const ScDPSaveData& rSaveData );
352  void SetFieldPropertiesFromDim( const ScDPSaveDimension& rSaveDim );
354  void SetDataFieldPropertiesFromDim( const ScDPSaveDimension& rSaveDim );
357  void Finalize();
359  // records ----------------------------------------------------------------
362  void WriteSxview( XclExpStream& rStrm ) const;
364  static void WriteSxivd( XclExpStream& rStrm, const ScfUInt16Vec& rFields );
366  void WriteSxpi( XclExpStream& rStrm ) const;
368  void WriteSxdiList( XclExpStream& rStrm ) const;
370  static void WriteSxli( XclExpStream& rStrm, sal_uInt16 nLineCount, sal_uInt16 nIndexCount );
372  void WriteSxex( XclExpStream& rStrm ) const;
374  void WriteQsiSxTag( XclExpStream& rStrm ) const;
376  void WriteSxViewEx9( XclExpStream& rStrm ) const;
378 private:
386  XclExpPTFieldList maFieldList;
390  std::vector< XclPTDataFieldPos >
394  bool mbValid;
395  bool mbFilterBtn;
396 };
406 {
407 public:
408  explicit XclExpPivotTableManager( const XclExpRoot& rRoot );
411  void CreatePivotTables();
421  void WritePivotTables( XclExpStream& rStrm, SCTAB nScTab );
423 private:
426  const XclExpPivotCache* CreatePivotCache( const ScDPObject& rDPObj );
428 private:
433  XclExpPivotTableList maPTableList;
434 };
436 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const XclExpPCField * mpCacheField
Parent pivot table containing this field.
Definition: xepivot.hxx:307
void AppendSubtotalItems()
Appends special items describing the field subtotal entries.
Definition: xepivot.cxx:1102
void InsertItemArrayIndex(size_t nListPos)
Inserts the passed index into the item index array of original items.
Definition: xepivot.cxx:443
sal_uInt16 GetItemCount() const
Returns the number of visible items of this field.
Definition: xepivot.cxx:262
void SetPropertiesFromDim(const ScDPSaveDimension &rSaveDim)
Fills this field with row/column/page properties from the passed save dimension.
Definition: xepivot.cxx:1000
std::vector< XclPTDataFieldInfo > maDataInfoVec
Page field info (entry in SXPI record).
Definition: xepivot.hxx:312
ScRange maExpSrcRange
The original sheet source range.
Definition: xepivot.hxx:215
XclExpPTField maDataOrientField
Data field indexes.
Definition: xepivot.hxx:392
bool HasAddFields() const
Returns true, if this pivot cache contains non-standard fields (e.g.
Definition: xepivot.cxx:693
bool HasEqualDataSource(const ScDPObject &rDPObj) const
Returns true, if the passed DP object has the same data source as this cache.
Definition: xepivot.cxx:699
void WriteSxdiList(XclExpStream &rStrm) const
Writes all SXDI records containing info about the data fields.
Definition: xepivot.cxx:1486
XclExpPCItem(const OUString &rText)
Definition: xepivot.cxx:95
void SetGroupChildField(const XclExpPCField &rChildField)
Sets the passed field as direct grouping child field of this field.
Definition: xepivot.cxx:254
virtual void Save(XclExpStream &rStrm) override
Writes the pivot cache field and all items and other related records.
Definition: xepivot.cxx:299
Pivot table autoformat settings (SXVIEWEX9 record).
Definition: xlpivot.hxx:751
XclPTExtInfo maPTExtInfo
Info about the pivot table (SXVIEW record).
Definition: xepivot.hxx:384
This class is used to export Excel record streams.
Definition: xestream.hxx:72
sal_uInt16 mnListIdx
The range used to build the cache fields and items.
Definition: xepivot.hxx:217
void SetFieldPropertiesFromDim(const ScDPSaveDimension &rSaveDim)
Fills a pivot table field with all properties from the passed save dimension.
Definition: xepivot.cxx:1324
ScfUInt16Vec maIndexVec
List with grouping items.
Definition: xepivot.hxx:150
XclExpPivotTableList::RecordRefType XclExpPivotTableRef
Definition: xepivot.hxx:430
sal_uInt16 mnCacheIdx
Number of items of this field.
Definition: xlpivot.hxx:597
Extended information about a pivot table (SXEX record).
Definition: xlpivot.hxx:734
bool IsValid() const
Returns true, if the cache has been constructed successfully.
Definition: xepivot.hxx:162
void WriteSxpi(XclExpStream &rStrm) const
Writes the SXPI record containing page field info.
Definition: xepivot.cxx:1470
void CreatePivotTables()
Creates all pivot tables and caches from the Calc DataPilot objects.
Definition: xepivot.cxx:1629
XclExpPivotTable(const XclExpRoot &rRoot, const ScDPObject &rDPObj, const XclExpPivotCache &rPCache)
Definition: xepivot.cxx:1177
std::size_t GetIndexSize() const
Returns the size an item index needs to write out.
Definition: xepivot.cxx:281
void WriteSxex(XclExpStream &rStrm) const
Writes the SXEX records containing additional pivot table info.
Definition: xepivot.cxx:1520
const XclExpPivotTable & mrPTable
Definition: xepivot.hxx:306
const XclExpPCItem * mpCacheItem
Definition: xepivot.hxx:247
XclExpPCItemList maGroupItemList
List with original items.
Definition: xepivot.hxx:149
XclExpRecordList< XclExpPivotCache > maPCacheList
Definition: xepivot.hxx:432
static void WriteSxivd(XclExpStream &rStrm, const ScfUInt16Vec &rFields)
Writes an SXIVD record for row field or column field order.
Definition: xepivot.cxx:1459
void SetPropertiesFromMember(const ScDPSaveMember &rSaveMem)
Fills this item with properties from the passed save member.
Definition: xepivot.cxx:920
ScfUInt16Vec maRowFields
All fields in pivot cache order.
Definition: xepivot.hxx:387
bool mbFilterBtn
true = The pivot table is valid for export.
Definition: xepivot.hxx:395
const XclExpPCItem * GetItem(sal_uInt16 nItemIdx) const
Returns the specified pivot cache item (returns visible items in groupings).
Definition: xepivot.cxx:267
Represents a field in a pivot cache.
Definition: xlpivot.hxx:476
void WriteSxpiEntry(XclExpStream &rStrm) const
Writes an entry for an SXPI record containing own page field info.
Definition: xepivot.cxx:1120
virtual void WriteBody(XclExpStream &rStrm) override
Writes the body of the record (without record header).
Definition: xepivot.cxx:154
XclExpRecordList< XclExpPCItem > XclExpPCItemList
Definition: xepivot.hxx:95
void WritePivotTables(XclExpStream &rStrm, SCTAB nScTab)
Writes all pivot tables of the specified Calc sheet.
Definition: xepivot.cxx:1655
OUString GetFieldName() const
Returns the name of this field.
Definition: xepivot.cxx:953
XclExpRecordRef CreatePivotCachesRecord()
Creates a record wrapper for exporting all pivot caches.
Definition: xepivot.cxx:1640
rtl::Reference< XclExpPivotCache > XclExpPivotCacheRef
Definition: xepivot.hxx:221
const OUString & GetFieldName() const
Returns the name of this cache field.
Definition: xepivot.hxx:77
XclPTPageFieldInfo maPageInfo
Extended field info (SXVDEX record).
Definition: xepivot.hxx:310
Access to global data from other classes.
Definition: xeroot.hxx:112
virtual void Save(XclExpStream &rStrm) override
Writes the entire pivot table field.
Definition: xepivot.cxx:1136
XclExpPTItem(const XclExpPCField &rCacheField, sal_uInt16 nCacheIdx)
Definition: xepivot.cxx:897
SCTAB GetScTab() const
Returns the output range of the pivot table.
Definition: xepivot.hxx:327
SCTAB mnOutScTab
Special data field orientation field.
Definition: xepivot.hxx:393
const XclExpPCField * GetField(sal_uInt16 nFieldIdx) const
Returns the specified pivot cache field.
Definition: xepivot.cxx:688
XclExpRecordList< XclExpPTItem > maItemList
List of extended data field info (SXDI records).
Definition: xepivot.hxx:314
XclExpPCItemList maOrigItemList
Definition: xepivot.hxx:148
sal_uInt16 InsertGroupItem(XclExpPCItem *pNewItem)
Inserts an item into the grouping item list.
Definition: xepivot.cxx:503
Contains extended data for a pivot table field (SXVDEX record).
Definition: xlpivot.hxx:620
bool HasItemIndexList() const
Returns true, if the item index list will be written.
Definition: xepivot.cxx:678
void SetNumGroupLimit(const ScDPNumGroupInfo &rNumInfo)
Inserts the SXDOUBLE items that specify the limits for a numeric grouping.
Definition: xepivot.cxx:545
void WriteSxvdex(XclExpStream &rStrm) const
Writes the SXVDEX record containing additional settings.
Definition: xepivot.cxx:1170
const XclExpPivotCache * CreatePivotCache(const ScDPObject &rDPObj)
Finds an existing (if enabled in mbShareCaches) or creates a new pivot cache.
Definition: xepivot.cxx:1665
Base class for all Excel records.
Definition: xerecord.hxx:37
void WriteSxdi(XclExpStream &rStrm, sal_uInt16 nDataInfoIdx) const
Writes an SXDI records containing info about a data field.
Definition: xepivot.cxx:1125
Contains data for a pivot table page field (part of SXPI record).
Definition: xlpivot.hxx:657
bool EqualsDateTime(const DateTime &rDateTime) const
Definition: xepivot.cxx:144
sal_uInt16 GetTypeFlag() const
Definition: xepivot.hxx:45
void InsertOrigDoubleItem(double fValue, const OUString &rText)
Inserts an original value item, if it is not contained already.
Definition: xepivot.cxx:470
::std::pair< sal_uInt16, sal_uInt16 > XclPTDataFieldPos
Data field position specifying the pivot table field index (first) and data info index (second)...
Definition: xepivot.hxx:225
void InitDateGroupField(const ScDPObject &rDPObj, const ScDPNumGroupInfo &rDateInfo, sal_Int32 nDatePart)
Initializes a date grouping field.
Definition: xepivot.cxx:427
void SetDateGroupLimit(const ScDPNumGroupInfo &rDateInfo, bool bUseStep)
Inserts the SXDATETIME/SXINTEGER items that specify the limits for a date grouping.
Definition: xepivot.cxx:554
Contains data for a pivot table field (SXVD record).
Definition: xlpivot.hxx:591
XclExpPivotTableList maPTableList
List of all pivot caches.
Definition: xepivot.hxx:433
void SetDataFieldPropertiesFromDim(const ScDPSaveDimension &rSaveDim)
Fills a pivot table data field with all properties from the passed save dimension.
Definition: xepivot.cxx:1365
void WriteSxindexlistList(XclExpStream &rStrm) const
Writes the SXINDEXLIST record list containing the item index table.
Definition: xepivot.cxx:845
XclPTFieldExtInfo maFieldExtInfo
General field info (SXVD record).
Definition: xepivot.hxx:309
sal_uInt16 GetItemIndex(std::u16string_view rName, sal_uInt16 nDefaultIdx) const
Returns the list index of an item by its name.
Definition: xepivot.cxx:965
OUString GetItemName() const
Returns the internal name of this item.
Definition: xepivot.cxx:915
XclExpPCItemList maNumGroupLimits
Indexes into maItemList.
Definition: xepivot.hxx:151
void AddFields(const ScDPObject &rDPObj)
Adds all pivot cache fields.
Definition: xepivot.cxx:732
void WriteSxview(XclExpStream &rStrm) const
Writes the SXVIEW record starting the pivot table.
Definition: xepivot.cxx:1452
void AppendSubtotalItem(sal_uInt16 nItemType)
Appends a special item describing a field subtotal entry.
Definition: xepivot.cxx:1157
ScRange maOrigSrcRange
Range name for source data.
Definition: xepivot.hxx:214
void AddStdFields(const ScDPObject &rDPObj)
Adds all standard pivot cache fields based on source data.
Definition: xepivot.cxx:740
XclExpRecordList< XclExpPivotTable > XclExpPivotTableList
Definition: xepivot.hxx:429
void Finalize()
Initializes flags and item count fields.
Definition: xepivot.cxx:564
sal_uInt16 GetItemIndex(std::u16string_view rItemName) const
Returns the index of a pivot cache item, or EXC_PC_NOITEM on error.
Definition: xepivot.cxx:272
bool mbValid
List index in pivot cache buffer.
Definition: xepivot.hxx:218
ScfUInt16Vec maColFields
Row field indexes.
Definition: xepivot.hxx:388
The main class for pivot table export.
Definition: xepivot.hxx:405
virtual ~XclExpPCField() override
Definition: xepivot.cxx:250
XclExpRecordRef CreatePivotTablesRecord(SCTAB nScTab)
Creates a record wrapper for exporting all pivot tables of the specified sheet.
Definition: xepivot.cxx:1645
const XclExpPCItemList & GetVisItemList() const
Returns the item list that contains the visible items.
Definition: xepivot.cxx:318
Contains data for a pivot table data item (SXVI record).
Definition: xlpivot.hxx:574
void WriteIndex(XclExpStream &rStrm, sal_uInt32 nSrcRow) const
Writes the item index at the passed source row position as part of the SXINDEXLIST record...
Definition: xepivot.cxx:286
XclExpPCFieldList maFieldList
Pivot cache settings (SXDB record).
Definition: xepivot.hxx:211
void InsertOrigTextItem(const OUString &rText)
Inserts an original text item, if it is not contained already.
Definition: xepivot.cxx:457
void InsertOrigItem(XclExpPCItem *pNewItem)
Inserts an original source item.
Definition: xepivot.cxx:449
void WriteSxnumgroup(XclExpStream &rStrm)
Writes an SXNUMGROUP record and the additional items for a numeric grouping field.
Definition: xepivot.cxx:582
XclExpPTField(const XclExpPivotTable &rPTable, sal_uInt16 nCacheIdx)
Definition: xepivot.cxx:938
const int nIndexCount
Definition: qproform.cxx:566
sal_uInt16 GetCacheIndex() const
Returns the list index of the cache used in pivot table records.
Definition: xepivot.hxx:167
XclExpPivotCache(const XclExpRoot &rRoot, const ScDPObject &rDPObj, sal_uInt16 nListIdx)
Definition: xepivot.cxx:616
OUString maSrcRangeName
Name of source data sheet.
Definition: xepivot.hxx:213
bool EqualsDouble(double fValue) const
Definition: xepivot.cxx:139
void WriteCacheStream()
Creates the pivot cache storage stream and writes the cache.
Definition: xepivot.cxx:810
void SetPropertiesFromDP(const ScDPSaveData &rSaveData)
Fills internal members with all properties from the passed save data.
Definition: xepivot.cxx:1310
XclExpPCFieldList::RecordRefType XclExpPCFieldRef
Definition: xepivot.hxx:208
ScRange maDocSrcRange
The exported sheet source range.
Definition: xepivot.hxx:216
virtual void WriteBody(XclExpStream &rStrm) override
Writes the SXVI record body describing the pivot table item.
Definition: xepivot.cxx:933
void Save(XclExpStream &rStrm)
Writes related records into Workbook stream and creates the pivot cache storage stream.
Definition: xepivot.cxx:709
XclPCFieldInfo maFieldInfo
Definition: xlpivot.hxx:515
void WriteSxdb(XclExpStream &rStrm) const
Writes the SXDB record.
Definition: xepivot.cxx:830
const XclExpPivotCache & mrPCache
Definition: xepivot.hxx:382
bool EqualsBool(bool bValue) const
Definition: xepivot.cxx:149
XclExpPTFieldList::RecordRefType XclExpPTFieldRef
Definition: xepivot.hxx:380
Represents a data item in a pivot cache containing data of any type.
Definition: xepivot.hxx:36
void WriteSxvd(XclExpStream &rStrm) const
Writes the SXVD record introducing the field.
Definition: xepivot.cxx:1163
XclExpPCField(const XclExpRoot &rRoot, sal_uInt16 nFieldIdx, const ScDPObject &rDPObj, const ScRange &rRange)
Creates a standard pivot cache field, filled from sheet source data.
Definition: xepivot.cxx:190
static void WriteSxli(XclExpStream &rStrm, sal_uInt16 nLineCount, sal_uInt16 nIndexCount)
Writes a dummy SXLI records containing item layout info.
Definition: xepivot.cxx:1496
void InsertOrigBoolItem(bool bValue, const OUString &rText)
Inserts an original boolean item, if it is not contained already.
Definition: xepivot.cxx:492
XclPTViewEx9Info maPTViewEx9Info
Extended info about the pivot table (SXEX record).
Definition: xepivot.hxx:385
::std::vector< sal_uInt16 > ScfUInt16Vec
Definition: ftools.hxx:255
XclExpPTItem * GetItemAcc(std::u16string_view rName)
Returns an item by its name.
Definition: xepivot.cxx:1148
ScfUInt16Vec maPageFields
Column field indexes.
Definition: xepivot.hxx:389
XclExpPivotTableManager(const XclExpRoot &rRoot)
Definition: xepivot.cxx:1624
Contains data for a pivot cache (SXDB record).
Definition: xlpivot.hxx:525
XclExpRecordList< XclExpPCField > XclExpPCFieldList
Definition: xepivot.hxx:207
void WriteSxViewEx9(XclExpStream &rStrm) const
Writes the SX_AUTOFORMAT records with the autoformat id and header layout.
Definition: xepivot.cxx:1581
void InitStdGroupField(const XclExpPCField &rBaseField, const ScDPSaveGroupDimension &rGroupDim)
Initializes a standard grouping field.
Definition: xepivot.cxx:362
void AddGroupFields(const ScDPObject &rDPObj)
Adds all grouping pivot cache fields.
Definition: xepivot.cxx:755
XclPCInfo maPCInfo
Definition: xepivot.hxx:210
Represents a new group dimension whose dimension ID is higher than the highest source dimension ID...
Definition: dpdimsave.hxx:90
Contains data for a pivot table (SXVIEW record).
Definition: xlpivot.hxx:705
void WriteDConName(XclExpStream &rStrm) const
DCONNAME record contains range name source.
Definition: xepivot.cxx:802
XclExpPTFieldList maFieldList
The selected autoformat (SXVIEWEX9)
Definition: xepivot.hxx:386
XclPTInfo maPTInfo
The pivot cache this pivot table bases on.
Definition: xepivot.hxx:383
void Finalize()
Initializes any data after processing the entire source DataPilot.
Definition: xepivot.cxx:1376
void InsertNumDateGroupItems(const ScDPObject &rDPObj, const ScDPNumGroupInfo &rNumInfo, sal_Int32 nDatePart=0)
Generates and inserts all visible items for numeric or date grouping.
Definition: xepivot.cxx:509
XclPTFieldInfo maFieldInfo
The referred pivot cache field.
Definition: xepivot.hxx:308
XclPTItemInfo maItemInfo
The referred pivot cache item.
Definition: xepivot.hxx:248
void InitStandardField(const ScRange &rRange)
Initializes a standard field.
Definition: xepivot.cxx:325
OUString maTabName
List of all pivot cache fields.
Definition: xepivot.hxx:212
static void WriteSxdbex(XclExpStream &rStrm)
Writes the SXDBEX record.
Definition: xepivot.cxx:837
const XclExpPCField * GetCacheField(sal_uInt16 nCacheIdx) const
Returns a pivot cache field.
Definition: xepivot.cxx:1234
void WritePivotCaches(XclExpStream &rStrm)
Writes all pivot caches (all Workbook records and cache streams).
Definition: xepivot.cxx:1650
void SetDataPropertiesFromDim(const ScDPSaveDimension &rSaveDim)
Fills this field with data field properties from the passed save dimension.
Definition: xepivot.cxx:1068
virtual void Save(XclExpStream &rStrm) override
Writes the entire pivot table.
Definition: xepivot.cxx:1261
std::vector< XclPTDataFieldPos > maDataFields
Page field indexes.
Definition: xepivot.hxx:391
void InsertOrigDateTimeItem(const DateTime &rDateTime, const OUString &rText)
Inserts an original date/time item, if it is not contained already.
Definition: xepivot.cxx:481
static void SaveXml(XclExpXmlStream &rStrm)
Definition: xepivot.cxx:728
sal_uInt16 GetFieldCount() const
Returns the number of pivot cache fields.
Definition: xepivot.cxx:683
sal_uInt16 GetFieldIndex() const
Returns the pivot table field list index of this field.
Definition: xepivot.hxx:263
const XclExpPTField * GetField(sal_uInt16 nFieldIdx) const
Returns a pivot table field by its name.
Definition: xepivot.cxx:1239
void WriteDconref(XclExpStream &rStrm) const
Writes the DCONREF record containing the source range.
Definition: xepivot.cxx:789
void WriteSxgroupinfo(XclExpStream &rStrm)
Writes an SXGROUPINFO record describing the item order in grouping fields.
Definition: xepivot.cxx:598
XclExpRecordList< XclExpPTField > XclExpPTFieldList
Definition: xepivot.hxx:379
virtual void WriteBody(XclExpStream &rStrm) override
Writes the contents of the SXFIELD record for this field.
Definition: xepivot.cxx:611
sal_uInt16 mnTypeFlag
Definition: xepivot.hxx:56
void SvStream & rStrm
bool mbValid
Sheet index of the output range.
Definition: xepivot.hxx:394
OUString maName
Definition: xlpivot.hxx:437
sal_uInt16 GetLastDataInfoIndex() const
Returns the index of the last inserted data info struct.
Definition: xepivot.cxx:958
void WriteQsiSxTag(XclExpStream &rStrm) const
Definition: xepivot.cxx:1527
void InitNumGroupField(const ScDPObject &rDPObj, const ScDPNumGroupInfo &rNumInfo)
Initializes a numeric grouping field.
Definition: xepivot.cxx:403
XclExpPTField * GetFieldAcc(std::u16string_view rName)
Returns a pivot table field by its name.
Definition: xepivot.cxx:1288
Base class for single records with any content.
Definition: xerecord.hxx:141
sal_Int16 SCTAB
Definition: types.hxx:22
sal_uInt16 mnTypeFlags
List with limit values for numeric grouping.
Definition: xepivot.hxx:152
sal_Int16 nValue
bool EqualsText(std::u16string_view rText) const
Definition: xepivot.cxx:134
sal_uInt16 GetDataFieldIndex(const OUString &rName, sal_uInt16 nDefaultIdx) const
Returns the data-field-only index of the first data field with the passed name.
Definition: xepivot.cxx:1249
Represents a data item of any type in a pivot cache.
Definition: xlpivot.hxx:366