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