Line data Source code
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 : #ifndef SC_XMLDPIMP_HXX
20 : #define SC_XMLDPIMP_HXX
21 :
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>
28 :
29 : #include "global.hxx"
30 : #include "dpobject.hxx"
31 : #include "dpsave.hxx"
32 : #include "queryparam.hxx"
33 :
34 : #include <boost/unordered_set.hpp>
35 :
36 : class ScXMLImport;
37 : class ScDPSaveNumGroupDimension;
38 : class ScDPSaveGroupDimension;
39 :
40 : enum ScMySourceType
41 : {
42 : SQL,
43 : TABLE,
44 : QUERY,
45 : SERVICE,
46 : CELLRANGE
47 : };
48 :
49 : class ScXMLDataPilotTablesContext : public SvXMLImportContext
50 : {
51 :
52 : const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
53 3 : ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
54 :
55 : public:
56 :
57 : ScXMLDataPilotTablesContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
58 : const ::rtl::OUString& rLName,
59 : const ::com::sun::star::uno::Reference<
60 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList);
61 :
62 : virtual ~ScXMLDataPilotTablesContext();
63 :
64 : virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
65 : const ::rtl::OUString& rLocalName,
66 : const ::com::sun::star::uno::Reference<
67 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
68 :
69 : virtual void EndElement();
70 : };
71 :
72 : class ScXMLDataPilotTableContext : public SvXMLImportContext
73 : {
74 2 : struct GrandTotalItem
75 : {
76 : ::rtl::OUString maDisplayName;
77 : bool mbVisible;
78 : GrandTotalItem();
79 : };
80 : ScDocument* pDoc;
81 : ScDPObject* pDPObject;
82 : ScDPSaveData* pDPSave;
83 : ScDPDimensionSaveData* pDPDimSaveData;
84 : GrandTotalItem maRowGrandTotal;
85 : GrandTotalItem maColGrandTotal;
86 : rtl::OUString sDataPilotTableName;
87 : rtl::OUString sApplicationData;
88 : rtl::OUString sDatabaseName;
89 : rtl::OUString sSourceObject;
90 : rtl::OUString sServiceName;
91 : rtl::OUString sServiceSourceName;
92 : rtl::OUString sServiceSourceObject;
93 : rtl::OUString sServiceUsername;
94 : rtl::OUString sServicePassword;
95 : rtl::OUString sButtons;
96 : rtl::OUString sSourceRangeName;
97 : ScRange aSourceCellRangeAddress;
98 : ScRange aTargetRangeAddress;
99 : ScRange aFilterSourceRange;
100 : ScAddress aFilterOutputPosition;
101 : ScQueryParam aSourceQueryParam;
102 : ScMySourceType nSourceType;
103 : sal_uInt32 mnRowFieldCount;
104 : sal_uInt32 mnColFieldCount;
105 : sal_uInt32 mnPageFieldCount;
106 : sal_uInt32 mnDataFieldCount;
107 : sal_uInt16 mnDataLayoutType;
108 : bool bIsNative:1;
109 : bool bIgnoreEmptyRows:1;
110 : bool bIdentifyCategories:1;
111 : bool bTargetRangeAddress:1;
112 : bool bSourceCellRange:1;
113 : bool bShowFilter:1;
114 : bool bDrillDown:1;
115 : bool bHeaderGridLayout:1;
116 :
117 : const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
118 24 : ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
119 :
120 : public:
121 :
122 : ScXMLDataPilotTableContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
123 : const ::rtl::OUString& rLName,
124 : const ::com::sun::star::uno::Reference<
125 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList);
126 :
127 : virtual ~ScXMLDataPilotTableContext();
128 :
129 : virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
130 : const ::rtl::OUString& rLocalName,
131 : const ::com::sun::star::uno::Reference<
132 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
133 :
134 : virtual void EndElement();
135 :
136 : void SetGrandTotal(::xmloff::token::XMLTokenEnum eOrientation, bool bVisible, const ::rtl::OUString& rDisplayName);
137 0 : void SetDatabaseName(const rtl::OUString& sValue) { sDatabaseName = sValue; }
138 0 : void SetSourceObject(const rtl::OUString& sValue) { sSourceObject = sValue; }
139 0 : void SetNative(bool bValue) { bIsNative = bValue; }
140 0 : void SetServiceName(const rtl::OUString& sValue) { sServiceName = sValue; }
141 0 : void SetServiceSourceName(const rtl::OUString& sValue) { sServiceSourceName = sValue; }
142 0 : void SetServiceSourceObject(const rtl::OUString& sValue) { sServiceSourceObject = sValue; }
143 0 : void SetServiceUsername(const rtl::OUString& sValue) { sServiceUsername = sValue; }
144 0 : void SetServicePassword(const rtl::OUString& sValue) { sServicePassword = sValue; }
145 0 : void SetSourceRangeName(const rtl::OUString& sValue) { sSourceRangeName = sValue; bSourceCellRange = true; }
146 1 : void SetSourceCellRangeAddress(const ScRange& aValue) { aSourceCellRangeAddress = aValue; bSourceCellRange = true; }
147 0 : void SetSourceQueryParam(const ScQueryParam& aValue) { aSourceQueryParam = aValue; }
148 0 : void SetFilterOutputPosition(const ScAddress& aValue) { aFilterOutputPosition = aValue; }
149 0 : void SetFilterSourceRange(const ScRange& aValue) { aFilterSourceRange = aValue; }
150 : void AddDimension(ScDPSaveDimension* pDim);
151 : void AddGroupDim(const ScDPSaveNumGroupDimension& aNumGroupDim);
152 : void AddGroupDim(const ScDPSaveGroupDimension& aGroupDim);
153 : void SetButtons();
154 : };
155 :
156 : class ScXMLDPSourceSQLContext : public SvXMLImportContext
157 : {
158 : ScXMLDataPilotTableContext* pDataPilotTable;
159 :
160 : const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
161 0 : ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
162 :
163 : public:
164 :
165 : ScXMLDPSourceSQLContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
166 : const ::rtl::OUString& rLName,
167 : const ::com::sun::star::uno::Reference<
168 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
169 : ScXMLDataPilotTableContext* pDataPilotTable);
170 :
171 : virtual ~ScXMLDPSourceSQLContext();
172 :
173 : virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
174 : const ::rtl::OUString& rLocalName,
175 : const ::com::sun::star::uno::Reference<
176 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
177 :
178 : virtual void EndElement();
179 : };
180 :
181 : class ScXMLDPSourceTableContext : public SvXMLImportContext
182 : {
183 : ScXMLDataPilotTableContext* pDataPilotTable;
184 :
185 : const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
186 0 : ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
187 :
188 : public:
189 :
190 : ScXMLDPSourceTableContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
191 : const ::rtl::OUString& rLName,
192 : const ::com::sun::star::uno::Reference<
193 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
194 : ScXMLDataPilotTableContext* pDataPilotTable);
195 :
196 : virtual ~ScXMLDPSourceTableContext();
197 :
198 : virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
199 : const ::rtl::OUString& rLocalName,
200 : const ::com::sun::star::uno::Reference<
201 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
202 :
203 : virtual void EndElement();
204 : };
205 :
206 : class ScXMLDPSourceQueryContext : public SvXMLImportContext
207 : {
208 : ScXMLDataPilotTableContext* pDataPilotTable;
209 :
210 : const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
211 0 : ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
212 :
213 : public:
214 :
215 : ScXMLDPSourceQueryContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
216 : const ::rtl::OUString& rLName,
217 : const ::com::sun::star::uno::Reference<
218 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
219 : ScXMLDataPilotTableContext* pDataPilotTable);
220 :
221 : virtual ~ScXMLDPSourceQueryContext();
222 :
223 : virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
224 : const ::rtl::OUString& rLocalName,
225 : const ::com::sun::star::uno::Reference<
226 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
227 :
228 : virtual void EndElement();
229 : };
230 :
231 : class ScXMLSourceServiceContext : public SvXMLImportContext
232 : {
233 : ScXMLDataPilotTableContext* pDataPilotTable;
234 :
235 : const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
236 0 : ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
237 :
238 : public:
239 :
240 : ScXMLSourceServiceContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
241 : const ::rtl::OUString& rLName,
242 : const ::com::sun::star::uno::Reference<
243 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
244 : ScXMLDataPilotTableContext* pDataPilotTable);
245 :
246 : virtual ~ScXMLSourceServiceContext();
247 :
248 : virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
249 : const ::rtl::OUString& rLocalName,
250 : const ::com::sun::star::uno::Reference<
251 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
252 :
253 : virtual void EndElement();
254 : };
255 :
256 : class ScXMLDataPilotGrandTotalContext : public SvXMLImportContext
257 : {
258 : enum Orientation { COLUMN, ROW, BOTH, NONE };
259 :
260 : ScXMLImport& GetScImport();
261 :
262 : ScXMLDataPilotTableContext* mpTableContext;
263 : ::rtl::OUString maDisplayName;
264 : Orientation meOrientation;
265 : bool mbVisible;
266 :
267 : public:
268 : ScXMLDataPilotGrandTotalContext(
269 : ScXMLImport& rImport, sal_uInt16 nPrefix, const ::rtl::OUString& rLName,
270 : const ::com::sun::star::uno::Reference<
271 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
272 : ScXMLDataPilotTableContext* pTableContext );
273 :
274 : virtual ~ScXMLDataPilotGrandTotalContext();
275 :
276 : virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
277 : const ::rtl::OUString& rLocalName,
278 : const ::com::sun::star::uno::Reference<
279 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
280 :
281 : virtual void EndElement();
282 : };
283 :
284 : class ScXMLSourceCellRangeContext : public SvXMLImportContext
285 : {
286 : ScXMLDataPilotTableContext* pDataPilotTable;
287 :
288 : const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
289 3 : ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
290 :
291 : public:
292 :
293 : ScXMLSourceCellRangeContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
294 : const ::rtl::OUString& rLName,
295 : const ::com::sun::star::uno::Reference<
296 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
297 : ScXMLDataPilotTableContext* pDataPilotTable);
298 :
299 : virtual ~ScXMLSourceCellRangeContext();
300 :
301 : virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
302 : const ::rtl::OUString& rLocalName,
303 : const ::com::sun::star::uno::Reference<
304 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
305 :
306 : virtual void EndElement();
307 : };
308 :
309 0 : struct ScXMLDataPilotGroup
310 : {
311 : ::std::vector<rtl::OUString> aMembers;
312 : rtl::OUString aName;
313 : };
314 :
315 : class ScXMLDataPilotFieldContext : public SvXMLImportContext
316 : {
317 : ScXMLDataPilotTableContext* pDataPilotTable;
318 : ScDPSaveDimension* pDim;
319 :
320 : ::std::vector<ScXMLDataPilotGroup> aGroups;
321 : rtl::OUString sGroupSource;
322 : rtl::OUString sSelectedPage;
323 : rtl::OUString sName;
324 : double fStart;
325 : double fEnd;
326 : double fStep;
327 : sal_Int32 nUsedHierarchy;
328 : sal_Int32 nGroupPart;
329 : sal_Int16 nFunction;
330 : sal_Int16 nOrientation;
331 : sal_Bool bSelectedPage:1;
332 : sal_Bool bIsGroupField:1;
333 : sal_Bool bDateValue:1;
334 : sal_Bool bAutoStart:1;
335 : sal_Bool bAutoEnd:1;
336 : bool mbHasHiddenMember:1;
337 :
338 : const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
339 57 : ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
340 :
341 : public:
342 :
343 : ScXMLDataPilotFieldContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
344 : const ::rtl::OUString& rLName,
345 : const ::com::sun::star::uno::Reference<
346 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
347 : ScXMLDataPilotTableContext* pDataPilotTable);
348 :
349 : virtual ~ScXMLDataPilotFieldContext();
350 :
351 : virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
352 : const ::rtl::OUString& rLocalName,
353 : const ::com::sun::star::uno::Reference<
354 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
355 :
356 : virtual void EndElement();
357 :
358 8 : void SetShowEmpty(const sal_Bool bValue) { if (pDim) pDim->SetShowEmpty(bValue); }
359 0 : void SetSubTotals(const sal_uInt16* pFunctions, const sal_Int16 nCount) { if(pDim) pDim->SetSubTotals(nCount, pFunctions); }
360 : void AddMember(ScDPSaveMember* pMember);
361 : void SetSubTotalName(const ::rtl::OUString& rName);
362 0 : void SetFieldReference(const com::sun::star::sheet::DataPilotFieldReference& aRef) { if (pDim) pDim->SetReferenceValue(&aRef); }
363 7 : void SetAutoShowInfo(const com::sun::star::sheet::DataPilotFieldAutoShowInfo& aInfo) { if (pDim) pDim->SetAutoShowInfo(&aInfo); }
364 7 : void SetSortInfo(const com::sun::star::sheet::DataPilotFieldSortInfo& aInfo) { if (pDim) pDim->SetSortInfo(&aInfo); }
365 7 : void SetLayoutInfo(const com::sun::star::sheet::DataPilotFieldLayoutInfo& aInfo) { if (pDim) pDim->SetLayoutInfo(&aInfo); }
366 0 : void SetGrouping(const rtl::OUString& rGroupSource, const double& rStart, const double& rEnd, const double& rStep,
367 : sal_Int32 nPart, sal_Bool bDate, sal_Bool bAutoSt, sal_Bool bAutoE)
368 : {
369 0 : bIsGroupField = sal_True;
370 0 : sGroupSource = rGroupSource;
371 0 : fStart = rStart;
372 0 : fEnd = rEnd;
373 0 : fStep = rStep;
374 0 : nGroupPart = nPart;
375 0 : bDateValue = bDate;
376 0 : bAutoStart = bAutoSt;
377 0 : bAutoEnd = bAutoE;
378 0 : }
379 : void AddGroup(const ::std::vector<rtl::OUString>& rMembers, const rtl::OUString& rName);
380 : };
381 :
382 : class ScXMLDataPilotFieldReferenceContext : public SvXMLImportContext
383 : {
384 : // com::sun::star::sheet::DataPilotFieldReference aReference;
385 :
386 : const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
387 0 : ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
388 :
389 : public:
390 :
391 : ScXMLDataPilotFieldReferenceContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
392 : const ::rtl::OUString& rLName,
393 : const ::com::sun::star::uno::Reference<
394 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
395 : ScXMLDataPilotFieldContext* pDataPilotField);
396 :
397 : virtual ~ScXMLDataPilotFieldReferenceContext();
398 : };
399 :
400 : class ScXMLDataPilotLevelContext : public SvXMLImportContext
401 : {
402 : ScXMLDataPilotFieldContext* pDataPilotField;
403 :
404 : const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
405 72 : ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
406 :
407 : public:
408 :
409 : ScXMLDataPilotLevelContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
410 : const ::rtl::OUString& rLName,
411 : const ::com::sun::star::uno::Reference<
412 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
413 : ScXMLDataPilotFieldContext* pDataPilotField);
414 :
415 : virtual ~ScXMLDataPilotLevelContext();
416 :
417 : virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
418 : const ::rtl::OUString& rLocalName,
419 : const ::com::sun::star::uno::Reference<
420 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
421 :
422 : virtual void EndElement();
423 : };
424 :
425 : class ScXMLDataPilotDisplayInfoContext : public SvXMLImportContext
426 : {
427 : // com::sun::star::sheet::DataPilotFieldAutoShowInfo aInfo;
428 :
429 : const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
430 28 : ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
431 :
432 : public:
433 :
434 : ScXMLDataPilotDisplayInfoContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
435 : const ::rtl::OUString& rLName,
436 : const ::com::sun::star::uno::Reference<
437 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
438 : ScXMLDataPilotFieldContext* pDataPilotField);
439 :
440 : virtual ~ScXMLDataPilotDisplayInfoContext();
441 : };
442 :
443 : class ScXMLDataPilotSortInfoContext : public SvXMLImportContext
444 : {
445 : // com::sun::star::sheet::DataPilotFieldSortInfo aInfo;
446 :
447 : const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
448 14 : ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
449 :
450 : public:
451 :
452 : ScXMLDataPilotSortInfoContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
453 : const ::rtl::OUString& rLName,
454 : const ::com::sun::star::uno::Reference<
455 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
456 : ScXMLDataPilotFieldContext* pDataPilotField);
457 :
458 : virtual ~ScXMLDataPilotSortInfoContext();
459 : };
460 :
461 : class ScXMLDataPilotLayoutInfoContext : public SvXMLImportContext
462 : {
463 : // com::sun::star::sheet::DataPilotFieldLayoutInfo aInfo;
464 :
465 : const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
466 14 : ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
467 :
468 : public:
469 :
470 : ScXMLDataPilotLayoutInfoContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
471 : const ::rtl::OUString& rLName,
472 : const ::com::sun::star::uno::Reference<
473 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
474 : ScXMLDataPilotFieldContext* pDataPilotField);
475 :
476 : virtual ~ScXMLDataPilotLayoutInfoContext();
477 : };
478 :
479 : class ScXMLDataPilotSubTotalsContext : public SvXMLImportContext
480 : {
481 : ScXMLDataPilotFieldContext* pDataPilotField;
482 :
483 : sal_Int16 nFunctionCount;
484 : sal_uInt16* pFunctions;
485 : ::rtl::OUString maDisplayName;
486 :
487 : const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
488 0 : ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
489 :
490 : public:
491 :
492 : ScXMLDataPilotFieldContext* GetDataPilotField() { return pDataPilotField; }
493 :
494 : ScXMLDataPilotSubTotalsContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
495 : const ::rtl::OUString& rLName,
496 : const ::com::sun::star::uno::Reference<
497 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
498 : ScXMLDataPilotFieldContext* pDataPilotField);
499 :
500 : virtual ~ScXMLDataPilotSubTotalsContext();
501 :
502 : virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
503 : const ::rtl::OUString& rLocalName,
504 : const ::com::sun::star::uno::Reference<
505 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
506 :
507 : virtual void EndElement();
508 : void AddFunction(sal_Int16 nFunction);
509 : void SetDisplayName(const ::rtl::OUString& rName);
510 : };
511 :
512 : class ScXMLDataPilotSubTotalContext : public SvXMLImportContext
513 : {
514 : ScXMLDataPilotSubTotalsContext* pDataPilotSubTotals;
515 :
516 : const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
517 0 : ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
518 :
519 : public:
520 :
521 : ScXMLDataPilotSubTotalContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
522 : const ::rtl::OUString& rLName,
523 : const ::com::sun::star::uno::Reference<
524 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
525 : ScXMLDataPilotSubTotalsContext* pDataPilotSubTotals);
526 :
527 : virtual ~ScXMLDataPilotSubTotalContext();
528 :
529 : virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
530 : const ::rtl::OUString& rLocalName,
531 : const ::com::sun::star::uno::Reference<
532 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
533 :
534 : virtual void EndElement();
535 : };
536 :
537 : class ScXMLDataPilotMembersContext : public SvXMLImportContext
538 : {
539 : ScXMLDataPilotFieldContext* pDataPilotField;
540 :
541 : const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
542 36 : ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
543 :
544 : public:
545 :
546 : ScXMLDataPilotMembersContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
547 : const ::rtl::OUString& rLName,
548 : const ::com::sun::star::uno::Reference<
549 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
550 : ScXMLDataPilotFieldContext* pDataPilotField);
551 :
552 : virtual ~ScXMLDataPilotMembersContext();
553 :
554 : virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
555 : const ::rtl::OUString& rLocalName,
556 : const ::com::sun::star::uno::Reference<
557 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
558 :
559 : virtual void EndElement();
560 : };
561 :
562 : class ScXMLDataPilotMemberContext : public SvXMLImportContext
563 : {
564 : ScXMLDataPilotFieldContext* pDataPilotField;
565 :
566 : rtl::OUString sName;
567 : rtl::OUString maDisplayName;
568 : sal_Bool bDisplay;
569 : sal_Bool bDisplayDetails;
570 : sal_Bool bHasName;
571 :
572 : const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
573 72 : ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
574 :
575 : public:
576 :
577 : ScXMLDataPilotMemberContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
578 : const ::rtl::OUString& rLName,
579 : const ::com::sun::star::uno::Reference<
580 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
581 : ScXMLDataPilotFieldContext* pDataPilotField);
582 :
583 : virtual ~ScXMLDataPilotMemberContext();
584 :
585 : virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
586 : const ::rtl::OUString& rLocalName,
587 : const ::com::sun::star::uno::Reference<
588 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
589 :
590 : virtual void EndElement();
591 : };
592 :
593 : class ScXMLDataPilotGroupsContext : public SvXMLImportContext
594 : {
595 : ScXMLDataPilotFieldContext* pDataPilotField;
596 :
597 : const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
598 0 : ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
599 :
600 : public:
601 :
602 : ScXMLDataPilotGroupsContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
603 : const ::rtl::OUString& rLName,
604 : const ::com::sun::star::uno::Reference<
605 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
606 : ScXMLDataPilotFieldContext* pDataPilotField);
607 :
608 : virtual ~ScXMLDataPilotGroupsContext();
609 :
610 : virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
611 : const ::rtl::OUString& rLocalName,
612 : const ::com::sun::star::uno::Reference<
613 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
614 :
615 : virtual void EndElement();
616 : };
617 :
618 : class ScXMLDataPilotGroupContext : public SvXMLImportContext
619 : {
620 : ScXMLDataPilotFieldContext* pDataPilotField;
621 :
622 : rtl::OUString sName;
623 : ::std::vector<rtl::OUString> aMembers;
624 :
625 : const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
626 0 : ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
627 :
628 : public:
629 :
630 : ScXMLDataPilotGroupContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
631 : const ::rtl::OUString& rLName,
632 : const ::com::sun::star::uno::Reference<
633 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
634 : ScXMLDataPilotFieldContext* pDataPilotField);
635 :
636 : virtual ~ScXMLDataPilotGroupContext();
637 :
638 : virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
639 : const ::rtl::OUString& rLocalName,
640 : const ::com::sun::star::uno::Reference<
641 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
642 :
643 : virtual void EndElement();
644 :
645 0 : void AddMember(const rtl::OUString& sMember) { aMembers.push_back(sMember); }
646 : };
647 :
648 : class ScXMLDataPilotGroupMemberContext : public SvXMLImportContext
649 : {
650 : ScXMLDataPilotGroupContext* pDataPilotGroup;
651 :
652 : rtl::OUString sName;
653 :
654 : const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
655 0 : ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
656 :
657 : public:
658 :
659 : ScXMLDataPilotGroupMemberContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
660 : const ::rtl::OUString& rLName,
661 : const ::com::sun::star::uno::Reference<
662 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
663 : ScXMLDataPilotGroupContext* pDataPilotGroup);
664 :
665 : virtual ~ScXMLDataPilotGroupMemberContext();
666 :
667 : virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
668 : const ::rtl::OUString& rLocalName,
669 : const ::com::sun::star::uno::Reference<
670 : ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
671 :
672 : virtual void EndElement();
673 : };
674 :
675 : #endif
676 :
677 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|