LibreOffice Module sc (master)  1
xlpivot.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_XLPIVOT_HXX
21 #define INCLUDED_SC_SOURCE_FILTER_INC_XLPIVOT_HXX
22 
23 #include <com/sun/star/sheet/DataPilotFieldOrientation.hpp>
24 #include <tools/datetime.hxx>
25 #include "ftools.hxx"
26 #include "xladdress.hxx"
27 #include <dpobject.hxx>
28 
29 #include <optional>
30 
31 class XclImpStream;
32 class XclExpStream;
33 enum class ScGeneralFunction;
34 
35 // Constants and Enumerations =================================================
36 
37 // misc -----------------------------------------------------------------------
38 
39 #define EXC_STORAGE_PTCACHE "_SX_DB_CUR"
40 
41 // strings
42 const sal_uInt16 EXC_PT_NOSTRING = 0xFFFF;
43 const sal_uInt16 EXC_PT_MAXSTRLEN = 0xFFFE;
44 
45 // pivot cache fields
46 const size_t EXC_PC_MAXFIELDCOUNT = 0xFFFE;
47 const sal_uInt16 EXC_PC_NOFIELD = 0xFFFF;
48 const sal_Int32 EXC_PC_MAXSTRLEN = 255;
49 
50 // pivot cache items
51 const size_t EXC_PC_MAXITEMCOUNT = 32500;
52 const sal_uInt16 EXC_PC_NOITEM = 0xFFFF;
53 
54 // pivot table fields
55 const sal_uInt16 EXC_PT_MAXFIELDCOUNT = 0xFFFE;
57 const sal_uInt16 EXC_PT_MAXPAGECOUNT = 256;
58 const sal_uInt16 EXC_PT_MAXDATACOUNT = 256;
59 
60 // pivot table items
61 const sal_uInt16 EXC_PT_MAXITEMCOUNT = 32500;
62 
63 const sal_uInt16 EXC_PT_AUTOFMT_HEADER = 0x810;
64 const sal_uInt16 EXC_PT_AUTOFMT_ZERO = 0;
65 const sal_uInt32 EXC_PT_AUTOFMT_FLAGS = 0x20;
66 
69 {
78 };
79 
82 {
90 };
91 
92 // (0x0051,0x0052) DCONREF, DCONNAME ------------------------------------------
93 
94 const sal_uInt16 EXC_ID_DCONREF = 0x0051;
95 const sal_uInt16 EXC_ID_DCONNAME = 0x0052;
96 
97 // (0x00B0) SXVIEW ------------------------------------------------------------
98 
99 const sal_uInt16 EXC_ID_SXVIEW = 0x00B0;
100 
101 const sal_uInt16 EXC_SXVIEW_ROWGRAND = 0x0001;
102 const sal_uInt16 EXC_SXVIEW_COLGRAND = 0x0002;
103 const sal_uInt16 EXC_SXVIEW_DEFAULTFLAGS = 0x0208;
104 
105 const sal_uInt16 EXC_SXVIEW_DATALAST = 0xFFFF;
106 const sal_uInt16 EXC_SXVIEW_AUTOFMT = 0x0001;
107 
108 // (0x00B1) SXVD --------------------------------------------------------------
109 const sal_uInt16 EXC_ID_SXVD = 0x00B1;
110 
111 const sal_uInt16 EXC_SXVD_AXIS_NONE = 0x0000;
112 const sal_uInt16 EXC_SXVD_AXIS_ROW = 0x0001;
113 const sal_uInt16 EXC_SXVD_AXIS_COL = 0x0002;
114 const sal_uInt16 EXC_SXVD_AXIS_PAGE = 0x0004;
115 const sal_uInt16 EXC_SXVD_AXIS_DATA = 0x0008;
118 
119 const sal_uInt16 EXC_SXVD_SUBT_NONE = 0x0000;
120 const sal_uInt16 EXC_SXVD_SUBT_DEFAULT = 0x0001;
121 const sal_uInt16 EXC_SXVD_SUBT_SUM = 0x0002;
122 const sal_uInt16 EXC_SXVD_SUBT_COUNT = 0x0004;
123 const sal_uInt16 EXC_SXVD_SUBT_AVERAGE = 0x0008;
124 const sal_uInt16 EXC_SXVD_SUBT_MAX = 0x0010;
125 const sal_uInt16 EXC_SXVD_SUBT_MIN = 0x0020;
126 const sal_uInt16 EXC_SXVD_SUBT_PROD = 0x0040;
127 const sal_uInt16 EXC_SXVD_SUBT_COUNTNUM = 0x0080;
128 const sal_uInt16 EXC_SXVD_SUBT_STDDEV = 0x0100;
129 const sal_uInt16 EXC_SXVD_SUBT_STDDEVP = 0x0200;
130 const sal_uInt16 EXC_SXVD_SUBT_VAR = 0x0400;
131 const sal_uInt16 EXC_SXVD_SUBT_VARP = 0x0800;
132 
134 
135 // (0x00B2) SXVI --------------------------------------------------------------
136 const sal_uInt16 EXC_ID_SXVI = 0x00B2;
137 
138 const sal_uInt16 EXC_SXVI_TYPE_PAGE = 0x00FE;
139 const sal_uInt16 EXC_SXVI_TYPE_NULL = 0x00FF;
140 const sal_uInt16 EXC_SXVI_TYPE_DATA = 0x0000;
141 const sal_uInt16 EXC_SXVI_TYPE_DEFAULT = 0x0001;
142 const sal_uInt16 EXC_SXVI_TYPE_SUM = 0x0002;
143 const sal_uInt16 EXC_SXVI_TYPE_COUNT = 0x0003;
144 const sal_uInt16 EXC_SXVI_TYPE_AVERAGE = 0x0004;
145 const sal_uInt16 EXC_SXVI_TYPE_MAX = 0x0005;
146 const sal_uInt16 EXC_SXVI_TYPE_MIN = 0x0006;
147 const sal_uInt16 EXC_SXVI_TYPE_PROD = 0x0007;
148 const sal_uInt16 EXC_SXVI_TYPE_COUNTNUM = 0x0008;
149 const sal_uInt16 EXC_SXVI_TYPE_STDDEV = 0x0009;
150 const sal_uInt16 EXC_SXVI_TYPE_STDDEVP = 0x000A;
151 const sal_uInt16 EXC_SXVI_TYPE_VAR = 0x000B;
152 const sal_uInt16 EXC_SXVI_TYPE_VARP = 0x000C;
153 const sal_uInt16 EXC_SXVI_TYPE_GRAND = 0x000D;
154 
155 const sal_uInt16 EXC_SXVI_DEFAULTFLAGS = 0x0000;
156 const sal_uInt16 EXC_SXVI_HIDDEN = 0x0001;
157 const sal_uInt16 EXC_SXVI_HIDEDETAIL = 0x0002;
158 const sal_uInt16 EXC_SXVI_FORMULA = 0x0004;
159 const sal_uInt16 EXC_SXVI_MISSING = 0x0008;
160 
162 
163 // (0x00B4) SXIVD -------------------------------------------------------------
164 const sal_uInt16 EXC_ID_SXIVD = 0x00B4;
165 const sal_uInt16 EXC_SXIVD_DATA = 0xFFFE;
166 
167 // (0x00B5) SXLI --------------------------------------------------------------
168 const sal_uInt16 EXC_ID_SXLI = 0x00B5;
169 const sal_uInt16 EXC_SXLI_DEFAULTFLAGS = 0x0000;
170 
171 // (0x00B6) SXPI --------------------------------------------------------------
172 const sal_uInt16 EXC_ID_SXPI = 0x00B6;
173 const sal_uInt16 EXC_SXPI_ALLITEMS = 0x7FFD;
174 
175 // (0x00C5) SXDI --------------------------------------------------------------
176 const sal_uInt16 EXC_ID_SXDI = 0x00C5;
177 
178 const sal_uInt16 EXC_SXDI_FUNC_SUM = 0x0000;
179 const sal_uInt16 EXC_SXDI_FUNC_COUNT = 0x0001;
180 const sal_uInt16 EXC_SXDI_FUNC_AVERAGE = 0x0002;
181 const sal_uInt16 EXC_SXDI_FUNC_MAX = 0x0003;
182 const sal_uInt16 EXC_SXDI_FUNC_MIN = 0x0004;
183 const sal_uInt16 EXC_SXDI_FUNC_PRODUCT = 0x0005;
184 const sal_uInt16 EXC_SXDI_FUNC_COUNTNUM = 0x0006;
185 const sal_uInt16 EXC_SXDI_FUNC_STDDEV = 0x0007;
186 const sal_uInt16 EXC_SXDI_FUNC_STDDEVP = 0x0008;
187 const sal_uInt16 EXC_SXDI_FUNC_VAR = 0x0009;
188 const sal_uInt16 EXC_SXDI_FUNC_VARP = 0x000A;
189 
190 const sal_uInt16 EXC_SXDI_REF_NORMAL = 0x0000;
191 const sal_uInt16 EXC_SXDI_REF_DIFF = 0x0001;
192 const sal_uInt16 EXC_SXDI_REF_PERC = 0x0002;
193 const sal_uInt16 EXC_SXDI_REF_PERC_DIFF = 0x0003;
194 const sal_uInt16 EXC_SXDI_REF_RUN_TOTAL = 0x0004;
195 const sal_uInt16 EXC_SXDI_REF_PERC_ROW = 0x0005;
196 const sal_uInt16 EXC_SXDI_REF_PERC_COL = 0x0006;
197 const sal_uInt16 EXC_SXDI_REF_PERC_TOTAL = 0x0007;
198 const sal_uInt16 EXC_SXDI_REF_INDEX = 0x0008;
199 
200 const sal_uInt16 EXC_SXDI_PREVITEM = 0x7FFB;
201 const sal_uInt16 EXC_SXDI_NEXTITEM = 0x7FFC;
202 
203 // (0x00C6) SXDB --------------------------------------------------------------
204 const sal_uInt16 EXC_ID_SXDB = 0x00C6;
205 
206 const sal_uInt16 EXC_SXDB_SAVEDATA = 0x0001;
207 const sal_uInt16 EXC_SXDB_INVALID = 0x0002;
208 const sal_uInt16 EXC_SXDB_REFRESH_LOAD = 0x0004;
209 const sal_uInt16 EXC_SXDB_OPT_CACHE = 0x0008;
210 const sal_uInt16 EXC_SXDB_BG_QUERY = 0x0010;
211 const sal_uInt16 EXC_SXDB_ENABLE_REFRESH = 0x0020;
213 
214 const sal_uInt16 EXC_SXDB_BLOCKRECS = 0x1FFF;
215 
216 const sal_uInt16 EXC_SXDB_SRC_SHEET = 0x0001;
217 const sal_uInt16 EXC_SXDB_SRC_EXTERN = 0x0002;
218 const sal_uInt16 EXC_SXDB_SRC_CONSOLID = 0x0004;
219 const sal_uInt16 EXC_SXDB_SRC_SCENARIO = 0x0008;
220 
221 // (0x00C7) SXFIELD -----------------------------------------------------------
222 const sal_uInt16 EXC_ID_SXFIELD = 0x00C7;
223 
224 const sal_uInt16 EXC_SXFIELD_HASITEMS = 0x0001;
225 const sal_uInt16 EXC_SXFIELD_POSTPONE = 0x0002;
226 const sal_uInt16 EXC_SXFIELD_CALCED = 0x0004;
227 const sal_uInt16 EXC_SXFIELD_HASCHILD = 0x0008;
228 const sal_uInt16 EXC_SXFIELD_NUMGROUP = 0x0010;
229 const sal_uInt16 EXC_SXFIELD_16BIT = 0x0200;
230 
231 const sal_uInt16 EXC_SXFIELD_DATA_MASK = 0x0DE0;
232 // known data types
233 const sal_uInt16 EXC_SXFIELD_DATA_NONE = 0x0000;
234 const sal_uInt16 EXC_SXFIELD_DATA_STR = 0x0480;
235 const sal_uInt16 EXC_SXFIELD_DATA_INT = 0x0520;
236 const sal_uInt16 EXC_SXFIELD_DATA_DBL = 0x0560;
237 const sal_uInt16 EXC_SXFIELD_DATA_STR_INT = 0x05A0;
238 const sal_uInt16 EXC_SXFIELD_DATA_STR_DBL = 0x05E0;
239 const sal_uInt16 EXC_SXFIELD_DATA_DATE = 0x0900;
240 const sal_uInt16 EXC_SXFIELD_DATA_DATE_EMP = 0x0980;
241 const sal_uInt16 EXC_SXFIELD_DATA_DATE_NUM = 0x0D00;
242 const sal_uInt16 EXC_SXFIELD_DATA_DATE_STR = 0x0D80;
243 
244 const sal_uInt16 EXC_SXFIELD_INDEX_MIN = 0;
245 const sal_uInt16 EXC_SXFIELD_INDEX_MAX = 1;
246 const sal_uInt16 EXC_SXFIELD_INDEX_STEP = 2;
247 
248 // (0x00C8) SXINDEXLIST -------------------------------------------------------
249 const sal_uInt16 EXC_ID_SXINDEXLIST = 0x00C8;
250 
251 // (0x00C9) SXDOUBLE ----------------------------------------------------------
252 const sal_uInt16 EXC_ID_SXDOUBLE = 0x00C9;
253 
254 // (0x00CA) SXBOOLEAN ---------------------------------------------------------
255 const sal_uInt16 EXC_ID_SXBOOLEAN = 0x00CA;
256 
257 // (0x00CB) SXERROR -----------------------------------------------------------
258 const sal_uInt16 EXC_ID_SXERROR = 0x00CB;
259 
260 // (0x00CC) SXINTEGER ---------------------------------------------------------
261 const sal_uInt16 EXC_ID_SXINTEGER = 0x00CC;
262 
263 // (0x00CD) SXSTRING ----------------------------------------------------------
264 const sal_uInt16 EXC_ID_SXSTRING = 0x00CD;
265 
266 // (0x00CE) SXDATETIME --------------------------------------------------------
267 const sal_uInt16 EXC_ID_SXDATETIME = 0x00CE;
268 
269 // (0x00CF) SXEMPTY -----------------------------------------------------------
270 const sal_uInt16 EXC_ID_SXEMPTY = 0x00CF;
271 
272 // (0x00D5) SXIDSTM -----------------------------------------------------------
273 const sal_uInt16 EXC_ID_SXIDSTM = 0x00D5;
274 
275 // (0x00D8) SXNUMGROUP --------------------------------------------------------
276 const sal_uInt16 EXC_ID_SXNUMGROUP = 0x00D8;
277 
278 const sal_uInt16 EXC_SXNUMGROUP_AUTOMIN = 0x0001;
279 const sal_uInt16 EXC_SXNUMGROUP_AUTOMAX = 0x0002;
280 
281 const sal_uInt16 EXC_SXNUMGROUP_TYPE_SEC = 1;
282 const sal_uInt16 EXC_SXNUMGROUP_TYPE_MIN = 2;
283 const sal_uInt16 EXC_SXNUMGROUP_TYPE_HOUR = 3;
284 const sal_uInt16 EXC_SXNUMGROUP_TYPE_DAY = 4;
285 const sal_uInt16 EXC_SXNUMGROUP_TYPE_MONTH = 5;
286 const sal_uInt16 EXC_SXNUMGROUP_TYPE_QUART = 6;
287 const sal_uInt16 EXC_SXNUMGROUP_TYPE_YEAR = 7;
288 const sal_uInt16 EXC_SXNUMGROUP_TYPE_NUM = 8;
289 
290 // (0x00D9) SXGROUPINFO -------------------------------------------------------
291 const sal_uInt16 EXC_ID_SXGROUPINFO = 0x00D9;
292 
293 // (0x00DC) SXEXT -------------------------------------------------------------
294 const sal_uInt16 EXC_ID_SXEXT = 0x00DC;
295 
296 // (0x00E3) SXVS --------------------------------------------------------------
297 const sal_uInt16 EXC_ID_SXVS = 0x00E3;
298 
299 const sal_uInt16 EXC_SXVS_UNKNOWN = 0x0000;
300 const sal_uInt16 EXC_SXVS_SHEET = 0x0001;
301 const sal_uInt16 EXC_SXVS_EXTERN = 0x0002;
302 const sal_uInt16 EXC_SXVS_CONSOLID = 0x0004;
303 const sal_uInt16 EXC_SXVS_PIVOTTAB = 0x0008;
304 const sal_uInt16 EXC_SXVS_SCENARIO = 0x0010;
305 
306 // (0x00F0) SXRULE ------------------------------------------------------------
307 const sal_uInt16 EXC_ID_SXRULE = 0x00F0;
308 
309 // (0x00F1) SXEX --------------------------------------------------------------
310 const sal_uInt16 EXC_ID_SXEX = 0x00F1;
311 
312 const sal_uInt32 EXC_SXEX_DRILLDOWN = 0x00020000;
313 const sal_uInt32 EXC_SXEX_DEFAULTFLAGS = 0x004F0200;
314 
315 // (0x00F2) SXFILT ------------------------------------------------------------
316 const sal_uInt16 EXC_ID_SXFILT = 0x00F2;
317 
318 // (0x00F5) -------------------------------------------------------------------
319 const sal_uInt16 EXC_ID_00F5 = 0x00F5;
320 
321 // (0x00F6) SXNAME ------------------------------------------------------------
322 const sal_uInt16 EXC_ID_SXNAME = 0x00F6;
323 
324 // (0x00F8) SXPAIR ------------------------------------------------------------
325 const sal_uInt16 EXC_ID_SXPAIR = 0x00F8;
326 
327 // (0x00F9) SXFMLA ------------------------------------------------------------
328 const sal_uInt16 EXC_ID_SXFMLA = 0x00F9;
329 
330 // (0x0100) SXVDEX ------------------------------------------------------------
331 const sal_uInt16 EXC_ID_SXVDEX = 0x0100;
332 
333 const sal_uInt32 EXC_SXVDEX_SHOWALL = 0x00000001;
334 const sal_uInt32 EXC_SXVDEX_SORT = 0x00000200;
335 const sal_uInt32 EXC_SXVDEX_SORT_ASC = 0x00000400;
336 const sal_uInt32 EXC_SXVDEX_AUTOSHOW = 0x00000800;
337 const sal_uInt32 EXC_SXVDEX_AUTOSHOW_ASC = 0x00001000;
338 const sal_uInt32 EXC_SXVDEX_LAYOUT_REPORT = 0x00200000;
339 const sal_uInt32 EXC_SXVDEX_LAYOUT_BLANK = 0x00400000;
340 const sal_uInt32 EXC_SXVDEX_LAYOUT_TOP = 0x00800000;
342 
343 const sal_uInt16 EXC_SXVDEX_SORT_OWN = 0xFFFF;
344 const sal_uInt16 EXC_SXVDEX_SHOW_NONE = 0xFFFF;
345 const sal_uInt16 EXC_SXVDEX_FORMAT_NONE = 0x0000;
346 
347 // (0x0103) SXFORMULA ---------------------------------------------------------
348 const sal_uInt16 EXC_ID_SXFORMULA = 0x0103;
349 
350 // (0x0122) SXDBEX ------------------------------------------------------------
351 const sal_uInt16 EXC_ID_SXDBEX = 0x0122;
352 const double EXC_SXDBEX_CREATION_DATE = 51901.029652778;
353 
354 // (0x01BB) SXFDBTYPE ---------------------------------------------------------
355 const sal_uInt16 EXC_ID_SXFDBTYPE = 0x01BB;
356 const sal_uInt16 EXC_SXFDBTYPE_DEFAULT = 0x0000;
357 
358 // (0x0810) SXVIEWEX9 ---------------------------------------------------------
359 const sal_uInt16 EXC_ID_SXVIEWEX9 = 0x0810;
360 
361 // (0x0864) SXADDL ("Pivot Table Additional Info") ----------------------------
362 const sal_uInt16 EXC_ID_SXADDL = 0x0864;
363 
364 // Pivot cache
365 
368 {
369 public:
370  explicit XclPCItem();
371  virtual ~XclPCItem();
372 
373  XclPCItem(XclPCItem const &) = default;
374  XclPCItem(XclPCItem &&) = default;
375  XclPCItem & operator =(XclPCItem const &) = default;
376  XclPCItem & operator =(XclPCItem &&) = default;
377 
379  void SetEmpty();
381  void SetText( const OUString& rText );
383  void SetDouble( double fValue, const OUString& rText = OUString() );
385  void SetDateTime( const DateTime& rDateTime, const OUString& rText = OUString() );
387  void SetInteger( sal_Int16 nValue );
389  void SetError( sal_uInt16 nError );
391  void SetBool( bool bValue, const OUString& rText = OUString() );
392 
394  const OUString& ConvertToText() const { return maText; }
395 
397  bool IsEqual( const XclPCItem& rItem ) const;
398 
400  bool IsEmpty() const;
402  const OUString* GetText() const;
404  const double* GetDouble() const;
406  const DateTime* GetDateTime() const;
408  const sal_Int16* GetInteger() const;
410  const sal_uInt16* GetError() const;
412  const bool* GetBool() const;
413 
415  XclPCItemType GetType() const;
416 
417 private:
419  OUString maText;
421  union
422  {
423  double mfValue;
424  sal_Int16 mnValue;
425  sal_uInt16 mnError;
426  bool mbValue;
427  };
428 };
429 
430 inline bool operator==( const XclPCItem& rLeft, const XclPCItem& rRight ) { return rLeft.IsEqual( rRight ); }
431 inline bool operator!=( const XclPCItem& rLeft, const XclPCItem& rRight ) { return !(rLeft == rRight); }
432 
433 // Field settings =============================================================
434 
437 {
438  OUString maName;
439  sal_uInt16 mnFlags;
440  sal_uInt16 mnGroupChild;
441  sal_uInt16 mnGroupBase;
442  sal_uInt16 mnVisItems;
443  sal_uInt16 mnGroupItems;
444  sal_uInt16 mnBaseItems;
445  sal_uInt16 mnOrigItems;
446 
447  explicit XclPCFieldInfo();
448 };
449 
451 XclExpStream& operator<<( XclExpStream& rStrm, const XclPCFieldInfo& rInfo );
452 
453 // Numeric grouping field settings ============================================
454 
457 {
458  sal_uInt16 mnFlags;
459 
460  explicit XclPCNumGroupInfo();
461 
462  void SetNumType();
463 
464  sal_Int32 GetScDateType() const;
465  void SetScDateType( sal_Int32 nScType );
466 
467  sal_uInt16 GetXclDataType() const;
468  void SetXclDataType( sal_uInt16 nXclType );
469 };
470 
472 XclExpStream& operator<<( XclExpStream& rStrm, const XclPCNumGroupInfo& rInfo );
473 
474 // Base class for pivot cache fields ==========================================
475 
478 {
479 public:
480  explicit XclPCField( XclPCFieldType eFieldType, sal_uInt16 nFieldIdx );
481  virtual ~XclPCField();
482 
484  sal_uInt16 GetFieldIndex() const { return mnFieldIdx; }
485 
487  bool IsSupportedField() const;
488 
490  bool IsStandardField() const;
491 
493  bool IsStdGroupField() const;
495  bool IsNumGroupField() const;
497  bool IsDateGroupField() const;
499  bool IsGroupField() const;
500 
502  bool IsGroupBaseField() const;
504  bool IsGroupChildField() const;
505 
507  bool HasOrigItems() const;
509  bool HasInlineItems() const;
511  bool HasPostponedItems() const;
513  bool Has16BitIndexes() const;
514 
515 protected:
518  sal_uInt16 mnFieldIdx;
521 };
522 
523 // Pivot cache settings =======================================================
524 
526 struct XclPCInfo
527 {
528  sal_uInt32 mnSrcRecs;
529  sal_uInt16 mnStrmId;
530  sal_uInt16 mnFlags;
531  sal_uInt16 mnBlockRecs;
532  sal_uInt16 mnStdFields;
533  sal_uInt16 mnTotalFields;
534  sal_uInt16 mnSrcType;
535  OUString maUserName;
536 
537  explicit XclPCInfo();
538 };
539 
540 XclImpStream& operator>>( XclImpStream& rStrm, XclPCInfo& rInfo );
541 XclExpStream& operator<<( XclExpStream& rStrm, const XclPCInfo& rInfo );
542 
543 // Pivot table
544 
545 // cached name ================================================================
546 
549 {
550  OUString maName;
551  bool mbUseCache;
552 
553  explicit XclPTCachedName() : mbUseCache( true ) {}
554 };
555 
556 XclImpStream& operator>>( XclImpStream& rStrm, XclPTCachedName& rCachedName );
557 XclExpStream& operator<<( XclExpStream& rStrm, const XclPTCachedName& rCachedName );
558 
561 {
563 
565  bool HasVisName() const { return !maVisName.mbUseCache; }
567  const OUString* GetVisName() const;
569  void SetVisName( const OUString& rName );
570 };
571 
572 // Field item settings ========================================================
573 
576 {
577  sal_uInt16 mnType;
578  sal_uInt16 mnFlags;
579  sal_uInt16 mnCacheIdx;
580 
581  explicit XclPTItemInfo();
582 };
583 
585 XclExpStream& operator<<( XclExpStream& rStrm, const XclPTItemInfo& rInfo );
586 
587 // General field settings =====================================================
588 
589 typedef ::std::vector< ScGeneralFunction > XclPTSubtotalVec;
590 
593 {
594  sal_uInt16 mnAxes;
595  sal_uInt16 mnSubtCount;
596  sal_uInt16 mnSubtotals;
597  sal_uInt16 mnItemCount;
598  sal_uInt16 mnCacheIdx;
599 
600  explicit XclPTFieldInfo();
601 
605  css::sheet::DataPilotFieldOrientation GetApiOrient( sal_uInt16 nMask ) const;
607  void AddApiOrient( css::sheet::DataPilotFieldOrientation eOrient );
608 
610  void GetSubtotals( XclPTSubtotalVec& rSubtotals ) const;
612  void SetSubtotals( const XclPTSubtotalVec& rSubtotals );
613 };
614 
616 XclExpStream& operator<<( XclExpStream& rStrm, const XclPTFieldInfo& rInfo );
617 
618 // Extended field settings ====================================================
619 
622 {
623  sal_uInt32 mnFlags;
624  sal_uInt16 mnSortField;
625  sal_uInt16 mnShowField;
626  sal_uInt16 mnNumFmt;
627  std::optional<OUString> mpFieldTotalName;
628 
629  explicit XclPTFieldExtInfo();
630 
632  sal_Int32 GetApiSortMode() const;
634  void SetApiSortMode( sal_Int32 nSortMode );
635 
637  sal_Int32 GetApiAutoShowMode() const;
639  void SetApiAutoShowMode( sal_Int32 nShowMode );
640 
642  sal_Int32 GetApiAutoShowCount() const;
644  void SetApiAutoShowCount( sal_Int32 nShowCount );
645 
647  sal_Int32 GetApiLayoutMode() const;
649  void SetApiLayoutMode( sal_Int32 nLayoutMode );
650 };
651 
653 XclExpStream& operator<<( XclExpStream& rStrm, const XclPTFieldExtInfo& rInfo );
654 
655 // Page field settings ========================================================
656 
659 {
660  sal_uInt16 mnField;
661  sal_uInt16 mnSelItem;
662  sal_uInt16 mnObjId;
663 
664  explicit XclPTPageFieldInfo();
665 };
666 
668 XclExpStream& operator<<( XclExpStream& rStrm, const XclPTPageFieldInfo& rInfo );
669 
670 // Data field settings ========================================================
671 
674 {
675  sal_uInt16 mnField;
676  sal_uInt16 mnAggFunc;
677  sal_uInt16 mnRefType;
678  sal_uInt16 mnRefField;
679  sal_uInt16 mnRefItem;
680  sal_uInt16 mnNumFmt;
681 
682  explicit XclPTDataFieldInfo();
683 
687  void SetApiAggFunc( ScGeneralFunction eAggFunc );
688 
690  sal_Int32 GetApiRefType() const;
692  void SetApiRefType( sal_Int32 nRefType );
693 
695  sal_Int32 GetApiRefItemType() const;
697  void SetApiRefItemType( sal_Int32 nRefItemType );
698 };
699 
701 XclExpStream& operator<<( XclExpStream& rStrm, const XclPTDataFieldInfo& rInfo );
702 
703 // Pivot table settings =======================================================
704 
706 struct XclPTInfo
707 {
708  OUString maTableName;
709  OUString maDataName;
712  sal_uInt16 mnFirstHeadRow;
713  sal_uInt16 mnCacheIdx;
714  sal_uInt16 mnDataAxis;
715  sal_uInt16 mnDataPos;
716  sal_uInt16 mnFields;
717  sal_uInt16 mnRowFields;
718  sal_uInt16 mnColFields;
719  sal_uInt16 mnPageFields;
720  sal_uInt16 mnDataFields;
721  sal_uInt16 mnDataRows;
722  sal_uInt16 mnDataCols;
723  sal_uInt16 mnFlags;
724  sal_uInt16 mnAutoFmtIdx;
725 
726  explicit XclPTInfo();
727 };
728 
729 XclImpStream& operator>>( XclImpStream& rStrm, XclPTInfo& rInfo );
730 XclExpStream& operator<<( XclExpStream& rStrm, const XclPTInfo& rInfo );
731 
732 // Extended pivot table settings ==============================================
733 
736 {
737  sal_uInt16 mnSxformulaRecs;
738  sal_uInt16 mnSxselectRecs;
739  sal_uInt16 mnPagePerRow;
740  sal_uInt16 mnPagePerCol;
741  sal_uInt32 mnFlags;
742 
743  explicit XclPTExtInfo();
744 };
745 
747 XclExpStream& operator<<( XclExpStream& rStrm, const XclPTExtInfo& rInfo );
748 
749 // Pivot table autoformat settings ==============================================
750 
753 {
754  sal_uInt32 mbReport;
758 
759  explicit XclPTViewEx9Info();
760  void Init( const ScDPObject& rDPObj );
761 };
762 
764 XclExpStream& operator<<( XclExpStream& rStrm, const XclPTViewEx9Info& rInfo );
765 
767 struct XclPTAddl
768 {
770  explicit XclPTAddl();
771 };
772 
774 
775 #endif
776 
777 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const sal_uInt16 EXC_PC_NOFIELD
Definition: xlpivot.hxx:47
sal_uInt32 mnFlags
Definition: xlpivot.hxx:623
const sal_uInt16 EXC_SXDI_REF_RUN_TOTAL
Definition: xlpivot.hxx:194
XclPCItemType meType
Definition: xlpivot.hxx:418
sal_uInt16 mnRefItem
Index to SXVD of referred field used for the results.
Definition: xlpivot.hxx:679
void SetApiLayoutMode(sal_Int32 nLayoutMode)
Sets the layout mode represented by the passed API constant.
Definition: xlpivot.cxx:625
const sal_uInt32 EXC_SXVDEX_SORT
Definition: xlpivot.hxx:334
bool IsStdGroupField() const
Returns true, if this field is a grouping field.
Definition: xlpivot.cxx:303
XclPTInfo()
Index to pivot table autoformat.
Definition: xlpivot.cxx:834
const sal_uInt16 EXC_SXVDEX_FORMAT_NONE
Definition: xlpivot.hxx:345
const sal_uInt16 EXC_ID_SXPI
Definition: xlpivot.hxx:172
const sal_uInt16 EXC_SXFIELD_16BIT
Definition: xlpivot.hxx:229
sal_uInt16 mnRefType
Data aggregation function.
Definition: xlpivot.hxx:677
sal_uInt16 mnFlags
Type of the item (e.g. data, function, grand total).
Definition: xlpivot.hxx:578
const sal_uInt32 EXC_SXVDEX_LAYOUT_BLANK
Definition: xlpivot.hxx:339
A name for various pivot table info structs.
Definition: xlpivot.hxx:548
const sal_uInt16 EXC_SXDI_FUNC_STDDEVP
Definition: xlpivot.hxx:186
const size_t EXC_PC_MAXFIELDCOUNT
Definition: xlpivot.hxx:46
XclPTFieldInfo()
Index into cache for field name (not part of record).
Definition: xlpivot.cxx:460
bool IsGroupField() const
Returns true, if this field is a grouping field of any type.
Definition: xlpivot.cxx:318
const sal_uInt16 EXC_SXFIELD_DATA_DBL
Only integers, opt. with doubles.
Definition: xlpivot.hxx:236
const sal_uInt16 EXC_ID_00F5
Definition: xlpivot.hxx:319
XclPCInfo()
Name of user who last modified the cache.
Definition: xlpivot.cxx:356
void SetApiAggFunc(ScGeneralFunction eAggFunc)
Sets the aggregation function represented by the passed API enum.
Definition: xlpivot.cxx:731
const double * GetDouble() const
Returns pointer to value, if the item type is 'double', otherwise 0.
Definition: xlpivot.cxx:140
const sal_uInt16 EXC_SXFIELD_DATA_NONE
Definition: xlpivot.hxx:233
const OUString * GetVisName() const
Returns the name, if set explicitly (maVisName.mbUseCache is false).
Definition: xlpivot.cxx:420
Pivot table autoformat settings (SXVIEWEX9 record).
Definition: xlpivot.hxx:752
const sal_uInt16 EXC_ID_SXIVD
Definition: xlpivot.hxx:164
const sal_uInt16 EXC_PT_AUTOFMT_ZERO
Definition: xlpivot.hxx:64
void SetScDateType(sal_Int32 nScType)
Definition: xlpivot.cxx:242
const sal_uInt16 EXC_SXVS_EXTERN
Definition: xlpivot.hxx:301
const sal_uInt16 EXC_SXNUMGROUP_TYPE_QUART
Definition: xlpivot.hxx:286
const sal_uInt16 EXC_SXDI_FUNC_STDDEV
Definition: xlpivot.hxx:185
const sal_uInt16 EXC_SXVIEW_DEFAULTFLAGS
Definition: xlpivot.hxx:103
std::optional< OUString > mpFieldTotalName
Definition: xlpivot.hxx:627
const sal_uInt16 EXC_SXDB_SRC_EXTERN
Definition: xlpivot.hxx:217
const sal_uInt16 EXC_SXNUMGROUP_TYPE_MIN
Definition: xlpivot.hxx:282
This class is used to export Excel record streams.
Definition: xestream.hxx:71
sal_uInt16 mnSrcType
Number of all fields (standard, grouped, calculated).
Definition: xlpivot.hxx:534
const sal_uInt32 EXC_SXVDEX_AUTOSHOW
Definition: xlpivot.hxx:336
XclPTViewEx9Info()
classic : 10 08 00 00 00 00 00 00 20 00 00 00 01 00 00 00 00 default : 10 08 00 00 00 00 00 00 20 00 ...
Definition: xlpivot.cxx:969
XclPCFieldType
Specifies the type of a pivot cache field.
Definition: xlpivot.hxx:81
void SetError(sal_uInt16 nError)
Sets the item to 'error' type and adds the passed Excel error code.
Definition: xlpivot.cxx:88
bool mbUseCache
The visible name, if used.
Definition: xlpivot.hxx:551
const sal_uInt16 EXC_ID_SXVS
Definition: xlpivot.hxx:297
const sal_uInt16 EXC_SXDB_BG_QUERY
Definition: xlpivot.hxx:210
sal_uInt16 mnAggFunc
Base field for this data info.
Definition: xlpivot.hxx:676
sal_uInt16 mnCacheIdx
Number of items of this field.
Definition: xlpivot.hxx:598
sal_uInt16 mnRefField
Result reference type.
Definition: xlpivot.hxx:678
const sal_uInt16 EXC_SXPI_ALLITEMS
Definition: xlpivot.hxx:173
Extended information about a pivot table (SXEX record).
Definition: xlpivot.hxx:735
const sal_uInt16 EXC_SXDI_PREVITEM
Definition: xlpivot.hxx:200
const sal_uInt16 EXC_SXVI_HIDDEN
Definition: xlpivot.hxx:156
const sal_uInt16 EXC_SXVI_TYPE_STDDEVP
Definition: xlpivot.hxx:150
sal_Int32 GetApiLayoutMode() const
Returns the API constant representing the layout mode.
Definition: xlpivot.cxx:616
const sal_uInt16 EXC_SXNUMGROUP_TYPE_YEAR
Definition: xlpivot.hxx:287
void SetDateTime(const DateTime &rDateTime, const OUString &rText=OUString())
Sets the item to 'date/time' type and adds the passed date.
Definition: xlpivot.cxx:74
Contains data for a pivot cache field (SXFIELD record).
Definition: xlpivot.hxx:436
sal_uInt8 mnAutoFormat
2 for report* fmts ?
Definition: xlpivot.hxx:755
const sal_uInt32 EXC_SXVDEX_LAYOUT_TOP
Definition: xlpivot.hxx:340
const bool * GetBool() const
Returns pointer to Boolean value, if the item type is 'boolean', otherwise 0.
Definition: xlpivot.cxx:160
bool operator==(const XclPCItem &rLeft, const XclPCItem &rRight)
Definition: xlpivot.hxx:430
sal_Int16 mnValue
Value of a floating-point item.
Definition: xlpivot.hxx:424
const sal_uInt16 EXC_SXVI_DEFAULTFLAGS
Definition: xlpivot.hxx:155
sal_uInt16 mnColFields
Number of row fields.
Definition: xlpivot.hxx:718
XclPCItem()
Definition: xlpivot.cxx:45
void SetApiRefItemType(sal_Int32 nRefItemType)
Sets the result reference item type represented by the passed API constant.
Definition: xlpivot.cxx:798
XclPCItem & operator=(XclPCItem const &)=default
const sal_uInt16 EXC_SXVD_AXIS_ROWCOLPAGE
Definition: xlpivot.hxx:117
const sal_uInt16 EXC_SXFIELD_DATA_DATE
Only strings and doubles, nothing else.
Definition: xlpivot.hxx:239
sal_uInt16 mnFieldIdx
Type of this pivot cache field.
Definition: xlpivot.hxx:518
const sal_uInt16 EXC_ID_SXRULE
Definition: xlpivot.hxx:307
XclImpStream & operator>>(XclImpStream &rStrm, XclPCFieldInfo &rInfo)
Definition: xlpivot.cxx:183
sal_uInt16 mnCacheIdx
Several flags.
Definition: xlpivot.hxx:579
const sal_uInt16 EXC_SXFIELD_DATA_DATE_EMP
Only dates, nothing else.
Definition: xlpivot.hxx:240
virtual ~XclPCItem()
Definition: xlpivot.cxx:51
sal_uInt16 mnGroupItems
Number of visible items for this field.
Definition: xlpivot.hxx:443
Numeric grouping field.
Definition: xlpivot.hxx:86
void SetText(const OUString &rText)
Sets the item to 'text' type and adds the passed text.
Definition: xlpivot.cxx:61
void GetSubtotals(XclPTSubtotalVec &rSubtotals) const
Returns a vector of all set subtotal functions.
Definition: xlpivot.cxx:499
const sal_uInt16 EXC_SXVD_AXIS_COL
Definition: xlpivot.hxx:113
DateTime maDateTime
Text representation of the item.
Definition: xlpivot.hxx:420
XclAddress maDataXclPos
Output range.
Definition: xlpivot.hxx:711
const sal_uInt16 EXC_PT_NOSTRING
Definition: xlpivot.hxx:42
Standard field without grouping.
Definition: xlpivot.hxx:84
void SetSubtotals(const XclPTSubtotalVec &rSubtotals)
Sets the subtotal functions contained in the passed sequence.
Definition: xlpivot.cxx:518
const sal_uInt16 EXC_SXVDEX_SHOW_NONE
Definition: xlpivot.hxx:344
const sal_uInt16 EXC_ID_SXINDEXLIST
List index for step item in groupings.
Definition: xlpivot.hxx:249
sal_uInt16 mnGroupChild
Various flags.
Definition: xlpivot.hxx:440
const sal_uInt16 EXC_SXDI_REF_PERC_TOTAL
Definition: xlpivot.hxx:197
const sal_uInt16 EXC_SXDI_REF_PERC_DIFF
Definition: xlpivot.hxx:193
Represents a field in a pivot cache.
Definition: xlpivot.hxx:477
const sal_uInt16 EXC_ID_DCONNAME
Definition: xlpivot.hxx:95
void SetBool(bool bValue, const OUString &rText=OUString())
Sets the item to 'boolean' type and adds the passed Boolean value.
Definition: xlpivot.cxx:106
void Init(const ScDPObject &rDPObj)
Definition: xlpivot.cxx:976
void SetApiSortMode(sal_Int32 nSortMode)
Sets the sorting mode represented by the passed API constant.
Definition: xlpivot.cxx:587
sal_uInt16 mnFlags
Number of columns containing data.
Definition: xlpivot.hxx:723
sal_uInt16 mnVisItems
Base field if this field contains grouping info.
Definition: xlpivot.hxx:442
const sal_uInt16 EXC_SXVI_TYPE_DATA
Definition: xlpivot.hxx:140
sal_Int32 GetApiSortMode() const
Returns the API constant representing the sorting mode.
Definition: xlpivot.cxx:579
const sal_uInt16 EXC_SXVD_SUBT_COUNTNUM
Definition: xlpivot.hxx:127
const sal_uInt16 EXC_ID_SXLI
Definition: xlpivot.hxx:168
const sal_uInt16 EXC_SXVD_SUBT_STDDEV
Definition: xlpivot.hxx:128
const sal_uInt16 EXC_SXVD_SUBT_DEFAULT
Definition: xlpivot.hxx:120
sal_uInt32 mbReport
Definition: xlpivot.hxx:754
const sal_uInt16 EXC_SXVI_HIDEDETAIL
Definition: xlpivot.hxx:157
XclPTDataFieldInfo()
Number format of the results.
Definition: xlpivot.cxx:700
ScGeneralFunction GetApiAggFunc() const
Returns the API enum representing the aggregation function.
Definition: xlpivot.cxx:710
Base struct for named info structs.
Definition: xlpivot.hxx:560
sal_uInt16 mnFields
Position of data fields.
Definition: xlpivot.hxx:716
const sal_uInt16 EXC_ID_SXGROUPINFO
Definition: xlpivot.hxx:291
Special state, not used in Excel files.
Definition: xlpivot.hxx:71
ScfUInt16Vec maGroupOrder
Own field index in pivot cache.
Definition: xlpivot.hxx:519
const sal_uInt16 EXC_SXFIELD_INDEX_STEP
List index for maximum item in groupings.
Definition: xlpivot.hxx:246
const sal_uInt16 EXC_SXDI_FUNC_MIN
Definition: xlpivot.hxx:182
const sal_uInt16 EXC_SXDI_FUNC_VAR
Definition: xlpivot.hxx:187
const sal_uInt16 EXC_PT_MAXDATACOUNT
Definition: xlpivot.hxx:58
Contains data for a numeric grouping field (SXNUMGROUP record).
Definition: xlpivot.hxx:456
const sal_uInt16 EXC_SXVI_TYPE_VARP
Definition: xlpivot.hxx:152
const sal_uInt16 EXC_SXVS_SHEET
Definition: xlpivot.hxx:300
sal_uInt16 mnSubtCount
Flags for axes this field is part of.
Definition: xlpivot.hxx:595
const sal_uInt32 EXC_PT_AUTOFMT_FLAGS
Definition: xlpivot.hxx:65
const sal_uInt16 EXC_PT_MAXITEMCOUNT
Definition: xlpivot.hxx:61
const sal_uInt16 EXC_SXDB_DEFAULTFLAGS
Definition: xlpivot.hxx:212
sal_uInt16 mnStdFields
Records in a source database block.
Definition: xlpivot.hxx:532
const sal_uInt16 EXC_SXVI_TYPE_DEFAULT
Definition: xlpivot.hxx:141
Contains extended data for a pivot table field (SXVDEX record).
Definition: xlpivot.hxx:621
sal_uInt16 mnDataRows
Number of data fields.
Definition: xlpivot.hxx:721
const sal_uInt16 EXC_SXVS_CONSOLID
Definition: xlpivot.hxx:302
const sal_uInt16 EXC_SXVI_TYPE_PAGE
Definition: xlpivot.hxx:138
const sal_uInt16 EXC_SXVD_AXIS_DATA
Definition: xlpivot.hxx:115
const sal_uInt16 EXC_SXFIELD_INDEX_MAX
List index for minimum item in groupings.
Definition: xlpivot.hxx:245
void AddApiOrient(css::sheet::DataPilotFieldOrientation eOrient)
Adds the axis orientation represented by the passed API enum.
Definition: xlpivot.cxx:485
sal_uInt16 mnDataFields
Number of page fields.
Definition: xlpivot.hxx:720
const sal_uInt16 EXC_PC_NOITEM
Definition: xlpivot.hxx:52
const sal_uInt16 EXC_SXNUMGROUP_TYPE_HOUR
Definition: xlpivot.hxx:283
const sal_uInt16 EXC_SXNUMGROUP_TYPE_DAY
Definition: xlpivot.hxx:284
String data.
Definition: xlpivot.hxx:73
const sal_uInt16 EXC_ID_SXNAME
Unknown record.
Definition: xlpivot.hxx:322
16-bit integer value.
Definition: xlpivot.hxx:76
const sal_uInt32 EXC_SXVDEX_LAYOUT_REPORT
Definition: xlpivot.hxx:338
const sal_uInt16 EXC_SXNUMGROUP_AUTOMAX
Definition: xlpivot.hxx:279
sal_uInt16 mnCacheIdx
First heading row.
Definition: xlpivot.hxx:713
sal_uInt16 mnShowField
Index to data field sorting bases on.
Definition: xlpivot.hxx:625
sal_Int32 GetScDateType() const
Definition: xlpivot.cxx:225
const sal_uInt16 EXC_ID_SXEXT
Definition: xlpivot.hxx:294
sal_uInt16 mnGroupBase
Field containing grouping info for this field.
Definition: xlpivot.hxx:441
const sal_uInt32 EXC_SXEX_DRILLDOWN
Definition: xlpivot.hxx:312
OUString maGrandTotalName
0 == gridlayout, 0x10 == modern
Definition: xlpivot.hxx:757
const sal_uInt16 EXC_SXVD_SUBT_NONE
Definition: xlpivot.hxx:119
Contains data for a pivot table page field (part of SXPI record).
Definition: xlpivot.hxx:658
Standard grouping field.
Definition: xlpivot.hxx:85
void SetInteger(sal_Int16 nValue)
Sets the item to 'integer' type and adds the passed value.
Definition: xlpivot.cxx:81
sal_uInt16 mnNumFmt
Index to SXVI of referred item of the used field.
Definition: xlpivot.hxx:680
First date grouping field (opt. with child grouping field).
Definition: xlpivot.hxx:87
const sal_uInt16 EXC_SXDI_NEXTITEM
Definition: xlpivot.hxx:201
sal_uInt16 mnField
Definition: xlpivot.hxx:660
XclPTCachedName maVisName
Definition: xlpivot.hxx:562
::std::vector< ScGeneralFunction > XclPTSubtotalVec
Definition: xlpivot.hxx:589
const sal_uInt16 EXC_SXNUMGROUP_TYPE_NUM
Definition: xlpivot.hxx:288
const sal_uInt16 EXC_SXVD_SUBT_MIN
Definition: xlpivot.hxx:125
const DateTime * GetDateTime() const
Returns pointer to date, if the item type is 'date/time', otherwise 0.
Definition: xlpivot.cxx:145
sal_uInt16 mnStrmId
Records in source database.
Definition: xlpivot.hxx:529
const sal_uInt16 EXC_SXDI_REF_INDEX
Definition: xlpivot.hxx:198
const OUString * GetText() const
Returns pointer to text, if the item type is 'text', otherwise 0.
Definition: xlpivot.cxx:135
sal_uInt16 mnPagePerRow
Number of SXSELECT records.
Definition: xlpivot.hxx:739
const sal_uInt16 EXC_ID_SXSTRING
Definition: xlpivot.hxx:264
const sal_uInt16 EXC_ID_SXDATETIME
Definition: xlpivot.hxx:267
Floating-point value.
Definition: xlpivot.hxx:74
Contains data for a pivot table field (SXVD record).
Definition: xlpivot.hxx:592
const sal_uInt16 EXC_SXVD_SUBT_SUM
Definition: xlpivot.hxx:121
const size_t EXC_PC_MAXITEMCOUNT
Definition: xlpivot.hxx:51
sal_uInt16 mnFlags
Definition: xlpivot.hxx:458
void SetXclDataType(sal_uInt16 nXclType)
Definition: xlpivot.cxx:265
const sal_uInt16 EXC_SXFIELD_NUMGROUP
Definition: xlpivot.hxx:228
const sal_uInt16 EXC_SXVIEW_DATALAST
Definition: xlpivot.hxx:105
const sal_uInt16 EXC_SXFDBTYPE_DEFAULT
Definition: xlpivot.hxx:356
const sal_uInt16 EXC_SXDI_FUNC_COUNTNUM
Definition: xlpivot.hxx:184
const sal_uInt16 EXC_SXDB_SRC_SCENARIO
Definition: xlpivot.hxx:219
const sal_uInt32 EXC_SXEX_DEFAULTFLAGS
Definition: xlpivot.hxx:313
const sal_uInt16 EXC_SXDI_REF_NORMAL
Definition: xlpivot.hxx:190
sal_uInt16 mnOrigItems
Number of items in the base field.
Definition: xlpivot.hxx:445
const sal_uInt16 EXC_SXDB_REFRESH_LOAD
Definition: xlpivot.hxx:208
const sal_uInt16 EXC_SXFIELD_HASCHILD
Definition: xlpivot.hxx:227
sal_uInt16 mnFlags
Stream identifier.
Definition: xlpivot.hxx:530
void SetApiAutoShowCount(sal_Int32 nShowCount)
Sets the number of items to be shown in AutoShow mode.
Definition: xlpivot.cxx:611
const sal_uInt16 EXC_SXVDEX_SORT_OWN
Definition: xlpivot.hxx:343
bool HasVisName() const
The displayed name of the item.
Definition: xlpivot.hxx:565
const sal_uInt16 EXC_SXFIELD_HASITEMS
Definition: xlpivot.hxx:224
const sal_uInt16 EXC_SXDI_FUNC_COUNT
Definition: xlpivot.hxx:179
sal_uInt32 mnSrcRecs
Definition: xlpivot.hxx:528
Additional date grouping field.
Definition: xlpivot.hxx:88
const sal_uInt16 EXC_ID_SXFMLA
Definition: xlpivot.hxx:328
const sal_uInt16 EXC_SXFIELD_CALCED
Definition: xlpivot.hxx:226
sal_uInt16 mnBlockRecs
Flags for the cache.
Definition: xlpivot.hxx:531
const sal_uInt16 EXC_SXDB_SAVEDATA
Definition: xlpivot.hxx:206
const sal_uInt16 EXC_ID_SXVI
Definition: xlpivot.hxx:136
bool IsEmpty() const
Returns true, if the item type is 'empty'.
Definition: xlpivot.cxx:130
const double EXC_SXDBEX_CREATION_DATE
Definition: xlpivot.hxx:352
const sal_uInt16 EXC_SXVI_TYPE_GRAND
Definition: xlpivot.hxx:153
const sal_uInt16 EXC_SXNUMGROUP_AUTOMIN
Definition: xlpivot.hxx:278
sal_uInt16 GetXclDataType() const
Definition: xlpivot.cxx:260
const sal_uInt16 EXC_SXDI_FUNC_MAX
Definition: xlpivot.hxx:181
const sal_uInt16 EXC_SXVIEW_COLGRAND
Definition: xlpivot.hxx:102
const sal_uInt16 EXC_ID_SXDOUBLE
Definition: xlpivot.hxx:252
sal_uInt16 mnSubtotals
Number of subtotal functions.
Definition: xlpivot.hxx:596
const sal_uInt16 EXC_ID_SXINTEGER
Definition: xlpivot.hxx:261
sal_uInt16 mnDataCols
Number of rows containing data.
Definition: xlpivot.hxx:722
const sal_uInt16 EXC_SXNUMGROUP_TYPE_MONTH
Definition: xlpivot.hxx:285
XclPCField(XclPCFieldType eFieldType, sal_uInt16 nFieldIdx)
Definition: xlpivot.cxx:283
const sal_uInt16 EXC_SXVD_SUBT_VAR
Definition: xlpivot.hxx:130
sal_uInt16 mnSelItem
Base field for this page info.
Definition: xlpivot.hxx:661
const sal_uInt16 EXC_ID_SXEMPTY
Definition: xlpivot.hxx:270
sal_uInt16 mnRowFields
Number of all fields.
Definition: xlpivot.hxx:717
sal_uInt16 mnPageFields
Number of column fields.
Definition: xlpivot.hxx:719
Contains data for a pivot table data item (SXVI record).
Definition: xlpivot.hxx:575
Calculated field.
Definition: xlpivot.hxx:89
sal_uInt16 mnSortField
Several flags and number of items for AutoShow.
Definition: xlpivot.hxx:624
const sal_uInt16 EXC_SXFIELD_DATA_DATE_STR
Dates with integers or doubles without strings.
Definition: xlpivot.hxx:242
const sal_uInt16 EXC_ID_SXDB
Definition: xlpivot.hxx:204
sal_uInt16 mnType
Definition: xlpivot.hxx:577
const sal_uInt16 EXC_ID_SXDBEX
Definition: xlpivot.hxx:351
void SetEmpty()
Sets the item to 'empty' type.
Definition: xlpivot.cxx:55
const sal_uInt16 EXC_SXVD_SUBT_AVERAGE
Definition: xlpivot.hxx:123
const sal_Int16 * GetInteger() const
Returns pointer to integer, if the item type is 'integer', otherwise 0.
Definition: xlpivot.cxx:150
sal_uInt16 mnDataPos
Orientation of data fields.
Definition: xlpivot.hxx:715
const sal_uInt16 EXC_SXDI_REF_PERC_ROW
Definition: xlpivot.hxx:195
const sal_uInt16 EXC_SXDI_FUNC_PRODUCT
Definition: xlpivot.hxx:183
const sal_uInt16 EXC_ID_SXIDSTM
Definition: xlpivot.hxx:273
sal_Int32 GetApiRefItemType() const
Returns the API constant representing the result reference item type.
Definition: xlpivot.cxx:786
const sal_uInt16 EXC_SXVD_AXIS_ROWCOL
Definition: xlpivot.hxx:116
Contains data for a pivot table data field (SXDI record).
Definition: xlpivot.hxx:673
XclPCItemType
Data type of a pivot cache item.
Definition: xlpivot.hxx:68
A 2D cell address struct with Excel column and row indexes.
Definition: xladdress.hxx:30
XclPTPageFieldInfo()
Escher object ID of dropdown listbox.
Definition: xlpivot.cxx:675
bool mbCompactMode
Definition: xlpivot.hxx:769
const sal_uInt32 EXC_SXVDEX_AUTOSHOW_ASC
Definition: xlpivot.hxx:337
XclPCItemType GetType() const
Returns the type of the item.
Definition: xlpivot.cxx:165
const sal_uInt16 EXC_SXFIELD_DATA_INT
Only strings, nothing else.
Definition: xlpivot.hxx:235
const sal_uInt16 EXC_ID_SXFORMULA
Definition: xlpivot.hxx:348
bool IsGroupChildField() const
Returns true, if this field is a child field in a grouping (it has a base field). ...
Definition: xlpivot.cxx:328
Empty cell.
Definition: xlpivot.hxx:72
const sal_uInt16 EXC_SXDI_FUNC_AVERAGE
Definition: xlpivot.hxx:180
const sal_uInt32 EXC_SXVDEX_SORT_ASC
Definition: xlpivot.hxx:335
const sal_uInt16 EXC_SXVI_TYPE_STDDEV
Definition: xlpivot.hxx:149
XclPCNumGroupInfo()
Various flags.
Definition: xlpivot.cxx:214
sal_uInt16 GetFieldIndex() const
Returns the index of this field in the containing pivot cache.
Definition: xlpivot.hxx:484
const sal_uInt16 EXC_SXVD_AXIS_PAGE
Definition: xlpivot.hxx:114
XclPTExtInfo()
Flags for the entire pivot table.
Definition: xlpivot.cxx:905
XclRange maOutXclRange
The visible name of the data field.
Definition: xlpivot.hxx:710
OUString maName
Definition: xlpivot.hxx:550
const sal_uInt16 EXC_ID_DCONREF
Definition: xlpivot.hxx:94
bool IsStandardField() const
Returns true, if this is a standard field build directly from source data.
Definition: xlpivot.cxx:298
const sal_uInt16 EXC_SXVS_PIVOTTAB
Definition: xlpivot.hxx:303
const sal_uInt16 EXC_SXVD_DEFAULT_CACHE
Definition: xlpivot.hxx:133
const sal_uInt16 EXC_SXVI_TYPE_SUM
Definition: xlpivot.hxx:142
Boolean value.
Definition: xlpivot.hxx:77
bool Has16BitIndexes() const
Returns true, if the item indexes in the SXINDEXLIST record are stored as 16-bit values.
Definition: xlpivot.cxx:348
sal_uInt16 mnTotalFields
Number of standard pivot cache fields.
Definition: xlpivot.hxx:533
const sal_uInt16 EXC_SXDB_SRC_CONSOLID
Definition: xlpivot.hxx:218
XclPTCachedName()
true = Use name in cache instead of maName.
Definition: xlpivot.hxx:553
bool IsGroupBaseField() const
Returns true, if this field has a child field in a grouping.
Definition: xlpivot.cxx:323
XclPCFieldInfo maFieldInfo
Definition: xlpivot.hxx:516
const sal_uInt16 EXC_ID_SXDI
Definition: xlpivot.hxx:176
const sal_uInt16 EXC_ID_SXVD
Definition: xlpivot.hxx:109
const sal_uInt16 EXC_SXVI_TYPE_PROD
Definition: xlpivot.hxx:147
sal_uInt16 mnPagePerCol
Number of page fields per row.
Definition: xlpivot.hxx:740
const sal_uInt16 EXC_SXFIELD_DATA_STR_INT
Only doubles, nothing else.
Definition: xlpivot.hxx:237
const sal_uInt16 EXC_ID_SXVIEW
Definition: xlpivot.hxx:99
virtual ~XclPCField()
Definition: xlpivot.cxx:289
const sal_uInt16 EXC_SXVD_SUBT_STDDEVP
Definition: xlpivot.hxx:129
OUString maDataName
The name of the pivot table.
Definition: xlpivot.hxx:709
const sal_uInt16 EXC_SXDI_FUNC_SUM
Definition: xlpivot.hxx:178
const sal_uInt32 EXC_SXVDEX_DEFAULTFLAGS
Definition: xlpivot.hxx:341
const sal_uInt16 EXC_SXDI_REF_DIFF
Definition: xlpivot.hxx:191
::std::vector< sal_uInt16 > ScfUInt16Vec
Definition: ftools.hxx:253
const sal_uInt16 EXC_ID_SXBOOLEAN
Definition: xlpivot.hxx:255
const sal_uInt16 EXC_SXVI_TYPE_NULL
Definition: xlpivot.hxx:139
sal_uInt16 mnSxformulaRecs
Definition: xlpivot.hxx:737
Contains data for a pivot cache (SXDB record).
Definition: xlpivot.hxx:526
const sal_uInt16 * GetError() const
Returns pointer to error code, if the item type is 'error', otherwise 0.
Definition: xlpivot.cxx:155
const sal_uInt16 EXC_PT_MAXFIELDCOUNT
Definition: xlpivot.hxx:55
unsigned char sal_uInt8
const sal_uInt16 EXC_SXFIELD_DATA_STR_DBL
Only strings and integers, opt. with doubles.
Definition: xlpivot.hxx:238
XclExpStream & operator<<(XclExpStream &rStrm, const XclPCFieldInfo &rInfo)
Definition: xlpivot.cxx:199
const sal_uInt16 EXC_SXIVD_DATA
Definition: xlpivot.hxx:165
ScGeneralFunction
the css::sheet::GeneralFunction enum is extended by constants in GeneralFunction2, which causes some type-safety issues.
const sal_uInt16 EXC_SXVD_SUBT_MAX
Definition: xlpivot.hxx:124
const sal_uInt16 EXC_SXFIELD_POSTPONE
Definition: xlpivot.hxx:225
const sal_uInt16 EXC_SXVI_TYPE_COUNT
Definition: xlpivot.hxx:143
sal_Int32 GetApiRefType() const
Returns the API constant representing the result reference type.
Definition: xlpivot.cxx:750
const sal_uInt16 EXC_ID_SXFILT
Definition: xlpivot.hxx:316
Contains data for a pivot table (SXVIEW record).
Definition: xlpivot.hxx:706
const sal_uInt16 EXC_ID_SXPAIR
Definition: xlpivot.hxx:325
const OUString & ConvertToText() const
Returns the text representation of the item.
Definition: xlpivot.hxx:394
const sal_uInt16 EXC_PT_MAXROWCOLCOUNT
Definition: xlpivot.hxx:56
sal_uInt16 mnFlags
Name of the pivot cache field.
Definition: xlpivot.hxx:439
const sal_uInt16 EXC_PT_MAXSTRLEN
Definition: xlpivot.hxx:43
bool operator!=(const XclPCItem &rLeft, const XclPCItem &rRight)
Definition: xlpivot.hxx:431
Additional pivot table settings (SXADDL record).
Definition: xlpivot.hxx:767
const sal_uInt16 EXC_SXVS_UNKNOWN
Definition: xlpivot.hxx:299
OUString maText
Type of the item.
Definition: xlpivot.hxx:419
const sal_uInt16 EXC_SXVI_TYPE_VAR
Definition: xlpivot.hxx:151
const sal_uInt16 EXC_ID_SXEX
Definition: xlpivot.hxx:310
const sal_uInt16 EXC_SXVI_DEFAULT_CACHE
Definition: xlpivot.hxx:161
sal_uInt16 mnObjId
Index to selected item.
Definition: xlpivot.hxx:662
const sal_uInt16 EXC_ID_SXNUMGROUP
Definition: xlpivot.hxx:276
Date/time.
Definition: xlpivot.hxx:75
css::sheet::DataPilotFieldOrientation GetApiOrient(sal_uInt16 nMask) const
Returns the API enum representing the orientation (first of row/col/page/data).
Definition: xlpivot.cxx:469
sal_uInt16 mnError
Value of an integer item.
Definition: xlpivot.hxx:425
sal_uInt16 mnSxselectRecs
Number of SXFORMULA records.
Definition: xlpivot.hxx:738
const sal_uInt32 EXC_SXVDEX_SHOWALL
Definition: xlpivot.hxx:333
const sal_uInt16 EXC_SXVI_TYPE_MIN
Definition: xlpivot.hxx:146
void SetApiRefType(sal_Int32 nRefType)
Sets the result reference type represented by the passed API constant.
Definition: xlpivot.cxx:769
const sal_uInt16 EXC_ID_SXADDL
Definition: xlpivot.hxx:362
const sal_uInt16 EXC_ID_SXFDBTYPE
Definition: xlpivot.hxx:355
void SetVisName(const OUString &rName)
Sets the visible name and enables usage of cache if name is empty.
Definition: xlpivot.cxx:425
bool HasPostponedItems() const
Returns true, if the items are stored separately after the last field.
Definition: xlpivot.cxx:343
bool IsDateGroupField() const
Returns true, if this field is a date/time grouping field.
Definition: xlpivot.cxx:313
const sal_uInt16 EXC_SXFIELD_INDEX_MIN
Dates and strings, opt. with integers or doubles.
Definition: xlpivot.hxx:244
const sal_uInt16 EXC_SXVD_AXIS_NONE
Definition: xlpivot.hxx:111
void SetApiAutoShowMode(sal_Int32 nShowMode)
Sets the AutoShow mode represented by the passed API constant.
Definition: xlpivot.cxx:601
bool HasOrigItems() const
Returns true, if the field is based on a column in the source data area.
Definition: xlpivot.cxx:333
const sal_uInt16 EXC_ID_SXFIELD
Definition: xlpivot.hxx:222
sal_Int32 GetApiAutoShowCount() const
Returns the number of items to be shown in AutoShow mode.
Definition: xlpivot.cxx:606
bool HasInlineItems() const
Returns true, if any items are stored after the SXFIELD record.
Definition: xlpivot.cxx:338
const sal_uInt16 EXC_SXVI_TYPE_MAX
Definition: xlpivot.hxx:145
const sal_uInt16 EXC_SXDB_ENABLE_REFRESH
Definition: xlpivot.hxx:211
const sal_uInt16 EXC_SXDB_OPT_CACHE
Definition: xlpivot.hxx:209
XclPCNumGroupInfo maNumGroupInfo
Order of items in a grouping field (SXGROUPINFO record).
Definition: xlpivot.hxx:520
XclPCFieldInfo()
Number of original source data items.
Definition: xlpivot.cxx:172
bool mbValue
Error code of an error item.
Definition: xlpivot.hxx:426
const sal_uInt16 EXC_SXVD_AXIS_ROW
Definition: xlpivot.hxx:112
const sal_uInt16 EXC_SXDB_SRC_SHEET
Definition: xlpivot.hxx:216
const sal_uInt16 EXC_SXDB_INVALID
Definition: xlpivot.hxx:207
bool IsNumGroupField() const
Returns true, if this field is a numeric grouping field.
Definition: xlpivot.cxx:308
sal_uInt16 mnField
Definition: xlpivot.hxx:675
OUString maTableName
Definition: xlpivot.hxx:708
const sal_uInt16 EXC_PT_MAXPAGECOUNT
Definition: xlpivot.hxx:57
const sal_uInt16 EXC_SXVIEW_AUTOFMT
Definition: xlpivot.hxx:106
const sal_uInt16 EXC_SXVD_SUBT_VARP
Definition: xlpivot.hxx:131
const sal_uInt16 EXC_SXDI_REF_PERC_COL
Definition: xlpivot.hxx:196
bool IsEqual(const XclPCItem &rItem) const
Returns true, if the passed term equals this item.
Definition: xlpivot.cxx:113
const sal_uInt16 EXC_SXNUMGROUP_TYPE_SEC
Definition: xlpivot.hxx:281
This class is used to import record oriented streams.
Definition: xistream.hxx:278
const sal_uInt16 EXC_ID_SXVDEX
Definition: xlpivot.hxx:331
const sal_uInt16 EXC_SXVIEW_ROWGRAND
Definition: xlpivot.hxx:101
void SetDouble(double fValue, const OUString &rText=OUString())
Sets the item to 'double' type and adds the passed value.
Definition: xlpivot.cxx:67
sal_uInt16 mnBaseItems
Number of special items in a grouping field.
Definition: xlpivot.hxx:444
const sal_uInt16 EXC_ID_SXERROR
Definition: xlpivot.hxx:258
const sal_uInt16 EXC_SXFIELD_DATA_STR
Special state for groupings.
Definition: xlpivot.hxx:234
XclPTItemInfo()
Index into cache for item name.
Definition: xlpivot.cxx:433
XclPCFieldType meFieldType
Pivot cache field info (SXFIELD record).
Definition: xlpivot.hxx:517
bool IsSupportedField() const
Returns true, if the type of the field is supported by Calc.
Definition: xlpivot.cxx:293
const sal_uInt16 EXC_SXFIELD_DATA_DATE_NUM
Dates and empty strings, nothing else (?).
Definition: xlpivot.hxx:241
OUString maName
Definition: xlpivot.hxx:438
const sal_uInt16 EXC_SXVI_TYPE_AVERAGE
Definition: xlpivot.hxx:144
const sal_uInt16 EXC_SXVD_SUBT_PROD
Definition: xlpivot.hxx:126
const sal_uInt16 EXC_SXVI_FORMULA
Definition: xlpivot.hxx:158
const sal_uInt16 EXC_SXVS_SCENARIO
Definition: xlpivot.hxx:304
const sal_uInt16 EXC_ID_SXVIEWEX9
Definition: xlpivot.hxx:359
sal_uInt32 mnFlags
Number of page fields per column.
Definition: xlpivot.hxx:741
const sal_uInt16 EXC_SXVI_MISSING
Definition: xlpivot.hxx:159
const sal_uInt16 EXC_SXDI_REF_PERC
Definition: xlpivot.hxx:192
const sal_uInt16 EXC_PT_AUTOFMT_HEADER
Definition: xlpivot.hxx:63
const sal_uInt16 EXC_SXVI_TYPE_COUNTNUM
Definition: xlpivot.hxx:148
const sal_uInt16 EXC_SXDB_BLOCKRECS
Definition: xlpivot.hxx:214
A 2D cell range address struct with Excel column and row indexes.
Definition: xladdress.hxx:58
const sal_uInt16 EXC_SXDI_FUNC_VARP
Definition: xlpivot.hxx:188
OUString maUserName
Database type.
Definition: xlpivot.hxx:535
const sal_Int32 EXC_PC_MAXSTRLEN
Definition: xlpivot.hxx:48
sal_uInt16 mnItemCount
Bitfield for subtotal functions.
Definition: xlpivot.hxx:597
sal_uInt16 mnAxes
Definition: xlpivot.hxx:594
sal_uInt16 mnFirstHeadRow
First cell containing data.
Definition: xlpivot.hxx:712
sal_Int16 nValue
const sal_uInt16 EXC_SXFIELD_DATA_MASK
Definition: xlpivot.hxx:231
const sal_uInt16 EXC_SXVD_SUBT_COUNT
Definition: xlpivot.hxx:122
double mfValue
Definition: xlpivot.hxx:423
const sal_uInt16 EXC_SXLI_DEFAULTFLAGS
Definition: xlpivot.hxx:169
sal_Int32 GetApiAutoShowMode() const
Returns the API constant representing the AutoShow mode.
Definition: xlpivot.cxx:595
sal_uInt16 mnAutoFmtIdx
Flags for the entire pivot table.
Definition: xlpivot.hxx:724
sal_uInt8 mnGridLayout
AutoFormat ID.
Definition: xlpivot.hxx:756
Represents a data item of any type in a pivot cache.
Definition: xlpivot.hxx:367
sal_uInt16 mnDataAxis
0-based index of the pivot cache.
Definition: xlpivot.hxx:714
sal_uInt16 mnNumFmt
Index to data field AutoShow bases on.
Definition: xlpivot.hxx:626