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 -*- */
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"
26class ScDPObject;
27class ScDPSaveData;
29class ScDPSaveMember;
31struct ScDPNumGroupInfo;
33// Pivot cache
36class XclExpPCItem : public XclExpRecord, public XclPCItem
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;
53 virtual void WriteBody( XclExpStream& rStrm ) override;
56 sal_uInt16 mnTypeFlag;
59class XclExpPCField : public XclExpRecord, public XclPCField, protected XclExpRoot
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;
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;
152 sal_uInt16 mnTypeFlags;
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 );
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;
212 OUString maTabName;
213 OUString maSrcRangeName;
217 sal_uInt16 mnListIdx;
218 bool mbValid;
223// Pivot table
225class XclExpPivotTable;
228typedef ::std::pair< sal_uInt16, sal_uInt16 > XclPTDataFieldPos;
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 );
244 virtual void WriteBody( XclExpStream& rStrm ) override;
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;
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;
311 std::vector< XclPTDataFieldInfo >
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;
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;
390 std::vector< XclPTDataFieldPos >
394 bool mbValid;
408 explicit XclExpPivotTableManager( const XclExpRoot& rRoot );
411 void CreatePivotTables();
421 void WritePivotTables( XclExpStream& rStrm, SCTAB nScTab );
426 const XclExpPivotCache* CreatePivotCache( const ScDPObject& rDPObj );
436/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Represents a new group dimension whose dimension ID is higher than the highest source dimension ID.
Definition: dpdimsave.hxx:91
const OUString & GetFieldName() const
Returns the name of this cache field.
Definition: xepivot.hxx:77
XclExpPCItemList maOrigItemList
Definition: xepivot.hxx:148
void InsertOrigDateTimeItem(const DateTime &rDateTime, const OUString &rText)
Inserts an original date/time item, if it is not contained already.
Definition: xepivot.cxx:482
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:287
sal_uInt16 GetItemCount() const
Returns the number of visible items of this field.
Definition: xepivot.cxx:263
void InitStdGroupField(const XclExpPCField &rBaseField, const ScDPSaveGroupDimension &rGroupDim)
Initializes a standard grouping field.
Definition: xepivot.cxx:363
XclExpPCItemList maGroupItemList
List with original items.
Definition: xepivot.hxx:149
void InsertOrigBoolItem(bool bValue, const OUString &rText)
Inserts an original boolean item, if it is not contained already.
Definition: xepivot.cxx:493
XclExpPCItemList maNumGroupLimits
Indexes into maItemList.
Definition: xepivot.hxx:151
void InitStandardField(const ScRange &rRange)
Initializes a standard field.
Definition: xepivot.cxx:326
void InitDateGroupField(const ScDPObject &rDPObj, const ScDPNumGroupInfo &rDateInfo, sal_Int32 nDatePart)
Initializes a date grouping field.
Definition: xepivot.cxx:428
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:191
void WriteSxgroupinfo(XclExpStream &rStrm)
Writes an SXGROUPINFO record describing the item order in grouping fields.
Definition: xepivot.cxx:599
void InsertOrigItem(XclExpPCItem *pNewItem)
Inserts an original source item.
Definition: xepivot.cxx:450
void InitNumGroupField(const ScDPObject &rDPObj, const ScDPNumGroupInfo &rNumInfo)
Initializes a numeric grouping field.
Definition: xepivot.cxx:404
virtual ~XclExpPCField() override
Definition: xepivot.cxx:251
XclExpRecordList< XclExpPCItem > XclExpPCItemList
Definition: xepivot.hxx:95
void InsertOrigDoubleItem(double fValue, const OUString &rText)
Inserts an original value item, if it is not contained already.
Definition: xepivot.cxx:471
sal_uInt16 mnTypeFlags
List with limit values for numeric grouping.
Definition: xepivot.hxx:152
void WriteSxnumgroup(XclExpStream &rStrm)
Writes an SXNUMGROUP record and the additional items for a numeric grouping field.
Definition: xepivot.cxx:583
std::size_t GetIndexSize() const
Returns the size an item index needs to write out.
Definition: xepivot.cxx:282
virtual void Save(XclExpStream &rStrm) override
Writes the pivot cache field and all items and other related records.
Definition: xepivot.cxx:300
virtual void WriteBody(XclExpStream &rStrm) override
Writes the contents of the SXFIELD record for this field.
Definition: xepivot.cxx:612
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:510
void SetDateGroupLimit(const ScDPNumGroupInfo &rDateInfo, bool bUseStep)
Inserts the SXDATETIME/SXINTEGER items that specify the limits for a date grouping.
Definition: xepivot.cxx:555
void SetGroupChildField(const XclExpPCField &rChildField)
Sets the passed field as direct grouping child field of this field.
Definition: xepivot.cxx:255
void InsertItemArrayIndex(size_t nListPos)
Inserts the passed index into the item index array of original items.
Definition: xepivot.cxx:444
sal_uInt16 InsertGroupItem(XclExpPCItem *pNewItem)
Inserts an item into the grouping item list.
Definition: xepivot.cxx:504
void SetNumGroupLimit(const ScDPNumGroupInfo &rNumInfo)
Inserts the SXDOUBLE items that specify the limits for a numeric grouping.
Definition: xepivot.cxx:546
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:273
void Finalize()
Initializes flags and item count fields.
Definition: xepivot.cxx:565
const XclExpPCItem * GetItem(sal_uInt16 nItemIdx) const
Returns the specified pivot cache item (returns visible items in groupings).
Definition: xepivot.cxx:268
const XclExpPCItemList & GetVisItemList() const
Returns the item list that contains the visible items.
Definition: xepivot.cxx:319
void InsertOrigTextItem(const OUString &rText)
Inserts an original text item, if it is not contained already.
Definition: xepivot.cxx:458
ScfUInt16Vec maIndexVec
List with grouping items.
Definition: xepivot.hxx:150
Represents a data item in a pivot cache containing data of any type.
Definition: xepivot.hxx:37
sal_uInt16 GetTypeFlag() const
Definition: xepivot.hxx:45
virtual void WriteBody(XclExpStream &rStrm) override
Writes the body of the record (without record header).
Definition: xepivot.cxx:155
XclExpPCItem(const OUString &rText)
Definition: xepivot.cxx:96
bool EqualsDouble(double fValue) const
Definition: xepivot.cxx:140
bool EqualsDateTime(const DateTime &rDateTime) const
Definition: xepivot.cxx:145
bool EqualsText(std::u16string_view rText) const
Definition: xepivot.cxx:135
bool EqualsBool(bool bValue) const
Definition: xepivot.cxx:150
sal_uInt16 mnTypeFlag
Definition: xepivot.hxx:56
XclPTFieldInfo maFieldInfo
The referred pivot cache field.
Definition: xepivot.hxx:308
const XclExpPCField * mpCacheField
Parent pivot table containing this field.
Definition: xepivot.hxx:307
void SetPropertiesFromDim(const ScDPSaveDimension &rSaveDim)
Fills this field with row/column/page properties from the passed save dimension.
Definition: xepivot.cxx:1001
sal_uInt16 GetLastDataInfoIndex() const
Returns the index of the last inserted data info struct.
Definition: xepivot.cxx:959
const XclExpPivotTable & mrPTable
Definition: xepivot.hxx:306
XclExpPTItem * GetItemAcc(std::u16string_view rName)
Returns an item by its name.
Definition: xepivot.cxx:1149
XclExpPTField(const XclExpPivotTable &rPTable, sal_uInt16 nCacheIdx)
Definition: xepivot.cxx:939
void WriteSxdi(XclExpStream &rStrm, sal_uInt16 nDataInfoIdx) const
Writes an SXDI records containing info about a data field.
Definition: xepivot.cxx:1126
void AppendSubtotalItem(sal_uInt16 nItemType)
Appends a special item describing a field subtotal entry.
Definition: xepivot.cxx:1158
XclPTFieldExtInfo maFieldExtInfo
General field info (SXVD record).
Definition: xepivot.hxx:309
XclPTPageFieldInfo maPageInfo
Extended field info (SXVDEX record).
Definition: xepivot.hxx:310
XclExpRecordList< XclExpPTItem > maItemList
List of extended data field info (SXDI records).
Definition: xepivot.hxx:314
void WriteSxvd(XclExpStream &rStrm) const
Writes the SXVD record introducing the field.
Definition: xepivot.cxx:1164
OUString GetFieldName() const
Returns the name of this field.
Definition: xepivot.cxx:954
void SetDataPropertiesFromDim(const ScDPSaveDimension &rSaveDim)
Fills this field with data field properties from the passed save dimension.
Definition: xepivot.cxx:1069
std::vector< XclPTDataFieldInfo > maDataInfoVec
Page field info (entry in SXPI record).
Definition: xepivot.hxx:312
void WriteSxvdex(XclExpStream &rStrm) const
Writes the SXVDEX record containing additional settings.
Definition: xepivot.cxx:1171
void WriteSxpiEntry(XclExpStream &rStrm) const
Writes an entry for an SXPI record containing own page field info.
Definition: xepivot.cxx:1121
void AppendSubtotalItems()
Appends special items describing the field subtotal entries.
Definition: xepivot.cxx:1103
virtual void Save(XclExpStream &rStrm) override
Writes the entire pivot table field.
Definition: xepivot.cxx:1137
sal_uInt16 GetFieldIndex() const
Returns the pivot table field list index of this field.
Definition: xepivot.hxx:263
sal_uInt16 GetItemIndex(std::u16string_view rName, sal_uInt16 nDefaultIdx) const
Returns the list index of an item by its name.
Definition: xepivot.cxx:966
XclExpPTItem(const XclExpPCField &rCacheField, sal_uInt16 nCacheIdx)
Definition: xepivot.cxx:898
OUString GetItemName() const
Returns the internal name of this item.
Definition: xepivot.cxx:916
const XclExpPCItem * mpCacheItem
Definition: xepivot.hxx:247
XclPTItemInfo maItemInfo
The referred pivot cache item.
Definition: xepivot.hxx:248
void SetPropertiesFromMember(const ScDPSaveMember &rSaveMem)
Fills this item with properties from the passed save member.
Definition: xepivot.cxx:921
virtual void WriteBody(XclExpStream &rStrm) override
Writes the SXVI record body describing the pivot table item.
Definition: xepivot.cxx:934
void AddGroupFields(const ScDPObject &rDPObj)
Adds all grouping pivot cache fields.
Definition: xepivot.cxx:756
void WriteSxdb(XclExpStream &rStrm) const
Writes the SXDB record.
Definition: xepivot.cxx:831
bool mbValid
List index in pivot cache buffer.
Definition: xepivot.hxx:218
XclPCInfo maPCInfo
Definition: xepivot.hxx:210
void WriteDconref(XclExpStream &rStrm) const
Writes the DCONREF record containing the source range.
Definition: xepivot.cxx:790
void WriteCacheStream()
Creates the pivot cache storage stream and writes the cache.
Definition: xepivot.cxx:811
sal_uInt16 GetCacheIndex() const
Returns the list index of the cache used in pivot table records.
Definition: xepivot.hxx:167
bool HasEqualDataSource(const ScDPObject &rDPObj) const
Returns true, if the passed DP object has the same data source as this cache.
Definition: xepivot.cxx:700
static void SaveXml(XclExpXmlStream &rStrm)
Definition: xepivot.cxx:729
void AddStdFields(const ScDPObject &rDPObj)
Adds all standard pivot cache fields based on source data.
Definition: xepivot.cxx:741
bool HasAddFields() const
Returns true, if this pivot cache contains non-standard fields (e.g.
Definition: xepivot.cxx:694
void Save(XclExpStream &rStrm)
Writes related records into Workbook stream and creates the pivot cache storage stream.
Definition: xepivot.cxx:710
void WriteSxindexlistList(XclExpStream &rStrm) const
Writes the SXINDEXLIST record list containing the item index table.
Definition: xepivot.cxx:846
XclExpPivotCache(const XclExpRoot &rRoot, const ScDPObject &rDPObj, sal_uInt16 nListIdx)
Definition: xepivot.cxx:617
XclExpPCFieldList::RecordRefType XclExpPCFieldRef
Definition: xepivot.hxx:208
ScRange maDocSrcRange
The exported sheet source range.
Definition: xepivot.hxx:216
OUString maTabName
List of all pivot cache fields.
Definition: xepivot.hxx:212
OUString maSrcRangeName
Name of source data sheet.
Definition: xepivot.hxx:213
const XclExpPCField * GetField(sal_uInt16 nFieldIdx) const
Returns the specified pivot cache field.
Definition: xepivot.cxx:689
bool IsValid() const
Returns true, if the cache has been constructed successfully.
Definition: xepivot.hxx:162
sal_uInt16 mnListIdx
The range used to build the cache fields and items.
Definition: xepivot.hxx:217
bool HasItemIndexList() const
Returns true, if the item index list will be written.
Definition: xepivot.cxx:679
sal_uInt16 GetFieldCount() const
Returns the number of pivot cache fields.
Definition: xepivot.cxx:684
void AddFields(const ScDPObject &rDPObj)
Adds all pivot cache fields.
Definition: xepivot.cxx:733
ScRange maExpSrcRange
The original sheet source range.
Definition: xepivot.hxx:215
ScRange maOrigSrcRange
Range name for source data.
Definition: xepivot.hxx:214
XclExpRecordList< XclExpPCField > XclExpPCFieldList
Definition: xepivot.hxx:207
void WriteDConName(XclExpStream &rStrm) const
DCONNAME record contains range name source.
Definition: xepivot.cxx:803
static void WriteSxdbex(XclExpStream &rStrm)
Writes the SXDBEX record.
Definition: xepivot.cxx:838
XclExpPCFieldList maFieldList
Pivot cache settings (SXDB record).
Definition: xepivot.hxx:211
The main class for pivot table export.
Definition: xepivot.hxx:406
XclExpRecordRef CreatePivotCachesRecord()
Creates a record wrapper for exporting all pivot caches.
Definition: xepivot.cxx:1641
void CreatePivotTables()
Creates all pivot tables and caches from the Calc DataPilot objects.
Definition: xepivot.cxx:1630
XclExpRecordRef CreatePivotTablesRecord(SCTAB nScTab)
Creates a record wrapper for exporting all pivot tables of the specified sheet.
Definition: xepivot.cxx:1646
XclExpRecordList< XclExpPivotTable > XclExpPivotTableList
Definition: xepivot.hxx:429
void WritePivotCaches(XclExpStream &rStrm)
Writes all pivot caches (all Workbook records and cache streams).
Definition: xepivot.cxx:1651
XclExpPivotTableList maPTableList
List of all pivot caches.
Definition: xepivot.hxx:433
void WritePivotTables(XclExpStream &rStrm, SCTAB nScTab)
Writes all pivot tables of the specified Calc sheet.
Definition: xepivot.cxx:1656
const XclExpPivotCache * CreatePivotCache(const ScDPObject &rDPObj)
Finds an existing (if enabled in mbShareCaches) or creates a new pivot cache.
Definition: xepivot.cxx:1666
XclExpPivotTableList::RecordRefType XclExpPivotTableRef
Definition: xepivot.hxx:430
XclExpPivotTableManager(const XclExpRoot &rRoot)
Definition: xepivot.cxx:1625
XclExpRecordList< XclExpPivotCache > maPCacheList
Definition: xepivot.hxx:432
void WriteSxdiList(XclExpStream &rStrm) const
Writes all SXDI records containing info about the data fields.
Definition: xepivot.cxx:1487
const XclExpPTField * GetField(sal_uInt16 nFieldIdx) const
Returns a pivot table field by its name.
Definition: xepivot.cxx:1240
const XclExpPCField * GetCacheField(sal_uInt16 nCacheIdx) const
Returns a pivot cache field.
Definition: xepivot.cxx:1235
SCTAB GetScTab() const
Returns the output range of the pivot table.
Definition: xepivot.hxx:327
void SetPropertiesFromDP(const ScDPSaveData &rSaveData)
Fills internal members with all properties from the passed save data.
Definition: xepivot.cxx:1311
std::vector< XclPTDataFieldPos > maDataFields
Page field indexes.
Definition: xepivot.hxx:391
XclExpPTFieldList::RecordRefType XclExpPTFieldRef
Definition: xepivot.hxx:380
SCTAB mnOutScTab
Special data field orientation field.
Definition: xepivot.hxx:393
virtual void Save(XclExpStream &rStrm) override
Writes the entire pivot table.
Definition: xepivot.cxx:1262
void WriteSxview(XclExpStream &rStrm) const
Writes the SXVIEW record starting the pivot table.
Definition: xepivot.cxx:1453
bool mbValid
Sheet index of the output range.
Definition: xepivot.hxx:394
ScfUInt16Vec maColFields
Row field indexes.
Definition: xepivot.hxx:388
void WriteQsiSxTag(XclExpStream &rStrm) const
Definition: xepivot.cxx:1528
XclExpRecordList< XclExpPTField > XclExpPTFieldList
Definition: xepivot.hxx:379
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:1250
void Finalize()
Initializes any data after processing the entire source DataPilot.
Definition: xepivot.cxx:1377
bool mbFilterBtn
true = The pivot table is valid for export.
Definition: xepivot.hxx:395
void WriteSxViewEx9(XclExpStream &rStrm) const
Writes the SX_AUTOFORMAT records with the autoformat id and header layout.
Definition: xepivot.cxx:1582
static void WriteSxivd(XclExpStream &rStrm, const ScfUInt16Vec &rFields)
Writes an SXIVD record for row field or column field order.
Definition: xepivot.cxx:1460
XclPTInfo maPTInfo
The pivot cache this pivot table bases on.
Definition: xepivot.hxx:383
ScfUInt16Vec maRowFields
All fields in pivot cache order.
Definition: xepivot.hxx:387
const XclExpPivotCache & mrPCache
Definition: xepivot.hxx:382
static void WriteSxli(XclExpStream &rStrm, sal_uInt16 nLineCount, sal_uInt16 nIndexCount)
Writes a dummy SXLI records containing item layout info.
Definition: xepivot.cxx:1497
XclExpPTField * GetFieldAcc(std::u16string_view rName)
Returns a pivot table field by its name.
Definition: xepivot.cxx:1289
XclExpPTFieldList maFieldList
The selected autoformat (SXVIEWEX9)
Definition: xepivot.hxx:386
XclExpPivotTable(const XclExpRoot &rRoot, const ScDPObject &rDPObj, const XclExpPivotCache &rPCache)
Definition: xepivot.cxx:1178
void WriteSxex(XclExpStream &rStrm) const
Writes the SXEX records containing additional pivot table info.
Definition: xepivot.cxx:1521
XclExpPTField maDataOrientField
Data field indexes.
Definition: xepivot.hxx:392
void SetFieldPropertiesFromDim(const ScDPSaveDimension &rSaveDim)
Fills a pivot table field with all properties from the passed save dimension.
Definition: xepivot.cxx:1325
void SetDataFieldPropertiesFromDim(const ScDPSaveDimension &rSaveDim)
Fills a pivot table data field with all properties from the passed save dimension.
Definition: xepivot.cxx:1366
ScfUInt16Vec maPageFields
Column field indexes.
Definition: xepivot.hxx:389
XclPTExtInfo maPTExtInfo
Info about the pivot table (SXVIEW record).
Definition: xepivot.hxx:384
void WriteSxpi(XclExpStream &rStrm) const
Writes the SXPI record containing page field info.
Definition: xepivot.cxx:1471
XclPTViewEx9Info maPTViewEx9Info
Extended info about the pivot table (SXEX record).
Definition: xepivot.hxx:385
Base class for all Excel records.
Definition: xerecord.hxx:39
Base class for single records with any content.
Definition: xerecord.hxx:143
Access to global data from other classes.
Definition: xeroot.hxx:113
This class is used to export Excel record streams.
Definition: xestream.hxx:73
Represents a field in a pivot cache.
Definition: xlpivot.hxx:477
XclPCFieldInfo maFieldInfo
Definition: xlpivot.hxx:515
Represents a data item of any type in a pivot cache.
Definition: xlpivot.hxx:367
sal_Int16 nValue
::std::vector< sal_uInt16 > ScfUInt16Vec
Definition: ftools.hxx:255
void SvStream & rStrm
const int nIndexCount
Definition: qproform.cxx:564
OUString maName
Definition: xlpivot.hxx:437
Contains data for a pivot cache (SXDB record).
Definition: xlpivot.hxx:526
Extended information about a pivot table (SXEX record).
Definition: xlpivot.hxx:735
Contains extended data for a pivot table field (SXVDEX record).
Definition: xlpivot.hxx:621
Contains data for a pivot table field (SXVD record).
Definition: xlpivot.hxx:592
sal_uInt16 mnCacheIdx
Number of items of this field.
Definition: xlpivot.hxx:597
Contains data for a pivot table (SXVIEW record).
Definition: xlpivot.hxx:706
Contains data for a pivot table data item (SXVI record).
Definition: xlpivot.hxx:575
Contains data for a pivot table page field (part of SXPI record).
Definition: xlpivot.hxx:658
Pivot table autoformat settings (SXVIEWEX9 record).
Definition: xlpivot.hxx:752
sal_Int16 SCTAB
Definition: types.hxx:22
rtl::Reference< XclExpPivotCache > XclExpPivotCacheRef
Definition: xepivot.hxx:221
::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