LCOV - code coverage report
Current view: top level - sc/source/filter/xml - xmldpimp.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 33 54 61.1 %
Date: 2015-06-13 12:38:46 Functions: 23 46 50.0 %
Legend: Lines: hit not hit

          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 INCLUDED_SC_SOURCE_FILTER_XML_XMLDPIMP_HXX
      20             : #define INCLUDED_SC_SOURCE_FILTER_XML_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             : #include "xmlimprt.hxx"
      34             : 
      35             : #include <unordered_map>
      36             : 
      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 static_cast<const ScXMLImport&>(GetImport()); }
      53          29 :     ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
      54             : 
      55             : public:
      56             : 
      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);
      61             : 
      62             :     virtual ~ScXMLDataPilotTablesContext();
      63             : 
      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;
      68             : 
      69             :     virtual void EndElement() SAL_OVERRIDE;
      70             : };
      71             : 
      72             : class ScXMLDataPilotTableContext : public SvXMLImportContext
      73             : {
      74             :     typedef std::unordered_map<OUString, OUString, OUStringHash> SelectedPagesType;
      75             : 
      76          22 :     struct GrandTotalItem
      77             :     {
      78             :         OUString maDisplayName;
      79             :         bool            mbVisible;
      80             :         GrandTotalItem();
      81             :     };
      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;
     118             : 
     119             :     SelectedPagesType maSelectedPages;
     120             : 
     121             :     const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
     122         211 :     ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
     123             : 
     124             : public:
     125             : 
     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);
     130             : 
     131             :     virtual ~ScXMLDataPilotTableContext();
     132             : 
     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;
     137             : 
     138             :     virtual void EndElement() SAL_OVERRIDE;
     139             : 
     140             :     void SetGrandTotal(::xmloff::token::XMLTokenEnum eOrientation, bool bVisible, const OUString& rDisplayName);
     141           0 :     void SetDatabaseName(const OUString& sValue) { sDatabaseName = sValue; }
     142           0 :     void SetSourceObject(const OUString& sValue) { sSourceObject = sValue; }
     143           0 :     void SetNative(bool bValue) { bIsNative = bValue; }
     144           0 :     void SetServiceName(const OUString& sValue) { sServiceName = sValue; }
     145           0 :     void SetServiceSourceName(const OUString& sValue) { sServiceSourceName = sValue; }
     146           0 :     void SetServiceSourceObject(const OUString& sValue) { sServiceSourceObject = sValue; }
     147           0 :     void SetServiceUsername(const OUString& sValue) { sServiceUsername = sValue; }
     148           0 :     void SetServicePassword(const OUString& sValue) { sServicePassword = sValue; }
     149           3 :     void SetSourceRangeName(const OUString& sValue) { sSourceRangeName = sValue; bSourceCellRange = true; }
     150          11 :     void SetSourceCellRangeAddress(const ScRange& aValue) { aSourceCellRangeAddress = aValue; bSourceCellRange = true; }
     151           1 :     void SetSourceQueryParam(const ScQueryParam& aValue) { aSourceQueryParam = aValue; }
     152           0 :     void SetFilterOutputPosition(const ScAddress& aValue) { aFilterOutputPosition = aValue; }
     153           0 :     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 );
     159             : };
     160             : 
     161             : class ScXMLDPSourceSQLContext : public SvXMLImportContext
     162             : {
     163             :     ScXMLDataPilotTableContext* pDataPilotTable;
     164             : 
     165             :     const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
     166           0 :     ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
     167             : 
     168             : public:
     169             : 
     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);
     175             : 
     176             :     virtual ~ScXMLDPSourceSQLContext();
     177             : 
     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;
     182             : 
     183             :     virtual void EndElement() SAL_OVERRIDE;
     184             : };
     185             : 
     186             : class ScXMLDPSourceTableContext : public SvXMLImportContext
     187             : {
     188             :     ScXMLDataPilotTableContext* pDataPilotTable;
     189             : 
     190             :     const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
     191           0 :     ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
     192             : 
     193             : public:
     194             : 
     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);
     200             : 
     201             :     virtual ~ScXMLDPSourceTableContext();
     202             : 
     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;
     207             : 
     208             :     virtual void EndElement() SAL_OVERRIDE;
     209             : };
     210             : 
     211             : class ScXMLDPSourceQueryContext : public SvXMLImportContext
     212             : {
     213             :     ScXMLDataPilotTableContext* pDataPilotTable;
     214             : 
     215             :     const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
     216           0 :     ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
     217             : 
     218             : public:
     219             : 
     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);
     225             : 
     226             :     virtual ~ScXMLDPSourceQueryContext();
     227             : 
     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;
     232             : 
     233             :     virtual void EndElement() SAL_OVERRIDE;
     234             : };
     235             : 
     236             : class ScXMLSourceServiceContext : public SvXMLImportContext
     237             : {
     238             :     ScXMLDataPilotTableContext* pDataPilotTable;
     239             : 
     240             :     const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
     241           0 :     ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
     242             : 
     243             : public:
     244             : 
     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);
     250             : 
     251             :     virtual ~ScXMLSourceServiceContext();
     252             : 
     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;
     257             : 
     258             :     virtual void EndElement() SAL_OVERRIDE;
     259             : };
     260             : 
     261             : class ScXMLDataPilotGrandTotalContext : public SvXMLImportContext
     262             : {
     263             :     enum Orientation { COLUMN, ROW, BOTH, NONE };
     264             : 
     265             :     ScXMLImport& GetScImport();
     266             : 
     267             :     ScXMLDataPilotTableContext* mpTableContext;
     268             :     OUString             maDisplayName;
     269             :     Orientation                 meOrientation;
     270             :     bool                        mbVisible;
     271             : 
     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 );
     278             : 
     279             :     virtual ~ScXMLDataPilotGrandTotalContext();
     280             : 
     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;
     285             : 
     286             :     virtual void EndElement() SAL_OVERRIDE;
     287             : };
     288             : 
     289             : class ScXMLSourceCellRangeContext : public SvXMLImportContext
     290             : {
     291             :     ScXMLDataPilotTableContext* pDataPilotTable;
     292             : 
     293             :     const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
     294          38 :     ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
     295             : 
     296             : public:
     297             : 
     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);
     303             : 
     304             :     virtual ~ScXMLSourceCellRangeContext();
     305             : 
     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;
     310             : 
     311             :     virtual void EndElement() SAL_OVERRIDE;
     312             : };
     313             : 
     314           0 : struct ScXMLDataPilotGroup
     315             : {
     316             :     ::std::vector<OUString> aMembers;
     317             :     OUString aName;
     318             : };
     319             : 
     320             : class ScXMLDataPilotFieldContext : public SvXMLImportContext
     321             : {
     322             :     ScXMLDataPilotTableContext* pDataPilotTable;
     323             :     ScDPSaveDimension*          pDim;
     324             : 
     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;
     342             : 
     343             :     const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
     344         397 :     ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
     345             : 
     346             : public:
     347             : 
     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);
     353             : 
     354             :     virtual ~ScXMLDataPilotFieldContext();
     355             : 
     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;
     360             : 
     361             :     virtual void EndElement() SAL_OVERRIDE;
     362             : 
     363          48 :     void SetShowEmpty(const bool bValue) { if (pDim) pDim->SetShowEmpty(bValue); }
     364           0 :     void SetRepeatItemLabels(const bool bSet) { if (pDim) pDim->SetRepeatItemLabels(bSet); }
     365           3 :     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           0 :     void SetFieldReference(const com::sun::star::sheet::DataPilotFieldReference& aRef) { if (pDim) pDim->SetReferenceValue(&aRef); }
     369          39 :     void SetAutoShowInfo(const com::sun::star::sheet::DataPilotFieldAutoShowInfo& aInfo) { if (pDim) pDim->SetAutoShowInfo(&aInfo); }
     370          39 :     void SetSortInfo(const com::sun::star::sheet::DataPilotFieldSortInfo& aInfo) { if (pDim) pDim->SetSortInfo(&aInfo); }
     371          39 :     void SetLayoutInfo(const com::sun::star::sheet::DataPilotFieldLayoutInfo& aInfo) { if (pDim) pDim->SetLayoutInfo(&aInfo); }
     372           4 :     void SetGrouping(const OUString& rGroupSource, const double& rStart, const double& rEnd, const double& rStep,
     373             :         sal_Int32 nPart, bool bDate, bool bAutoSt, bool bAutoE)
     374             :     {
     375           4 :         bIsGroupField = true;
     376           4 :         sGroupSource = rGroupSource;
     377           4 :         fStart = rStart;
     378           4 :         fEnd = rEnd;
     379           4 :         fStep = rStep;
     380           4 :         nGroupPart = nPart;
     381           4 :         bDateValue = bDate;
     382           4 :         bAutoStart = bAutoSt;
     383           4 :         bAutoEnd = bAutoE;
     384           4 :     }
     385             :     void AddGroup(const ::std::vector<OUString>& rMembers, const OUString& rName);
     386             : };
     387             : 
     388             : class ScXMLDataPilotFieldReferenceContext : public SvXMLImportContext
     389             : {
     390             : //    com::sun::star::sheet::DataPilotFieldReference aReference;
     391             : 
     392             :     const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
     393           0 :     ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
     394             : 
     395             : public:
     396             : 
     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);
     402             : 
     403             :     virtual ~ScXMLDataPilotFieldReferenceContext();
     404             : };
     405             : 
     406             : class ScXMLDataPilotLevelContext : public SvXMLImportContext
     407             : {
     408             :     ScXMLDataPilotFieldContext* pDataPilotField;
     409             : 
     410             :     const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
     411         418 :     ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
     412             : 
     413             : public:
     414             : 
     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);
     420             : 
     421             :     virtual ~ScXMLDataPilotLevelContext();
     422             : 
     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;
     427             : 
     428             :     virtual void EndElement() SAL_OVERRIDE;
     429             : };
     430             : 
     431             : class ScXMLDataPilotDisplayInfoContext : public SvXMLImportContext
     432             : {
     433             : //    com::sun::star::sheet::DataPilotFieldAutoShowInfo aInfo;
     434             : 
     435             :     const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
     436         156 :     ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
     437             : 
     438             : public:
     439             : 
     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);
     445             : 
     446             :     virtual ~ScXMLDataPilotDisplayInfoContext();
     447             : };
     448             : 
     449             : class ScXMLDataPilotSortInfoContext : public SvXMLImportContext
     450             : {
     451             : //    com::sun::star::sheet::DataPilotFieldSortInfo aInfo;
     452             : 
     453             :     const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
     454          78 :     ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
     455             : 
     456             : public:
     457             : 
     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);
     463             : 
     464             :     virtual ~ScXMLDataPilotSortInfoContext();
     465             : };
     466             : 
     467             : class ScXMLDataPilotLayoutInfoContext : public SvXMLImportContext
     468             : {
     469             : //    com::sun::star::sheet::DataPilotFieldLayoutInfo aInfo;
     470             : 
     471             :     const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
     472          78 :     ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
     473             : 
     474             : public:
     475             : 
     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);
     481             : 
     482             :     virtual ~ScXMLDataPilotLayoutInfoContext();
     483             : };
     484             : 
     485             : class ScXMLDataPilotSubTotalsContext : public SvXMLImportContext
     486             : {
     487             :     ScXMLDataPilotFieldContext* pDataPilotField;
     488             : 
     489             :     sal_Int16   nFunctionCount;
     490             :     sal_uInt16* pFunctions;
     491             :     OUString maDisplayName;
     492             : 
     493             :     const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
     494           6 :     ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
     495             : 
     496             : public:
     497             : 
     498             :     ScXMLDataPilotFieldContext* GetDataPilotField() { return pDataPilotField; }
     499             : 
     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);
     505             : 
     506             :     virtual ~ScXMLDataPilotSubTotalsContext();
     507             : 
     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;
     512             : 
     513             :     virtual void EndElement() SAL_OVERRIDE;
     514             :     void AddFunction(sal_Int16 nFunction);
     515             :     void SetDisplayName(const OUString& rName);
     516             : };
     517             : 
     518             : class ScXMLDataPilotSubTotalContext : public SvXMLImportContext
     519             : {
     520             :     ScXMLDataPilotSubTotalsContext* pDataPilotSubTotals;
     521             : 
     522             :     const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
     523           6 :     ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
     524             : 
     525             : public:
     526             : 
     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);
     532             : 
     533             :     virtual ~ScXMLDataPilotSubTotalContext();
     534             : 
     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;
     539             : 
     540             :     virtual void EndElement() SAL_OVERRIDE;
     541             : };
     542             : 
     543             : class ScXMLDataPilotMembersContext : public SvXMLImportContext
     544             : {
     545             :     ScXMLDataPilotFieldContext* pDataPilotField;
     546             : 
     547             :     const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
     548        5916 :     ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
     549             : 
     550             : public:
     551             : 
     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);
     557             : 
     558             :     virtual ~ScXMLDataPilotMembersContext();
     559             : 
     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;
     564             : 
     565             :     virtual void EndElement() SAL_OVERRIDE;
     566             : };
     567             : 
     568             : class ScXMLDataPilotMemberContext : public SvXMLImportContext
     569             : {
     570             :     ScXMLDataPilotFieldContext* pDataPilotField;
     571             : 
     572             :     OUString sName;
     573             :     OUString maDisplayName;
     574             :     bool     bDisplay;
     575             :     bool     bDisplayDetails;
     576             :     bool     bHasName;
     577             : 
     578             :     const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
     579       11832 :     ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
     580             : 
     581             : public:
     582             : 
     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);
     588             : 
     589             :     virtual ~ScXMLDataPilotMemberContext();
     590             : 
     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;
     595             : 
     596             :     virtual void EndElement() SAL_OVERRIDE;
     597             : };
     598             : 
     599             : class ScXMLDataPilotGroupsContext : public SvXMLImportContext
     600             : {
     601             :     ScXMLDataPilotFieldContext* pDataPilotField;
     602             : 
     603             :     const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
     604          22 :     ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
     605             : 
     606             : public:
     607             : 
     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);
     613             : 
     614             :     virtual ~ScXMLDataPilotGroupsContext();
     615             : 
     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;
     620             : 
     621             :     virtual void EndElement() SAL_OVERRIDE;
     622             : };
     623             : 
     624             : class ScXMLDataPilotGroupContext : public SvXMLImportContext
     625             : {
     626             :     ScXMLDataPilotFieldContext* pDataPilotField;
     627             : 
     628             :     OUString sName;
     629             :     ::std::vector<OUString> aMembers;
     630             : 
     631             :     const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
     632           0 :     ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
     633             : 
     634             : public:
     635             : 
     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);
     641             : 
     642             :     virtual ~ScXMLDataPilotGroupContext();
     643             : 
     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;
     648             : 
     649             :     virtual void EndElement() SAL_OVERRIDE;
     650             : 
     651           0 :     void AddMember(const OUString& sMember) { aMembers.push_back(sMember); }
     652             : };
     653             : 
     654             : class ScXMLDataPilotGroupMemberContext : public SvXMLImportContext
     655             : {
     656             :     ScXMLDataPilotGroupContext* pDataPilotGroup;
     657             : 
     658             :     OUString sName;
     659             : 
     660             :     const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
     661           0 :     ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
     662             : 
     663             : public:
     664             : 
     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);
     670             : 
     671             :     virtual ~ScXMLDataPilotGroupMemberContext();
     672             : 
     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;
     677             : 
     678             :     virtual void EndElement() SAL_OVERRIDE;
     679             : };
     680             : 
     681             : #endif
     682             : 
     683             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11