fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / sc / source / filter / xml / xmldpimp.hxx
blobff006f3245c4d14177d7c53b5403eeb81b86d8df
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_SC_SOURCE_FILTER_XML_XMLDPIMP_HXX
20 #define INCLUDED_SC_SOURCE_FILTER_XML_XMLDPIMP_HXX
22 #include <xmloff/xmlictxt.hxx>
23 #include <xmloff/xmlimp.hxx>
24 #include <com/sun/star/sheet/DataPilotFieldReference.hpp>
25 #include <com/sun/star/sheet/DataPilotFieldSortInfo.hpp>
26 #include <com/sun/star/sheet/DataPilotFieldAutoShowInfo.hpp>
27 #include <com/sun/star/sheet/DataPilotFieldLayoutInfo.hpp>
29 #include "global.hxx"
30 #include "dpobject.hxx"
31 #include "dpsave.hxx"
32 #include "queryparam.hxx"
33 #include "xmlimprt.hxx"
35 #include <unordered_map>
37 class ScDPSaveNumGroupDimension;
38 class ScDPSaveGroupDimension;
40 enum ScMySourceType
42 SQL,
43 TABLE,
44 QUERY,
45 SERVICE,
46 CELLRANGE
49 class ScXMLDataPilotTablesContext : public SvXMLImportContext
52 const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
53 ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
55 public:
57 ScXMLDataPilotTablesContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
58 const OUString& rLName,
59 const ::com::sun::star::uno::Reference<
60 ::com::sun::star::xml::sax::XAttributeList>& xAttrList);
62 virtual ~ScXMLDataPilotTablesContext();
64 virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
65 const OUString& rLocalName,
66 const ::com::sun::star::uno::Reference<
67 ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) SAL_OVERRIDE;
69 virtual void EndElement() SAL_OVERRIDE;
72 class ScXMLDataPilotTableContext : public SvXMLImportContext
74 typedef std::unordered_map<OUString, OUString, OUStringHash> SelectedPagesType;
76 struct GrandTotalItem
78 OUString maDisplayName;
79 bool mbVisible;
80 GrandTotalItem();
82 ScDocument* pDoc;
83 ScDPObject* pDPObject;
84 boost::scoped_ptr<ScDPSaveData> pDPSave;
85 ScDPDimensionSaveData* pDPDimSaveData;
86 GrandTotalItem maRowGrandTotal;
87 GrandTotalItem maColGrandTotal;
88 OUString sDataPilotTableName;
89 OUString sApplicationData;
90 OUString sDatabaseName;
91 OUString sSourceObject;
92 OUString sServiceName;
93 OUString sServiceSourceName;
94 OUString sServiceSourceObject;
95 OUString sServiceUsername;
96 OUString sServicePassword;
97 OUString sButtons;
98 OUString sSourceRangeName;
99 ScRange aSourceCellRangeAddress;
100 ScRange aTargetRangeAddress;
101 ScRange aFilterSourceRange;
102 ScAddress aFilterOutputPosition;
103 ScQueryParam aSourceQueryParam;
104 ScMySourceType nSourceType;
105 sal_uInt32 mnRowFieldCount;
106 sal_uInt32 mnColFieldCount;
107 sal_uInt32 mnPageFieldCount;
108 sal_uInt32 mnDataFieldCount;
109 sal_uInt16 mnDataLayoutType;
110 bool bIsNative:1;
111 bool bIgnoreEmptyRows:1;
112 bool bIdentifyCategories:1;
113 bool bTargetRangeAddress:1;
114 bool bSourceCellRange:1;
115 bool bShowFilter:1;
116 bool bDrillDown:1;
117 bool bHeaderGridLayout:1;
119 SelectedPagesType maSelectedPages;
121 const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
122 ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
124 public:
126 ScXMLDataPilotTableContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
127 const OUString& rLName,
128 const ::com::sun::star::uno::Reference<
129 ::com::sun::star::xml::sax::XAttributeList>& xAttrList);
131 virtual ~ScXMLDataPilotTableContext();
133 virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
134 const OUString& rLocalName,
135 const ::com::sun::star::uno::Reference<
136 ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) SAL_OVERRIDE;
138 virtual void EndElement() SAL_OVERRIDE;
140 void SetGrandTotal(::xmloff::token::XMLTokenEnum eOrientation, bool bVisible, const OUString& rDisplayName);
141 void SetDatabaseName(const OUString& sValue) { sDatabaseName = sValue; }
142 void SetSourceObject(const OUString& sValue) { sSourceObject = sValue; }
143 void SetNative(bool bValue) { bIsNative = bValue; }
144 void SetServiceName(const OUString& sValue) { sServiceName = sValue; }
145 void SetServiceSourceName(const OUString& sValue) { sServiceSourceName = sValue; }
146 void SetServiceSourceObject(const OUString& sValue) { sServiceSourceObject = sValue; }
147 void SetServiceUsername(const OUString& sValue) { sServiceUsername = sValue; }
148 void SetServicePassword(const OUString& sValue) { sServicePassword = sValue; }
149 void SetSourceRangeName(const OUString& sValue) { sSourceRangeName = sValue; bSourceCellRange = true; }
150 void SetSourceCellRangeAddress(const ScRange& aValue) { aSourceCellRangeAddress = aValue; bSourceCellRange = true; }
151 void SetSourceQueryParam(const ScQueryParam& aValue) { aSourceQueryParam = aValue; }
152 void SetFilterOutputPosition(const ScAddress& aValue) { aFilterOutputPosition = aValue; }
153 void SetFilterSourceRange(const ScRange& aValue) { aFilterSourceRange = aValue; }
154 void AddDimension(ScDPSaveDimension* pDim);
155 void AddGroupDim(const ScDPSaveNumGroupDimension& aNumGroupDim);
156 void AddGroupDim(const ScDPSaveGroupDimension& aGroupDim);
157 void SetButtons();
158 void SetSelectedPage( const OUString& rDimName, const OUString& rSelected );
161 class ScXMLDPSourceSQLContext : public SvXMLImportContext
163 ScXMLDataPilotTableContext* pDataPilotTable;
165 const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
166 ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
168 public:
170 ScXMLDPSourceSQLContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
171 const OUString& rLName,
172 const ::com::sun::star::uno::Reference<
173 ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
174 ScXMLDataPilotTableContext* pDataPilotTable);
176 virtual ~ScXMLDPSourceSQLContext();
178 virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
179 const OUString& rLocalName,
180 const ::com::sun::star::uno::Reference<
181 ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) SAL_OVERRIDE;
183 virtual void EndElement() SAL_OVERRIDE;
186 class ScXMLDPSourceTableContext : public SvXMLImportContext
188 ScXMLDataPilotTableContext* pDataPilotTable;
190 const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
191 ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
193 public:
195 ScXMLDPSourceTableContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
196 const OUString& rLName,
197 const ::com::sun::star::uno::Reference<
198 ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
199 ScXMLDataPilotTableContext* pDataPilotTable);
201 virtual ~ScXMLDPSourceTableContext();
203 virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
204 const OUString& rLocalName,
205 const ::com::sun::star::uno::Reference<
206 ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) SAL_OVERRIDE;
208 virtual void EndElement() SAL_OVERRIDE;
211 class ScXMLDPSourceQueryContext : public SvXMLImportContext
213 ScXMLDataPilotTableContext* pDataPilotTable;
215 const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
216 ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
218 public:
220 ScXMLDPSourceQueryContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
221 const OUString& rLName,
222 const ::com::sun::star::uno::Reference<
223 ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
224 ScXMLDataPilotTableContext* pDataPilotTable);
226 virtual ~ScXMLDPSourceQueryContext();
228 virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
229 const OUString& rLocalName,
230 const ::com::sun::star::uno::Reference<
231 ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) SAL_OVERRIDE;
233 virtual void EndElement() SAL_OVERRIDE;
236 class ScXMLSourceServiceContext : public SvXMLImportContext
238 ScXMLDataPilotTableContext* pDataPilotTable;
240 const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
241 ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
243 public:
245 ScXMLSourceServiceContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
246 const OUString& rLName,
247 const ::com::sun::star::uno::Reference<
248 ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
249 ScXMLDataPilotTableContext* pDataPilotTable);
251 virtual ~ScXMLSourceServiceContext();
253 virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
254 const OUString& rLocalName,
255 const ::com::sun::star::uno::Reference<
256 ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) SAL_OVERRIDE;
258 virtual void EndElement() SAL_OVERRIDE;
261 class ScXMLDataPilotGrandTotalContext : public SvXMLImportContext
263 enum Orientation { COLUMN, ROW, BOTH, NONE };
265 ScXMLImport& GetScImport();
267 ScXMLDataPilotTableContext* mpTableContext;
268 OUString maDisplayName;
269 Orientation meOrientation;
270 bool mbVisible;
272 public:
273 ScXMLDataPilotGrandTotalContext(
274 ScXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLName,
275 const ::com::sun::star::uno::Reference<
276 ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
277 ScXMLDataPilotTableContext* pTableContext );
279 virtual ~ScXMLDataPilotGrandTotalContext();
281 virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
282 const OUString& rLocalName,
283 const ::com::sun::star::uno::Reference<
284 ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) SAL_OVERRIDE;
286 virtual void EndElement() SAL_OVERRIDE;
289 class ScXMLSourceCellRangeContext : public SvXMLImportContext
291 ScXMLDataPilotTableContext* pDataPilotTable;
293 const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
294 ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
296 public:
298 ScXMLSourceCellRangeContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
299 const OUString& rLName,
300 const ::com::sun::star::uno::Reference<
301 ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
302 ScXMLDataPilotTableContext* pDataPilotTable);
304 virtual ~ScXMLSourceCellRangeContext();
306 virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
307 const OUString& rLocalName,
308 const ::com::sun::star::uno::Reference<
309 ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) SAL_OVERRIDE;
311 virtual void EndElement() SAL_OVERRIDE;
314 struct ScXMLDataPilotGroup
316 ::std::vector<OUString> aMembers;
317 OUString aName;
320 class ScXMLDataPilotFieldContext : public SvXMLImportContext
322 ScXMLDataPilotTableContext* pDataPilotTable;
323 ScDPSaveDimension* pDim;
325 ::std::vector<ScXMLDataPilotGroup> aGroups;
326 OUString sGroupSource;
327 OUString sSelectedPage;
328 OUString sName;
329 double fStart;
330 double fEnd;
331 double fStep;
332 sal_Int32 nUsedHierarchy;
333 sal_Int32 nGroupPart;
334 sal_Int16 nFunction;
335 sal_Int16 nOrientation;
336 bool bSelectedPage:1;
337 bool bIsGroupField:1;
338 bool bDateValue:1;
339 bool bAutoStart:1;
340 bool bAutoEnd:1;
341 bool mbHasHiddenMember:1;
343 const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
344 ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
346 public:
348 ScXMLDataPilotFieldContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
349 const OUString& rLName,
350 const ::com::sun::star::uno::Reference<
351 ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
352 ScXMLDataPilotTableContext* pDataPilotTable);
354 virtual ~ScXMLDataPilotFieldContext();
356 virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
357 const OUString& rLocalName,
358 const ::com::sun::star::uno::Reference<
359 ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) SAL_OVERRIDE;
361 virtual void EndElement() SAL_OVERRIDE;
363 void SetShowEmpty(const bool bValue) { if (pDim) pDim->SetShowEmpty(bValue); }
364 void SetRepeatItemLabels(const bool bSet) { if (pDim) pDim->SetRepeatItemLabels(bSet); }
365 void SetSubTotals(const sal_uInt16* pFunctions, const sal_Int16 nCount) { if(pDim) pDim->SetSubTotals(nCount, pFunctions); }
366 void AddMember(ScDPSaveMember* pMember);
367 void SetSubTotalName(const OUString& rName);
368 void SetFieldReference(const com::sun::star::sheet::DataPilotFieldReference& aRef) { if (pDim) pDim->SetReferenceValue(&aRef); }
369 void SetAutoShowInfo(const com::sun::star::sheet::DataPilotFieldAutoShowInfo& aInfo) { if (pDim) pDim->SetAutoShowInfo(&aInfo); }
370 void SetSortInfo(const com::sun::star::sheet::DataPilotFieldSortInfo& aInfo) { if (pDim) pDim->SetSortInfo(&aInfo); }
371 void SetLayoutInfo(const com::sun::star::sheet::DataPilotFieldLayoutInfo& aInfo) { if (pDim) pDim->SetLayoutInfo(&aInfo); }
372 void SetGrouping(const OUString& rGroupSource, const double& rStart, const double& rEnd, const double& rStep,
373 sal_Int32 nPart, bool bDate, bool bAutoSt, bool bAutoE)
375 bIsGroupField = true;
376 sGroupSource = rGroupSource;
377 fStart = rStart;
378 fEnd = rEnd;
379 fStep = rStep;
380 nGroupPart = nPart;
381 bDateValue = bDate;
382 bAutoStart = bAutoSt;
383 bAutoEnd = bAutoE;
385 void AddGroup(const ::std::vector<OUString>& rMembers, const OUString& rName);
388 class ScXMLDataPilotFieldReferenceContext : public SvXMLImportContext
390 // com::sun::star::sheet::DataPilotFieldReference aReference;
392 const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
393 ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
395 public:
397 ScXMLDataPilotFieldReferenceContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
398 const OUString& rLName,
399 const ::com::sun::star::uno::Reference<
400 ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
401 ScXMLDataPilotFieldContext* pDataPilotField);
403 virtual ~ScXMLDataPilotFieldReferenceContext();
406 class ScXMLDataPilotLevelContext : public SvXMLImportContext
408 ScXMLDataPilotFieldContext* pDataPilotField;
410 const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
411 ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
413 public:
415 ScXMLDataPilotLevelContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
416 const OUString& rLName,
417 const ::com::sun::star::uno::Reference<
418 ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
419 ScXMLDataPilotFieldContext* pDataPilotField);
421 virtual ~ScXMLDataPilotLevelContext();
423 virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
424 const OUString& rLocalName,
425 const ::com::sun::star::uno::Reference<
426 ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) SAL_OVERRIDE;
428 virtual void EndElement() SAL_OVERRIDE;
431 class ScXMLDataPilotDisplayInfoContext : public SvXMLImportContext
433 // com::sun::star::sheet::DataPilotFieldAutoShowInfo aInfo;
435 const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
436 ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
438 public:
440 ScXMLDataPilotDisplayInfoContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
441 const OUString& rLName,
442 const ::com::sun::star::uno::Reference<
443 ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
444 ScXMLDataPilotFieldContext* pDataPilotField);
446 virtual ~ScXMLDataPilotDisplayInfoContext();
449 class ScXMLDataPilotSortInfoContext : public SvXMLImportContext
451 // com::sun::star::sheet::DataPilotFieldSortInfo aInfo;
453 const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
454 ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
456 public:
458 ScXMLDataPilotSortInfoContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
459 const OUString& rLName,
460 const ::com::sun::star::uno::Reference<
461 ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
462 ScXMLDataPilotFieldContext* pDataPilotField);
464 virtual ~ScXMLDataPilotSortInfoContext();
467 class ScXMLDataPilotLayoutInfoContext : public SvXMLImportContext
469 // com::sun::star::sheet::DataPilotFieldLayoutInfo aInfo;
471 const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
472 ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
474 public:
476 ScXMLDataPilotLayoutInfoContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
477 const OUString& rLName,
478 const ::com::sun::star::uno::Reference<
479 ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
480 ScXMLDataPilotFieldContext* pDataPilotField);
482 virtual ~ScXMLDataPilotLayoutInfoContext();
485 class ScXMLDataPilotSubTotalsContext : public SvXMLImportContext
487 ScXMLDataPilotFieldContext* pDataPilotField;
489 sal_Int16 nFunctionCount;
490 sal_uInt16* pFunctions;
491 OUString maDisplayName;
493 const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
494 ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
496 public:
498 ScXMLDataPilotFieldContext* GetDataPilotField() { return pDataPilotField; }
500 ScXMLDataPilotSubTotalsContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
501 const OUString& rLName,
502 const ::com::sun::star::uno::Reference<
503 ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
504 ScXMLDataPilotFieldContext* pDataPilotField);
506 virtual ~ScXMLDataPilotSubTotalsContext();
508 virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
509 const OUString& rLocalName,
510 const ::com::sun::star::uno::Reference<
511 ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) SAL_OVERRIDE;
513 virtual void EndElement() SAL_OVERRIDE;
514 void AddFunction(sal_Int16 nFunction);
515 void SetDisplayName(const OUString& rName);
518 class ScXMLDataPilotSubTotalContext : public SvXMLImportContext
520 ScXMLDataPilotSubTotalsContext* pDataPilotSubTotals;
522 const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
523 ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
525 public:
527 ScXMLDataPilotSubTotalContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
528 const OUString& rLName,
529 const ::com::sun::star::uno::Reference<
530 ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
531 ScXMLDataPilotSubTotalsContext* pDataPilotSubTotals);
533 virtual ~ScXMLDataPilotSubTotalContext();
535 virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
536 const OUString& rLocalName,
537 const ::com::sun::star::uno::Reference<
538 ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) SAL_OVERRIDE;
540 virtual void EndElement() SAL_OVERRIDE;
543 class ScXMLDataPilotMembersContext : public SvXMLImportContext
545 ScXMLDataPilotFieldContext* pDataPilotField;
547 const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
548 ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
550 public:
552 ScXMLDataPilotMembersContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
553 const OUString& rLName,
554 const ::com::sun::star::uno::Reference<
555 ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
556 ScXMLDataPilotFieldContext* pDataPilotField);
558 virtual ~ScXMLDataPilotMembersContext();
560 virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
561 const OUString& rLocalName,
562 const ::com::sun::star::uno::Reference<
563 ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) SAL_OVERRIDE;
565 virtual void EndElement() SAL_OVERRIDE;
568 class ScXMLDataPilotMemberContext : public SvXMLImportContext
570 ScXMLDataPilotFieldContext* pDataPilotField;
572 OUString sName;
573 OUString maDisplayName;
574 bool bDisplay;
575 bool bDisplayDetails;
576 bool bHasName;
578 const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
579 ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
581 public:
583 ScXMLDataPilotMemberContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
584 const OUString& rLName,
585 const ::com::sun::star::uno::Reference<
586 ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
587 ScXMLDataPilotFieldContext* pDataPilotField);
589 virtual ~ScXMLDataPilotMemberContext();
591 virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
592 const OUString& rLocalName,
593 const ::com::sun::star::uno::Reference<
594 ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) SAL_OVERRIDE;
596 virtual void EndElement() SAL_OVERRIDE;
599 class ScXMLDataPilotGroupsContext : public SvXMLImportContext
601 ScXMLDataPilotFieldContext* pDataPilotField;
603 const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
604 ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
606 public:
608 ScXMLDataPilotGroupsContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
609 const OUString& rLName,
610 const ::com::sun::star::uno::Reference<
611 ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
612 ScXMLDataPilotFieldContext* pDataPilotField);
614 virtual ~ScXMLDataPilotGroupsContext();
616 virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
617 const OUString& rLocalName,
618 const ::com::sun::star::uno::Reference<
619 ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) SAL_OVERRIDE;
621 virtual void EndElement() SAL_OVERRIDE;
624 class ScXMLDataPilotGroupContext : public SvXMLImportContext
626 ScXMLDataPilotFieldContext* pDataPilotField;
628 OUString sName;
629 ::std::vector<OUString> aMembers;
631 const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
632 ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
634 public:
636 ScXMLDataPilotGroupContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
637 const OUString& rLName,
638 const ::com::sun::star::uno::Reference<
639 ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
640 ScXMLDataPilotFieldContext* pDataPilotField);
642 virtual ~ScXMLDataPilotGroupContext();
644 virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
645 const OUString& rLocalName,
646 const ::com::sun::star::uno::Reference<
647 ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) SAL_OVERRIDE;
649 virtual void EndElement() SAL_OVERRIDE;
651 void AddMember(const OUString& sMember) { aMembers.push_back(sMember); }
654 class ScXMLDataPilotGroupMemberContext : public SvXMLImportContext
656 ScXMLDataPilotGroupContext* pDataPilotGroup;
658 OUString sName;
660 const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
661 ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
663 public:
665 ScXMLDataPilotGroupMemberContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
666 const OUString& rLName,
667 const ::com::sun::star::uno::Reference<
668 ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
669 ScXMLDataPilotGroupContext* pDataPilotGroup);
671 virtual ~ScXMLDataPilotGroupMemberContext();
673 virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
674 const OUString& rLocalName,
675 const ::com::sun::star::uno::Reference<
676 ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) SAL_OVERRIDE;
678 virtual void EndElement() SAL_OVERRIDE;
681 #endif
683 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */