LibreOffice Module sc (master) 1
xipivot.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 "xlpivot.hxx"
23#include "xiroot.hxx"
24#include <vector>
25#include <memory>
26
27class ScDPSaveData;
29
30// Pivot cache
31
33class XclImpPCItem : public XclPCItem
34{
35public:
36 explicit XclImpPCItem( XclImpStream& rStrm );
37
39 void WriteToSource( XclImpRoot& rRoot, const ScAddress& rScPos ) const;
40
41private:
56};
57
58typedef std::shared_ptr< XclImpPCItem > XclImpPCItemRef;
59
60struct ScDPNumGroupInfo;
62
64class XclImpPCField : public XclPCField, protected XclImpRoot
65{
66public:
68 explicit XclImpPCField( const XclImpRoot& rRoot,
69 XclImpPivotCache& rPCache, sal_uInt16 nFieldIdx );
70 virtual ~XclImpPCField() override;
71
72 // general field/item access ----------------------------------------------
73
75 const OUString& GetFieldName( const ScfStringVec& rVisNames ) const;
76
78 const XclImpPCField* GetGroupBaseField() const;
79
81 const XclImpPCItem* GetItem( sal_uInt16 nItemIdx ) const;
84 const XclImpPCItem* GetLimitItem( sal_uInt16 nItemIdx ) const;
85
87 void WriteFieldNameToSource( SCCOL nScCol, SCTAB nScTab );
89 void WriteOrigItemToSource( SCROW nScRow, SCTAB nScTab, sal_uInt16 nItemIdx );
91 void WriteLastOrigItemToSource( SCROW nScRow, SCTAB nScTab );
92
93 // records ----------------------------------------------------------------
94
103
104 // grouping ---------------------------------------------------------------
105
107 void ConvertGroupField( ScDPSaveData& rSaveData, const ScfStringVec& rVisNames ) const;
108
109private:
111 void ConvertStdGroupField( ScDPSaveData& rSaveData, const ScfStringVec& rVisNames ) const;
113 void ConvertNumGroupField( ScDPSaveData& rSaveData, const ScfStringVec& rVisNames ) const;
115 void ConvertDateGroupField( ScDPSaveData& rSaveData, const ScfStringVec& rVisNames ) const;
116
121
123 const double* GetNumGroupLimit( sal_uInt16 nLimitIdx ) const;
125 const DateTime* GetDateGroupLimit( sal_uInt16 nLimitIdx ) const;
127 const sal_Int16* GetDateGroupStep() const;
128
129private:
130 typedef ::std::vector< XclImpPCItemRef > XclImpPCItemVec;
131
138};
139
140typedef std::shared_ptr< XclImpPCField > XclImpPCFieldRef;
141
143{
144public:
145 explicit XclImpPivotCache( const XclImpRoot& rRoot );
146 virtual ~XclImpPivotCache() override;
147
148 // data access ------------------------------------------------------------
149
151 const ScRange& GetSourceRange() const { return maSrcRange; }
152
153 const OUString& GetSourceRangeName() const { return maSrcRangeName; }
154
156 const XclImpPCField* GetField( sal_uInt16 nFieldIdx ) const;
157
158 // records ----------------------------------------------------------------
159
161 void ReadSxidstm( XclImpStream& rStrm );
163 void ReadSxvs( XclImpStream& rStrm );
165 void ReadDconref( XclImpStream& rStrm );
170 void ReadDConName( XclImpStream& rStrm );
172 void ReadPivotCacheStream( const XclImpStream& rStrm );
173
174 bool IsRefreshOnLoad() const;
175 bool IsValid() const;
176
177private:
178 typedef ::std::vector< XclImpPCFieldRef > XclImpPCFieldVec;
179
183 OUString maUrl;
184 OUString maTabName;
185 OUString maSrcRangeName;
186 sal_uInt16 mnStrmId;
187 sal_uInt16 mnSrcType;
189};
190
191typedef std::shared_ptr< XclImpPivotCache > XclImpPivotCacheRef;
192
193// Pivot table
194
195class XclImpPivotTable;
196
198{
199public:
200 explicit XclImpPTItem( const XclImpPCField* pCacheField );
201
203 const OUString* GetItemName() const;
205 std::pair<bool, OUString> GetItemName(const ScDPSaveDimension& rSaveDim, ScDPObject* pObj, const XclImpRoot& rRoot) const;
206
208 void ReadSxvi( XclImpStream& rStrm );
209
211 void ConvertItem( ScDPSaveDimension& rSaveDim, ScDPObject* pObj, const XclImpRoot& rRoot ) const;
212
213private:
216};
217
218typedef std::shared_ptr< XclImpPTItem > XclImpPTItemRef;
219
221{
222public:
223 explicit XclImpPTField( const XclImpPivotTable& rPTable, sal_uInt16 nCacheIdx );
224
225 // general field/item access ----------------------------------------------
226
228 const XclImpPCField* GetCacheField() const;
230 OUString GetFieldName() const;
232 OUString GetVisFieldName() const;
233
235 const XclImpPTItem* GetItem( sal_uInt16 nItemIdx ) const;
237 const OUString* GetItemName( sal_uInt16 nItemIdx ) const;
238
240 sal_uInt16 GetAxes() const { return maFieldInfo.mnAxes; }
242 void SetAxes( sal_uInt16 nAxes ) { maFieldInfo.mnAxes = nAxes; }
243
244 // records ----------------------------------------------------------------
245
247 void ReadSxvd( XclImpStream& rStrm );
249 void ReadSxvdex( XclImpStream& rStrm );
251 void ReadSxvi( XclImpStream& rStrm );
252
253 // row/column fields ------------------------------------------------------
254
255 void ConvertRowColField( ScDPSaveData& rSaveData ) const;
256
257 // page fields ------------------------------------------------------------
258
259 void SetPageFieldInfo( const XclPTPageFieldInfo& rPageInfo );
260 void ConvertPageField( ScDPSaveData& rSaveData ) const;
261
262 // hidden fields ----------------------------------------------------------
263
264 void ConvertHiddenField( ScDPSaveData& rSaveData ) const;
265
266 // data fields ------------------------------------------------------------
267
268 bool HasDataFieldInfo() const;
269 void AddDataFieldInfo( const XclPTDataFieldInfo& rDataInfo );
270 void ConvertDataField( ScDPSaveData& rSaveData ) const;
271
272 void ConvertFieldInfo( const ScDPSaveData& rSaveData, ScDPObject* pObj, const XclImpRoot& rRoot, bool bPageField = false ) const;
273
274private:
275 void ConvertRCPField( ScDPSaveData& rSaveData ) const;
276
277 void ConvertDataField( ScDPSaveDimension& rSaveDim, const XclPTDataFieldInfo& rDataInfo ) const;
278 void ConvertDataFieldInfo( ScDPSaveDimension& rSaveDim, const XclPTDataFieldInfo& rDataInfo ) const;
279
280private:
281
286 std::vector< XclPTDataFieldInfo > maDataInfoVector;
287 std::vector< XclImpPTItemRef > maItems;
288};
289
290typedef std::shared_ptr< XclImpPTField > XclImpPTFieldRef;
291
293{
294public:
295 explicit XclImpPivotTable( const XclImpRoot& rRoot );
296 virtual ~XclImpPivotTable() override;
297
298 // cache/field access, misc. ----------------------------------------------
299
300 const XclImpPivotCacheRef& GetPivotCache() const { return mxPCache; }
302
303 sal_uInt16 GetFieldCount() const;
304 const XclImpPTField* GetField( sal_uInt16 nFieldIdx ) const;
305 XclImpPTField* GetFieldAcc( sal_uInt16 nFieldIdx );
306
307 const XclImpPTField* GetDataField( sal_uInt16 nDataFieldIdx ) const;
308 OUString GetDataFieldName( sal_uInt16 nDataFieldIdx ) const;
309
310 // records ----------------------------------------------------------------
311
313 void ReadSxview( XclImpStream& rStrm );
315 void ReadSxvd( XclImpStream& rStrm );
317 void ReadSxvi( XclImpStream& rStrm );
319 void ReadSxvdex( XclImpStream& rStrm );
321 void ReadSxivd( XclImpStream& rStrm );
323 void ReadSxpi( XclImpStream& rStrm );
325 void ReadSxdi( XclImpStream& rStrm );
327 void ReadSxex( XclImpStream& rStrm );
330 void ReadSxViewEx9( XclImpStream& rStrm );
331
333 void ReadSxAddl( XclImpStream& rStrm );
334
336 void Convert();
337
338 void MaybeRefresh();
339
340 void ApplyMergeFlags(const ScRange& rOutRange, const ScDPSaveData& rSaveData);
341 void ApplyFieldInfo();
342
343private:
345
350 std::vector< XclImpPTFieldRef >
362};
363
364typedef std::shared_ptr< XclImpPivotTable > XclImpPivotTableRef;
365
372{
373public:
374 explicit XclImpPivotTableManager( const XclImpRoot& rRoot );
375 virtual ~XclImpPivotTableManager() override;
376
377 // pivot cache records ----------------------------------------------------
378
380 XclImpPivotCacheRef GetPivotCache( sal_uInt16 nCacheIdx );
381
385 void ReadSxvs( XclImpStream& rStrm );
389
390 // pivot table records ----------------------------------------------------
391
395 void ReadSxvd( XclImpStream& rStrm );
401 void ReadSxpi( XclImpStream& rStrm );
403 void ReadSxdi( XclImpStream& rStrm );
405 void ReadSxvi( XclImpStream& rStrm );
407 void ReadSxex( XclImpStream& rStrm );
413
415 void ReadPivotCaches( const XclImpStream& rStrm );
417 void ConvertPivotTables();
418
420
421private:
422
423 std::vector< XclImpPivotCacheRef > maPCaches;
424 std::vector< XclImpPivotTableRef > maPTables;
425};
426
427/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Represents a field in a pivot cache (a column of data items in the source area).
Definition: xipivot.hxx:65
ScDPNumGroupInfo GetScDateGroupInfo() const
Returns a Calc struct with date grouping data.
Definition: xipivot.cxx:516
const XclImpPCItem * GetLimitItem(sal_uInt16 nItemIdx) const
Returns the item representing a limit value in numeric/date/time grouping fields.
Definition: xipivot.cxx:218
XclImpPivotCache & mrPCache
Definition: xipivot.hxx:132
XclImpPCField(const XclImpRoot &rRoot, XclImpPivotCache &rPCache, sal_uInt16 nFieldIdx)
Creates a pivot cache field by reading an SXFIELD record.
Definition: xipivot.cxx:181
::std::vector< XclImpPCItemRef > XclImpPCItemVec
Definition: xipivot.hxx:130
XclImpPCItemVec maNumGroupItems
List of all source data items.
Definition: xipivot.hxx:135
XclImpPCItemVec maOrigItems
List of all displayed data items.
Definition: xipivot.hxx:134
void ConvertDateGroupField(ScDPSaveData &rSaveData, const ScfStringVec &rVisNames) const
Inserts date grouping information of this field into the passed ScDPSaveData.
Definition: xipivot.cxx:448
const double * GetNumGroupLimit(sal_uInt16 nLimitIdx) const
Returns a limit value for numeric grouping fields.
Definition: xipivot.cxx:544
bool mbNumGroupInfoRead
Column index of source data for this field.
Definition: xipivot.hxx:137
ScDPNumGroupInfo GetScNumGroupInfo() const
Returns a Calc struct with numeric grouping data.
Definition: xipivot.cxx:492
void ConvertGroupField(ScDPSaveData &rSaveData, const ScfStringVec &rVisNames) const
Inserts grouping information of this field into the passed ScDPSaveData.
Definition: xipivot.cxx:393
SCCOL mnSourceScCol
List of items containing numeric grouping limits.
Definition: xipivot.hxx:136
void ConvertStdGroupField(ScDPSaveData &rSaveData, const ScfStringVec &rVisNames) const
Inserts standard grouping information of this field into the passed ScDPSaveData.
Definition: xipivot.cxx:408
const OUString & GetFieldName(const ScfStringVec &rVisNames) const
Returns the name of the field, uses the passed visible name if supported.
Definition: xipivot.cxx:196
virtual ~XclImpPCField() override
Definition: xipivot.cxx:190
void WriteFieldNameToSource(SCCOL nScCol, SCTAB nScTab)
Inserts the field name into the document.
Definition: xipivot.cxx:225
XclImpPCItemVec maItems
Parent pivot cache containing this field.
Definition: xipivot.hxx:133
const DateTime * GetDateGroupLimit(sal_uInt16 nLimitIdx) const
Returns a limit value for date grouping fields (minimum/maximum only).
Definition: xipivot.cxx:555
const sal_Int16 * GetDateGroupStep() const
Returns the step value for date grouping fields.
Definition: xipivot.cxx:566
void WriteLastOrigItemToSource(SCROW nScRow, SCTAB nScTab)
Inserts the data of the last inserted item into the document.
Definition: xipivot.cxx:238
void ReadSxnumgroup(XclImpStream &rStrm)
Reads the SXNUMGROUP record describing numeric grouping fields.
Definition: xipivot.cxx:369
void ReadSxfield(XclImpStream &rStrm)
Reads the SXFIELD record describing the field.
Definition: xipivot.cxx:246
void ConvertNumGroupField(ScDPSaveData &rSaveData, const ScfStringVec &rVisNames) const
Inserts numeric grouping information of this field into the passed ScDPSaveData.
Definition: xipivot.cxx:441
const XclImpPCItem * GetItem(sal_uInt16 nItemIdx) const
Returns the item at the specified position or 0 on error.
Definition: xipivot.cxx:213
void WriteOrigItemToSource(SCROW nScRow, SCTAB nScTab, sal_uInt16 nItemIdx)
Inserts the specified item data into the document.
Definition: xipivot.cxx:232
void ReadItem(XclImpStream &rStrm)
Reads an item data record describing a new item.
Definition: xipivot.cxx:344
void ReadSxgroupinfo(XclImpStream &rStrm)
Reads the SXGROUPINFO record describing the item order in grouping fields.
Definition: xipivot.cxx:378
const XclImpPCField * GetGroupBaseField() const
Returns the base field if this is a grouping field.
Definition: xipivot.cxx:207
Represents a data item in a pivot cache.
Definition: xipivot.hxx:34
void ReadSxinteger(XclImpStream &rStrm)
Reads an SXINTEGER record describing an integer item.
Definition: xipivot.cxx:149
void ReadSxdouble(XclImpStream &rStrm)
Reads an SXDOUBLE record describing a floating-point item.
Definition: xipivot.cxx:131
void ReadSxempty(XclImpStream &rStrm)
Reads an SXEMPTY record describing an empty item.
Definition: xipivot.cxx:175
void WriteToSource(XclImpRoot &rRoot, const ScAddress &rScPos) const
Inserts the item data into the passed document.
Definition: xipivot.cxx:96
XclImpPCItem(XclImpStream &rStrm)
Definition: xipivot.cxx:68
void ReadSxboolean(XclImpStream &rStrm)
Reads an SXBOOLEAN record describing a boolean item.
Definition: xipivot.cxx:137
void ReadSxstring(XclImpStream &rStrm)
Reads an SXSTRING record describing a text item.
Definition: xipivot.cxx:155
void ReadSxerror(XclImpStream &rStrm)
Reads an SXERROR record describing an error code item.
Definition: xipivot.cxx:143
void ReadSxdatetime(XclImpStream &rStrm)
Reads an SXDATETIME record describing a date/time item.
Definition: xipivot.cxx:161
void ConvertHiddenField(ScDPSaveData &rSaveData) const
Definition: xipivot.cxx:1039
void ConvertPageField(ScDPSaveData &rSaveData) const
Definition: xipivot.cxx:1031
const XclImpPivotTable & mrPTable
Definition: xipivot.hxx:282
XclPTFieldExtInfo maFieldExtInfo
General field info (SXVD record).
Definition: xipivot.hxx:284
void AddDataFieldInfo(const XclPTDataFieldInfo &rDataInfo)
Definition: xipivot.cxx:1052
XclImpPTField(const XclImpPivotTable &rPTable, sal_uInt16 nCacheIdx)
Definition: xipivot.cxx:956
XclPTPageFieldInfo maPageInfo
Extended field info (SXVDEX record).
Definition: xipivot.hxx:285
void ReadSxvi(XclImpStream &rStrm)
Reads an SXVI record describing a new item of this field.
Definition: xipivot.cxx:1005
std::vector< XclImpPTItemRef > maItems
Vector of extended data field info (SXDI records).
Definition: xipivot.hxx:287
sal_uInt16 GetAxes() const
Returns the flags of the axes this field is part of.
Definition: xipivot.hxx:240
void SetAxes(sal_uInt16 nAxes)
Sets the flags of the axes this field is part of.
Definition: xipivot.hxx:242
void ReadSxvd(XclImpStream &rStrm)
Reads an SXVD record describing the field.
Definition: xipivot.cxx:995
bool HasDataFieldInfo() const
Definition: xipivot.cxx:1047
void ConvertFieldInfo(const ScDPSaveData &rSaveData, ScDPObject *pObj, const XclImpRoot &rRoot, bool bPageField=false) const
Definition: xipivot.cxx:1173
void ConvertRowColField(ScDPSaveData &rSaveData) const
Definition: xipivot.cxx:1014
void ConvertRCPField(ScDPSaveData &rSaveData) const
Definition: xipivot.cxx:1111
XclPTFieldInfo maFieldInfo
Parent pivot table containing this field.
Definition: xipivot.hxx:283
const OUString * GetItemName(sal_uInt16 nItemIdx) const
Returns the internal name of the specified item.
Definition: xipivot.cxx:987
void ConvertDataFieldInfo(ScDPSaveDimension &rSaveDim, const XclPTDataFieldInfo &rDataInfo) const
Definition: xipivot.cxx:1211
const XclImpPCField * GetCacheField() const
Returns the corresponding pivot cache field of this field.
Definition: xipivot.cxx:964
void SetPageFieldInfo(const XclPTPageFieldInfo &rPageInfo)
Definition: xipivot.cxx:1026
const XclImpPTItem * GetItem(sal_uInt16 nItemIdx) const
Returns the specified item.
Definition: xipivot.cxx:982
void ConvertDataField(ScDPSaveData &rSaveData) const
Definition: xipivot.cxx:1058
OUString GetVisFieldName() const
Returns the internally set visible name of this field.
Definition: xipivot.cxx:976
std::vector< XclPTDataFieldInfo > maDataInfoVector
Page field info (entry from SXPI record).
Definition: xipivot.hxx:286
OUString GetFieldName() const
Returns the name of this field that is used to create the Calc dimensions.
Definition: xipivot.cxx:970
void ReadSxvdex(XclImpStream &rStrm)
Reads an SXVDEX record describing extended options of the field.
Definition: xipivot.cxx:1000
XclPTItemInfo maItemInfo
Definition: xipivot.hxx:214
void ConvertItem(ScDPSaveDimension &rSaveDim, ScDPObject *pObj, const XclImpRoot &rRoot) const
Inserts this item into the passed ScDPSaveDimension.
Definition: xipivot.cxx:939
const XclImpPCField * mpCacheField
General data for this item.
Definition: xipivot.hxx:215
const OUString * GetItemName() const
Returns the internal name of the item or 0, if no name could be found.
Definition: xipivot.cxx:882
XclImpPTItem(const XclImpPCField *pCacheField)
Definition: xipivot.cxx:877
void ReadSxvi(XclImpStream &rStrm)
Reads an SXVI record containing data of this item.
Definition: xipivot.cxx:934
bool mbSelfRef
Source data type.
Definition: xipivot.hxx:188
sal_uInt16 mnSrcType
Pivot cache stream identifier.
Definition: xipivot.hxx:187
XclImpPCFieldVec maFields
Pivot cache settings (SXDB record).
Definition: xipivot.hxx:181
XclImpPivotCache(const XclImpRoot &rRoot)
Definition: xipivot.cxx:589
bool IsRefreshOnLoad() const
Definition: xipivot.cxx:862
OUString maTabName
URL of the source data.
Definition: xipivot.hxx:184
void ReadDconref(XclImpStream &rStrm)
Reads a DCONREF record containing the source range of the pivot cache.
Definition: xipivot.cxx:622
OUString maUrl
Source range in the spreadsheet.
Definition: xipivot.hxx:183
::std::vector< XclImpPCFieldRef > XclImpPCFieldVec
Definition: xipivot.hxx:178
virtual ~XclImpPivotCache() override
Definition: xipivot.cxx:598
bool IsValid() const
Definition: xipivot.cxx:867
const OUString & GetSourceRangeName() const
Definition: xipivot.hxx:153
const ScRange & GetSourceRange() const
Returns the data source range read from the DCONREF record.
Definition: xipivot.hxx:151
sal_uInt16 mnStrmId
Name of the source data range.
Definition: xipivot.hxx:186
XclPCInfo maPCInfo
Definition: xipivot.hxx:180
ScRange maSrcRange
List of pivot cache fields.
Definition: xipivot.hxx:182
void ReadDConName(XclImpStream &rStrm)
Read DECONNAME record which contains the defined name of the source range.
Definition: xipivot.cxx:644
void ReadSxidstm(XclImpStream &rStrm)
Reads an SXIDSTM record containing a pivot cache stream identifier and the pivot cache.
Definition: xipivot.cxx:611
const XclImpPCField * GetField(sal_uInt16 nFieldIdx) const
Returns read-only access to a pivot cache field.
Definition: xipivot.cxx:604
void ReadSxvs(XclImpStream &rStrm)
Reads an SXVS record containing the source type of the pivot cache.
Definition: xipivot.cxx:616
OUString maSrcRangeName
Sheet name of the source data.
Definition: xipivot.hxx:185
void ReadPivotCacheStream(const XclImpStream &rStrm)
Reads the entire pivot cache stream.
Definition: xipivot.cxx:660
The main class for pivot table import.
Definition: xipivot.hxx:372
void ReadSxvdex(XclImpStream &rStrm)
Reads an SXVDEX record describing extended options of a field.
Definition: xipivot.cxx:1670
void ReadSxvi(XclImpStream &rStrm)
Reads an SXVI record describing a new item of the current field.
Definition: xipivot.cxx:1694
std::vector< XclImpPivotCacheRef > maPCaches
Definition: xipivot.hxx:423
void ReadSxpi(XclImpStream &rStrm)
Reads an SXPI record containing page field data.
Definition: xipivot.cxx:1682
XclImpPivotTableManager(const XclImpRoot &rRoot)
Definition: xipivot.cxx:1611
void ReadSxViewEx9(XclImpStream &rStrm)
Reads an SXVIEWEX9 record that specifies the pivot tables autoformat.
Definition: xipivot.cxx:1706
void ReadPivotCaches(const XclImpStream &rStrm)
Reads all used pivot caches and creates additional sheets for external data sources.
Definition: xipivot.cxx:1718
void ReadSxview(XclImpStream &rStrm)
Reads an SXVIEW record describing a new pivot table.
Definition: xipivot.cxx:1657
void ReadDconref(XclImpStream &rStrm)
Reads a DCONREF record containing the source range of a pivot cache.
Definition: xipivot.cxx:1643
std::vector< XclImpPivotTableRef > maPTables
List of all pivot caches.
Definition: xipivot.hxx:424
void ReadSxivd(XclImpStream &rStrm)
Reads an SXIVD record containing the row field or column field order.
Definition: xipivot.cxx:1676
void ReadSxdi(XclImpStream &rStrm)
Reads an SXDI record containing data field data.
Definition: xipivot.cxx:1688
void ReadSxidstm(XclImpStream &rStrm)
Reads an SXIDSTM record containing a pivot cache stream identifier and the pivot cache.
Definition: xipivot.cxx:1630
virtual ~XclImpPivotTableManager() override
Definition: xipivot.cxx:1616
void ReadSxAddl(XclImpStream &rStrm)
Reads an SXADDL record that specifies additional info for pivot table.
Definition: xipivot.cxx:1712
XclImpPivotCacheRef GetPivotCache(sal_uInt16 nCacheIdx)
Returns the pivot cache with the specified 0-based index.
Definition: xipivot.cxx:1622
void ReadSxvd(XclImpStream &rStrm)
Reads an SXVD record describing a new field.
Definition: xipivot.cxx:1664
void ReadDConName(XclImpStream &rStrm)
Definition: xipivot.cxx:1649
void ConvertPivotTables()
Inserts all pivot tables into the Calc document.
Definition: xipivot.cxx:1724
void ReadSxex(XclImpStream &rStrm)
Reads an SXEX record containing additional settings for a pivot table.
Definition: xipivot.cxx:1700
void ReadSxvs(XclImpStream &rStrm)
Reads an SXVS record containing the source type of a pivot cache.
Definition: xipivot.cxx:1637
const XclImpPTField * GetField(sal_uInt16 nFieldIdx) const
Definition: xipivot.cxx:1259
XclPTInfo maPTInfo
Pivot cache containing field/item names.
Definition: xipivot.hxx:346
ScfUInt16Vec maColFields
Row field indexes.
Definition: xipivot.hxx:355
XclPTViewEx9Info maPTViewEx9Info
Extended info about the pivot table (SXEX record).
Definition: xipivot.hxx:348
void ReadSxview(XclImpStream &rStrm)
Reads an SXVIEW record starting a new pivot table.
Definition: xipivot.cxx:1287
XclImpPivotCacheRef mxPCache
Definition: xipivot.hxx:344
void ReadSxex(XclImpStream &rStrm)
Reads an SXEX record containing additional settings for the pivot table.
Definition: xipivot.cxx:1394
const ScfStringVec & GetVisFieldNames() const
Definition: xipivot.hxx:301
const XclImpPivotCacheRef & GetPivotCache() const
Definition: xipivot.hxx:300
void MaybeRefresh()
Definition: xipivot.cxx:1500
ScRange maOutScRange
Special data field orientation field.
Definition: xipivot.hxx:360
ScfUInt16Vec maFiltDataFields
Original data field indexes.
Definition: xipivot.hxx:358
virtual ~XclImpPivotTable() override
Definition: xipivot.cxx:1248
ScfStringVec maVisFieldNames
Current field for importing additional info.
Definition: xipivot.hxx:353
ScfUInt16Vec maOrigDataFields
Page field indexes.
Definition: xipivot.hxx:357
sal_uInt16 GetFieldCount() const
Definition: xipivot.cxx:1254
void ReadSxvi(XclImpStream &rStrm)
Reads an SXVI record describing a new item of the current field.
Definition: xipivot.cxx:1316
XclImpPTField maDataOrientField
Filtered data field indexes.
Definition: xipivot.hxx:359
ScfUInt16Vec maPageFields
Column field indexes.
Definition: xipivot.hxx:356
XclImpPTField * GetFieldAcc(sal_uInt16 nFieldIdx)
Definition: xipivot.cxx:1265
void ReadSxvdex(XclImpStream &rStrm)
Reads an SXVDEX record describing extended options of the current field.
Definition: xipivot.cxx:1322
XclImpPivotTable(const XclImpRoot &rRoot)
Definition: xipivot.cxx:1241
void ReadSxViewEx9(XclImpStream &rStrm)
Reads an SXVIEWEX9 record that specifies the pivot tables autoformat.
Definition: xipivot.cxx:1399
ScDPObject * mpDPObj
Output range in the Calc document.
Definition: xipivot.hxx:361
XclImpPTFieldRef mxCurrField
Vector containing all fields.
Definition: xipivot.hxx:352
OUString GetDataFieldName(sal_uInt16 nDataFieldIdx) const
Definition: xipivot.cxx:1278
ScfUInt16Vec maRowFields
Vector containing all visible field names.
Definition: xipivot.hxx:354
void ReadSxivd(XclImpStream &rStrm)
Reads an SXIVD record containing the row field or column field order.
Definition: xipivot.cxx:1328
void ReadSxAddl(XclImpStream &rStrm)
Reads an SXADDL record that specifies additional info for pivot table.
Definition: xipivot.cxx:1404
XclPTExtInfo maPTExtInfo
General info about the pivot table (SXVIEW record).
Definition: xipivot.hxx:347
void Convert()
Inserts the pivot table into the Calc document.
Definition: xipivot.cxx:1409
void ReadSxdi(XclImpStream &rStrm)
Reads an SXDI record containing data field data.
Definition: xipivot.cxx:1378
void ApplyFieldInfo()
Definition: xipivot.cxx:1584
XclPTAddl maPTAddlInfo
(SXVIEWEX9 record)
Definition: xipivot.hxx:349
const XclImpPTField * GetDataField(sal_uInt16 nDataFieldIdx) const
Definition: xipivot.cxx:1271
void ReadSxvd(XclImpStream &rStrm)
Reads an SXVD record describing a new field.
Definition: xipivot.cxx:1298
void ReadSxpi(XclImpStream &rStrm)
Reads an SXPI record containing page field data.
Definition: xipivot.cxx:1360
void ApplyMergeFlags(const ScRange &rOutRange, const ScDPSaveData &rSaveData)
Definition: xipivot.cxx:1511
std::vector< XclImpPTFieldRef > maFields
Definition: xipivot.hxx:351
Access to global data from other classes.
Definition: xiroot.hxx:129
This class is used to import record oriented streams.
Definition: xistream.hxx:278
Represents a field in a pivot cache.
Definition: xlpivot.hxx:477
Represents a data item of any type in a pivot cache.
Definition: xlpivot.hxx:367
::std::vector< OUString > ScfStringVec
Definition: ftools.hxx:258
::std::vector< sal_uInt16 > ScfUInt16Vec
Definition: ftools.hxx:255
void SvStream & rStrm
Contains data for a pivot cache (SXDB record).
Definition: xlpivot.hxx:526
Additional pivot table settings (SXADDL record).
Definition: xlpivot.hxx:767
Contains data for a pivot table data field (SXDI record).
Definition: xlpivot.hxx:673
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 mnAxes
Definition: xlpivot.hxx:593
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
sal_Int16 SCCOL
Definition: types.hxx:21
sal_Int32 SCROW
Definition: types.hxx:17
std::shared_ptr< XclImpPTField > XclImpPTFieldRef
Definition: xipivot.hxx:290
std::shared_ptr< XclImpPivotCache > XclImpPivotCacheRef
Definition: xipivot.hxx:191
std::shared_ptr< XclImpPCField > XclImpPCFieldRef
Definition: xipivot.hxx:140
std::shared_ptr< XclImpPTItem > XclImpPTItemRef
Definition: xipivot.hxx:218
std::shared_ptr< XclImpPCItem > XclImpPCItemRef
Definition: xipivot.hxx:58
std::shared_ptr< XclImpPivotTable > XclImpPivotTableRef
Definition: xipivot.hxx:364