LCOV - code coverage report
Current view: top level - sc/inc - dapiuno.hxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 7 0.0 %
Date: 2014-04-14 Functions: 0 9 0.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             : 
      20             : #ifndef SC_DAPIUNO_HXX
      21             : #define SC_DAPIUNO_HXX
      22             : 
      23             : #include "global.hxx"
      24             : #include "dpobject.hxx"
      25             : #include "rangeutl.hxx"
      26             : #include "cellsuno.hxx"
      27             : 
      28             : #include <svl/lstner.hxx>
      29             : #include <svl/itemprop.hxx>
      30             : 
      31             : #include <com/sun/star/lang/XServiceInfo.hpp>
      32             : #include <com/sun/star/lang/XUnoTunnel.hpp>
      33             : #include <com/sun/star/beans/XPropertySet.hpp>
      34             : #include <com/sun/star/container/XEnumerationAccess.hpp>
      35             : #include <com/sun/star/container/XNameContainer.hpp>
      36             : #include <com/sun/star/util/XModifyBroadcaster.hpp>
      37             : 
      38             : #include <com/sun/star/sheet/DataPilotFieldAutoShowInfo.hpp>
      39             : #include <com/sun/star/sheet/DataPilotFieldGroupInfo.hpp>
      40             : #include <com/sun/star/sheet/DataPilotFieldLayoutInfo.hpp>
      41             : #include <com/sun/star/sheet/DataPilotFieldOrientation.hpp>
      42             : #include <com/sun/star/sheet/DataPilotFieldReference.hpp>
      43             : #include <com/sun/star/sheet/DataPilotFieldSortInfo.hpp>
      44             : #include <com/sun/star/sheet/GeneralFunction.hpp>
      45             : #include <com/sun/star/sheet/XDataPilotDataLayoutFieldSupplier.hpp>
      46             : #include <com/sun/star/sheet/XDataPilotDescriptor.hpp>
      47             : #include <com/sun/star/sheet/XDataPilotField.hpp>
      48             : #include <com/sun/star/sheet/XDataPilotFieldGrouping.hpp>
      49             : #include <com/sun/star/sheet/XDataPilotTable.hpp>
      50             : #include <com/sun/star/sheet/XDataPilotTable2.hpp>
      51             : #include <com/sun/star/sheet/XDataPilotTables.hpp>
      52             : 
      53             : #include <cppuhelper/implbase2.hxx>
      54             : #include <cppuhelper/implbase3.hxx>
      55             : #include <cppuhelper/implbase4.hxx>
      56             : #include <cppuhelper/implbase5.hxx>
      57             : 
      58             : #include <vector>
      59             : 
      60             : namespace com { namespace sun { namespace star { namespace sheet {
      61             :     struct DataPilotFieldFilter;
      62             :     struct DataPilotTablePositionData;
      63             : }}}}
      64             : 
      65             : class ScDocShell;
      66             : class ScDPSaveDimension;
      67             : struct ScDPNumGroupInfo;
      68             : 
      69             : class ScDataPilotTableObj;
      70             : class ScDataPilotFieldObj;
      71             : class ScDataPilotItemObj;
      72             : 
      73             : 
      74             : class ScDataPilotConversion
      75             : {
      76             : public:
      77             :     static com::sun::star::sheet::GeneralFunction   FirstFunc( sal_uInt16 nBits );
      78             :     static sal_uInt16           FunctionBit( com::sun::star::sheet::GeneralFunction eFunc );
      79             : 
      80             :     static void         FillGroupInfo(
      81             :                             ::com::sun::star::sheet::DataPilotFieldGroupInfo& rInfo,
      82             :                             const ScDPNumGroupInfo& rGroupInfo );
      83             : };
      84             : 
      85             : /** DataPilotTables collection per sheet. */
      86             : class ScDataPilotTablesObj : public cppu::WeakImplHelper4<
      87             :                                         com::sun::star::sheet::XDataPilotTables,
      88             :                                         com::sun::star::container::XEnumerationAccess,
      89             :                                         com::sun::star::container::XIndexAccess,
      90             :                                         com::sun::star::lang::XServiceInfo>,
      91             :                                     public SfxListener
      92             : {
      93             : private:
      94             :     ScDocShell*             pDocShell;
      95             :     SCTAB                   nTab;
      96             : 
      97             :     ScDataPilotTableObj*    GetObjectByIndex_Impl( sal_Int32 nIndex );
      98             :     ScDataPilotTableObj*    GetObjectByName_Impl(const OUString& aName);
      99             : 
     100             : public:
     101             :                             ScDataPilotTablesObj(ScDocShell* pDocSh, SCTAB nT);
     102             :     virtual                 ~ScDataPilotTablesObj();
     103             : 
     104             :     virtual void            Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE;
     105             : 
     106             :                             // XDataPilotTables
     107             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XDataPilotDescriptor > SAL_CALL
     108             :                             createDataPilotDescriptor() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     109             :     virtual void SAL_CALL   insertNewByName( const OUString& aName,
     110             :                                     const ::com::sun::star::table::CellAddress& aOutputAddress,
     111             :                                     const ::com::sun::star::uno::Reference<
     112             :                                         ::com::sun::star::sheet::XDataPilotDescriptor >& xDescriptor )
     113             :                                     throw(::com::sun::star::uno::RuntimeException,
     114             :                                           std::exception) SAL_OVERRIDE;
     115             :     virtual void SAL_CALL   removeByName( const OUString& aName )
     116             :                                     throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     117             : 
     118             :                             // XNameAccess
     119             :     virtual ::com::sun::star::uno::Any SAL_CALL getByName( const OUString& aName )
     120             :                                 throw(::com::sun::star::container::NoSuchElementException,
     121             :                                     ::com::sun::star::lang::WrappedTargetException,
     122             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     123             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getElementNames()
     124             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     125             :     virtual sal_Bool SAL_CALL hasByName( const OUString& aName )
     126             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     127             : 
     128             :                             // XIndexAccess
     129             :     virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     130             :     virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index )
     131             :                                 throw(::com::sun::star::lang::IndexOutOfBoundsException,
     132             :                                     ::com::sun::star::lang::WrappedTargetException,
     133             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     134             : 
     135             :                             // XEnumerationAccess
     136             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL
     137             :                             createEnumeration() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     138             : 
     139             :                             // XElementAccess
     140             :     virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
     141             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     142             :     virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     143             : 
     144             :                             // XServiceInfo
     145             :     virtual OUString SAL_CALL getImplementationName()
     146             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     147             :     virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName )
     148             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     149             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
     150             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     151             : };
     152             : 
     153             : //  ScDataPilotDescriptorBase is never instantiated directly
     154             : class ScDataPilotDescriptorBase : public com::sun::star::sheet::XDataPilotDescriptor,
     155             :                                   public com::sun::star::beans::XPropertySet,
     156             :                                   public com::sun::star::sheet::XDataPilotDataLayoutFieldSupplier,
     157             :                                   public com::sun::star::lang::XServiceInfo,
     158             :                                   public com::sun::star::lang::XUnoTunnel,
     159             :                                   public com::sun::star::lang::XTypeProvider,
     160             :                                   public cppu::OWeakObject,
     161             :                                   public SfxListener
     162             : {
     163             : private:
     164             :     SfxItemPropertySet  maPropSet;
     165             :     ScDocShell*         pDocShell;
     166             : 
     167             : public:
     168             :                             ScDataPilotDescriptorBase(ScDocShell* pDocSh);
     169             :     virtual                 ~ScDataPilotDescriptorBase();
     170             : 
     171             :     virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
     172             :                                 const ::com::sun::star::uno::Type & rType )
     173             :                                     throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     174             :     virtual void SAL_CALL   acquire() throw() SAL_OVERRIDE;
     175             :     virtual void SAL_CALL   release() throw() SAL_OVERRIDE;
     176             : 
     177             :     virtual void            Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE;
     178             : 
     179           0 :     ScDocShell*             GetDocShell() const     { return pDocShell; }
     180             : 
     181             :                             // in the derivatives:
     182             :     virtual ScDPObject* GetDPObject() const = 0;
     183             :     virtual void SetDPObject(ScDPObject* pDPObj) = 0;
     184             : 
     185             :                             // XDataPilotDescriptor
     186             :                             //  getName, setName, getTag, setTag in derived classes
     187             : 
     188             :     virtual ::com::sun::star::table::CellRangeAddress SAL_CALL getSourceRange()
     189             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     190             :     virtual void SAL_CALL setSourceRange( const ::com::sun::star::table::CellRangeAddress& aSourceRange )
     191             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     192             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetFilterDescriptor > SAL_CALL
     193             :                             getFilterDescriptor() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     194             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL
     195             :                             getDataPilotFields() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     196             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL
     197             :                             getColumnFields() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     198             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL
     199             :                             getRowFields() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     200             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL
     201             :                             getPageFields() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     202             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL
     203             :                             getDataFields() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     204             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL
     205             :                             getHiddenFields() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     206             : 
     207             :                             // XPropertySet
     208             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
     209             :                             SAL_CALL getPropertySetInfo(  )
     210             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     211             :     virtual void SAL_CALL   setPropertyValue( const OUString& aPropertyName,
     212             :                                     const ::com::sun::star::uno::Any& aValue )
     213             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     214             :                                     ::com::sun::star::beans::PropertyVetoException,
     215             :                                     ::com::sun::star::lang::IllegalArgumentException,
     216             :                                     ::com::sun::star::lang::WrappedTargetException,
     217             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     218             :     virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
     219             :                                     const OUString& PropertyName )
     220             :                                 throw (::com::sun::star::beans::UnknownPropertyException,
     221             :                                        ::com::sun::star::lang::WrappedTargetException,
     222             :                                        ::com::sun::star::uno::RuntimeException,
     223             :                                        std::exception) SAL_OVERRIDE;
     224             :     virtual void SAL_CALL   addPropertyChangeListener( const OUString& aPropertyName,
     225             :                                     const ::com::sun::star::uno::Reference<
     226             :                                         ::com::sun::star::beans::XPropertyChangeListener >& xListener )
     227             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     228             :                                     ::com::sun::star::lang::WrappedTargetException,
     229             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     230             :     virtual void SAL_CALL   removePropertyChangeListener( const OUString& aPropertyName,
     231             :                                     const ::com::sun::star::uno::Reference<
     232             :                                         ::com::sun::star::beans::XPropertyChangeListener >& aListener )
     233             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     234             :                                     ::com::sun::star::lang::WrappedTargetException,
     235             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     236             :     virtual void SAL_CALL   addVetoableChangeListener( const OUString& PropertyName,
     237             :                                     const ::com::sun::star::uno::Reference<
     238             :                                         ::com::sun::star::beans::XVetoableChangeListener >& aListener )
     239             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     240             :                                     ::com::sun::star::lang::WrappedTargetException,
     241             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     242             :     virtual void SAL_CALL   removeVetoableChangeListener( const OUString& PropertyName,
     243             :                                     const ::com::sun::star::uno::Reference<
     244             :                                         ::com::sun::star::beans::XVetoableChangeListener >& aListener )
     245             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     246             :                                     ::com::sun::star::lang::WrappedTargetException,
     247             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     248             : 
     249             :                             // XDataPilotDataLayoutFieldSupplier
     250             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XDataPilotField >
     251             :                             SAL_CALL getDataLayoutField()
     252             :                                 throw (::com::sun::star::uno::RuntimeException,
     253             :                                        std::exception) SAL_OVERRIDE;
     254             : 
     255             :                             // XUnoTunnel
     256             :     virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence<
     257             :                                     sal_Int8 >& aIdentifier )
     258             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     259             : 
     260             :     static const com::sun::star::uno::Sequence<sal_Int8>& getUnoTunnelId();
     261             :     SC_DLLPUBLIC static ScDataPilotDescriptorBase* getImplementation( const com::sun::star::uno::Reference<
     262             :                                     com::sun::star::sheet::XDataPilotDescriptor> xObj );
     263             : 
     264             :                             // XTypeProvider (overloaded in ScDataPilotTableObj)
     265             :     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes()
     266             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     267             :     virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
     268             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     269             : 
     270             :                             // XServiceInfo is in derived classes
     271             : };
     272             : 
     273             : class ScDataPilotDescriptor : public ScDataPilotDescriptorBase
     274             : {
     275             : private:
     276             :     ScDPObject*             mpDPObject;
     277             : 
     278             : public:
     279             :                             ScDataPilotDescriptor(ScDocShell* pDocSh);
     280             :     virtual                 ~ScDataPilotDescriptor();
     281             : 
     282             :     virtual ScDPObject* GetDPObject() const SAL_OVERRIDE;
     283             :     virtual void SetDPObject(ScDPObject* pDPObj) SAL_OVERRIDE;
     284             : 
     285             :                             // rest of XDataPilotDescriptor (incl. XNamed)
     286             :     virtual OUString SAL_CALL getName() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     287             :     virtual void SAL_CALL   setName( const OUString& aName )
     288             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     289             :     virtual OUString SAL_CALL getTag() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     290             :     virtual void SAL_CALL   setTag( const OUString& aTag )
     291             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     292             : 
     293             :                             // XServiceInfo
     294             :     virtual OUString SAL_CALL getImplementationName()
     295             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     296             :     virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName )
     297             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     298             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
     299             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     300             : };
     301             : 
     302             : class ScDataPilotTableObj : public ScDataPilotDescriptorBase,
     303             :                             public com::sun::star::sheet::XDataPilotTable2,
     304             :                             public com::sun::star::util::XModifyBroadcaster
     305             : {
     306             : private:
     307             :     SCTAB                   nTab;
     308             :     OUString                aName;
     309             :     XModifyListenerArr_Impl aModifyListeners;
     310             : 
     311             :     void                    Refreshed_Impl();
     312             : 
     313             : public:
     314             :                             ScDataPilotTableObj(ScDocShell* pDocSh, SCTAB nT, const OUString& rN);
     315             :     virtual                 ~ScDataPilotTableObj();
     316             : 
     317             :     virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
     318             :                                 const ::com::sun::star::uno::Type & rType )
     319             :                                     throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     320             :     virtual void SAL_CALL   acquire() throw() SAL_OVERRIDE;
     321             :     virtual void SAL_CALL   release() throw() SAL_OVERRIDE;
     322             : 
     323             :     virtual void            Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE;
     324             : 
     325             :     virtual ScDPObject* GetDPObject() const SAL_OVERRIDE;
     326             :     virtual void SetDPObject(ScDPObject* pDPObj) SAL_OVERRIDE;
     327             : 
     328             :                             // rest of XDataPilotDescriptor (incl. XNamed)
     329             :     virtual OUString SAL_CALL getName() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     330             :     virtual void SAL_CALL   setName( const OUString& aName )
     331             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     332             :     virtual OUString SAL_CALL getTag() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     333             :     virtual void SAL_CALL   setTag( const OUString& aTag )
     334             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     335             : 
     336             :                             // XDataPilotTable
     337             :     virtual ::com::sun::star::table::CellRangeAddress SAL_CALL getOutputRange()
     338             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     339             :     virtual void SAL_CALL   refresh() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     340             : 
     341             :                             // XDataPilotTable2
     342             :     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > >
     343             :         SAL_CALL getDrillDownData(const ::com::sun::star::table::CellAddress& aAddr)
     344             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     345             : 
     346             :     virtual ::com::sun::star::sheet::DataPilotTablePositionData
     347             :         SAL_CALL getPositionData(const ::com::sun::star::table::CellAddress& aAddr)
     348             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     349             : 
     350             :     virtual void SAL_CALL insertDrillDownSheet(const ::com::sun::star::table::CellAddress& aAddr)
     351             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     352             : 
     353             :     virtual ::com::sun::star::table::CellRangeAddress SAL_CALL getOutputRangeByType( sal_Int32 nType )
     354             :                                 throw(::com::sun::star::lang::IllegalArgumentException,
     355             :                                       ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     356             : 
     357             :                             // XModifyBroadcaster
     358             :     virtual void SAL_CALL   addModifyListener( const ::com::sun::star::uno::Reference<
     359             :                                                 ::com::sun::star::util::XModifyListener >& aListener )
     360             :                                 throw (::com::sun::star::uno::RuntimeException,
     361             :                                        std::exception) SAL_OVERRIDE;
     362             :     virtual void SAL_CALL   removeModifyListener( const ::com::sun::star::uno::Reference<
     363             :                                                 ::com::sun::star::util::XModifyListener >& aListener )
     364             :                                 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     365             : 
     366             :                             // XTypeProvider (overloaded)
     367             :     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes()
     368             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     369             :     virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
     370             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     371             : 
     372             :                             // XServiceInfo
     373             :     virtual OUString SAL_CALL getImplementationName()
     374             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     375             :     virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName )
     376             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     377             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
     378             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     379             : };
     380             : 
     381           0 : struct ScFieldIdentifier
     382             : {
     383             :     OUString     maFieldName;    /// Source field name.
     384             :     sal_Int32           mnFieldIdx;     /// Field index (if several fields with same name exist).
     385             :     bool                mbDataLayout;   /// True = data layout field collecting all data fields as items.
     386             : 
     387           0 :     inline explicit     ScFieldIdentifier() :
     388           0 :                             mnFieldIdx( 0 ), mbDataLayout( false ) {}
     389             : 
     390           0 :     inline explicit     ScFieldIdentifier( const OUString& rFieldName, sal_Int32 nFieldIdx, bool bDataLayout ) :
     391           0 :                             maFieldName( rFieldName ), mnFieldIdx( nFieldIdx ), mbDataLayout( bDataLayout ) {}
     392             : };
     393             : 
     394             : /** Base class of all implementation objects based on a DataPilot descriptor
     395             :     or DataPilot table object. Wraps acquiring and releasing the parent. */
     396             : class ScDataPilotChildObjBase
     397             : {
     398             : protected:
     399             :     explicit            ScDataPilotChildObjBase( ScDataPilotDescriptorBase& rParent );
     400             :     explicit            ScDataPilotChildObjBase( ScDataPilotDescriptorBase& rParent, const ScFieldIdentifier& rFieldId );
     401             :     virtual             ~ScDataPilotChildObjBase();
     402             : 
     403             :     /** Returns the wrapped DataPilot object (calls GetDPObject() at parent). */
     404             :     ScDPObject*         GetDPObject() const;
     405             :     /** Sets the passed DataPilot object (calls SetDPObject() at parent). */
     406             :     void                SetDPObject( ScDPObject* pDPObject );
     407             : 
     408             :     /** Returns the DataPilot dimension object related to the field described by maFieldId. */
     409             :     ScDPSaveDimension*  GetDPDimension( ScDPObject** ppDPObject = 0 ) const;
     410             : 
     411             :     /** Returns the number of members for the field described by maFieldId. */
     412             :     sal_Int32           GetMemberCount() const;
     413             :     /** Returns the collection of members for the field described by maFieldId. */
     414             :     ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >
     415             :                         GetMembers() const;
     416             : 
     417             :     ScDocShell* GetDocShell() const;
     418             : protected:
     419             :     ScDataPilotDescriptorBase& mrParent;
     420             :     ScFieldIdentifier   maFieldId;
     421             : 
     422             : private:
     423             :     ScDataPilotChildObjBase& operator=( const ScDataPilotChildObjBase& );
     424             : };
     425             : 
     426             : typedef ::cppu::WeakImplHelper4
     427             : <
     428             :     ::com::sun::star::container::XEnumerationAccess,
     429             :     ::com::sun::star::container::XIndexAccess,
     430             :     ::com::sun::star::container::XNameAccess,
     431             :     ::com::sun::star::lang::XServiceInfo
     432             : >
     433             : ScDataPilotFieldsObjImpl;
     434             : 
     435             : /** Collection of all DataPilot fields, or of all fields from a specific dimension. */
     436             : class ScDataPilotFieldsObj : public ScDataPilotChildObjBase, public ScDataPilotFieldsObjImpl
     437             : {
     438             : public:
     439             :     explicit            ScDataPilotFieldsObj(
     440             :                             ScDataPilotDescriptorBase& rParent );
     441             : 
     442             :     explicit            ScDataPilotFieldsObj(
     443             :                             ScDataPilotDescriptorBase& rParent,
     444             :                             ::com::sun::star::sheet::DataPilotFieldOrientation eOrient );
     445             : 
     446             :     virtual             ~ScDataPilotFieldsObj();
     447             : 
     448             :                             // XNameAccess
     449             :     virtual ::com::sun::star::uno::Any SAL_CALL getByName( const OUString& aName )
     450             :                                 throw(::com::sun::star::container::NoSuchElementException,
     451             :                                     ::com::sun::star::lang::WrappedTargetException,
     452             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     453             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getElementNames()
     454             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     455             :     virtual sal_Bool SAL_CALL hasByName( const OUString& aName )
     456             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     457             : 
     458             :                             // XIndexAccess
     459             :     virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     460             :     virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index )
     461             :                                 throw(::com::sun::star::lang::IndexOutOfBoundsException,
     462             :                                     ::com::sun::star::lang::WrappedTargetException,
     463             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     464             : 
     465             :                             // XEnumerationAccess
     466             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL
     467             :                             createEnumeration() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     468             : 
     469             :                             // XElementAccess
     470             :     virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
     471             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     472             :     virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     473             : 
     474             :                             // XServiceInfo
     475             :     virtual OUString SAL_CALL getImplementationName()
     476             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     477             :     virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName )
     478             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     479             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
     480             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     481             : 
     482             : private:
     483             :     ScDataPilotFieldObj*    GetObjectByIndex_Impl( sal_Int32 nIndex ) const;
     484             :     ScDataPilotFieldObj*    GetObjectByName_Impl( const OUString& rName ) const;
     485             : 
     486             : private:
     487             :     ::com::sun::star::uno::Any maOrient;    /// Field orientation, no value = all fields.
     488             : };
     489             : 
     490             : typedef ::cppu::WeakImplHelper5
     491             : <
     492             :     ::com::sun::star::container::XNamed,
     493             :     ::com::sun::star::beans::XPropertySet,
     494             :     ::com::sun::star::sheet::XDataPilotField,
     495             :     ::com::sun::star::sheet::XDataPilotFieldGrouping,
     496             :     ::com::sun::star::lang::XServiceInfo
     497             : >
     498             : ScDataPilotFieldObjImpl;
     499             : 
     500             : /** Implementation of a single DataPilot field. */
     501             : class ScDataPilotFieldObj : public ScDataPilotChildObjBase, public ScDataPilotFieldObjImpl
     502             : {
     503             : public:
     504             :                         ScDataPilotFieldObj(
     505             :                             ScDataPilotDescriptorBase& rParent,
     506             :                             const ScFieldIdentifier& rIdent );
     507             : 
     508             :                         ScDataPilotFieldObj(
     509             :                             ScDataPilotDescriptorBase& rParent,
     510             :                             const ScFieldIdentifier& rIdent,
     511             :                             const ::com::sun::star::uno::Any& rOrient );
     512             : 
     513             :     virtual             ~ScDataPilotFieldObj();
     514             : 
     515             :                             // XNamed
     516             :     virtual OUString SAL_CALL getName()
     517             :         throw (::com::sun::star::uno::RuntimeException,
     518             :                std::exception) SAL_OVERRIDE;
     519             :     virtual void SAL_CALL   setName(const OUString& aName)
     520             :         throw (::com::sun::star::uno::RuntimeException,
     521             :                std::exception) SAL_OVERRIDE;
     522             : 
     523             :                             // XPropertySet
     524             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
     525             :                             SAL_CALL getPropertySetInfo(  )
     526             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     527             :     virtual void SAL_CALL   setPropertyValue( const OUString& aPropertyName,
     528             :                                     const ::com::sun::star::uno::Any& aValue )
     529             :                                 throw (::com::sun::star::beans::UnknownPropertyException,
     530             :                                        ::com::sun::star::beans::PropertyVetoException,
     531             :                                        ::com::sun::star::lang::IllegalArgumentException,
     532             :                                        ::com::sun::star::lang::WrappedTargetException,
     533             :                                        ::com::sun::star::uno::RuntimeException,
     534             :                                        std::exception) SAL_OVERRIDE;
     535             :     virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
     536             :                                     const OUString& PropertyName )
     537             :                                 throw (::com::sun::star::beans::UnknownPropertyException,
     538             :                                        ::com::sun::star::lang::WrappedTargetException,
     539             :                                        ::com::sun::star::uno::RuntimeException,
     540             :                                        std::exception) SAL_OVERRIDE;
     541             :     virtual void SAL_CALL   addPropertyChangeListener( const OUString& aPropertyName,
     542             :                                     const ::com::sun::star::uno::Reference<
     543             :                                         ::com::sun::star::beans::XPropertyChangeListener >& xListener )
     544             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     545             :                                     ::com::sun::star::lang::WrappedTargetException,
     546             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     547             :     virtual void SAL_CALL   removePropertyChangeListener( const OUString& aPropertyName,
     548             :                                     const ::com::sun::star::uno::Reference<
     549             :                                         ::com::sun::star::beans::XPropertyChangeListener >& aListener )
     550             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     551             :                                     ::com::sun::star::lang::WrappedTargetException,
     552             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     553             :     virtual void SAL_CALL   addVetoableChangeListener( const OUString& PropertyName,
     554             :                                     const ::com::sun::star::uno::Reference<
     555             :                                         ::com::sun::star::beans::XVetoableChangeListener >& aListener )
     556             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     557             :                                     ::com::sun::star::lang::WrappedTargetException,
     558             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     559             :     virtual void SAL_CALL   removeVetoableChangeListener( const OUString& PropertyName,
     560             :                                     const ::com::sun::star::uno::Reference<
     561             :                                         ::com::sun::star::beans::XVetoableChangeListener >& aListener )
     562             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     563             :                                     ::com::sun::star::lang::WrappedTargetException,
     564             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     565             : 
     566             :                             // XDatePilotField
     567             :     virtual com::sun::star::uno::Reference<com::sun::star::container::XIndexAccess> SAL_CALL
     568             :                                 getItems() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     569             : 
     570             :                             // only called from property-functions:
     571             :     com::sun::star::sheet::DataPilotFieldOrientation getOrientation(void) const;
     572             :     void setOrientation(com::sun::star::sheet::DataPilotFieldOrientation Orientation);
     573             :     com::sun::star::sheet::GeneralFunction getFunction(void) const;
     574             :     void setFunction(com::sun::star::sheet::GeneralFunction Function);
     575             :     com::sun::star::uno::Sequence< com::sun::star::sheet::GeneralFunction > getSubtotals() const;
     576             :     void setSubtotals(const com::sun::star::uno::Sequence< com::sun::star::sheet::GeneralFunction >& rFunctions);
     577             :     OUString getCurrentPage() const;
     578             :     void setCurrentPage(const OUString& sPage);
     579             :     bool getUseCurrentPage() const;
     580             :     void setUseCurrentPage(bool bUse);
     581             :     const com::sun::star::sheet::DataPilotFieldAutoShowInfo* getAutoShowInfo();
     582             :     void setAutoShowInfo(const com::sun::star::sheet::DataPilotFieldAutoShowInfo* pInfo);
     583             :     const com::sun::star::sheet::DataPilotFieldLayoutInfo* getLayoutInfo();
     584             :     void setLayoutInfo(const com::sun::star::sheet::DataPilotFieldLayoutInfo* pInfo);
     585             :     const com::sun::star::sheet::DataPilotFieldReference* getReference();
     586             :     void setReference(const com::sun::star::sheet::DataPilotFieldReference* pInfo);
     587             :     const com::sun::star::sheet::DataPilotFieldSortInfo* getSortInfo();
     588             :     void setSortInfo(const com::sun::star::sheet::DataPilotFieldSortInfo* pInfo);
     589             :     bool getShowEmpty() const;
     590             :     void setShowEmpty(bool bShow);
     591             : 
     592             :     bool hasGroupInfo();
     593             :     com::sun::star::sheet::DataPilotFieldGroupInfo getGroupInfo();
     594             :     void setGroupInfo(const com::sun::star::sheet::DataPilotFieldGroupInfo* pInfo);
     595             : 
     596             :                             // XDataPilotFieldGrouping
     597             :     bool HasString(const com::sun::star::uno::Sequence< OUString >& aItems, const OUString& aString);
     598             :     virtual com::sun::star::uno::Reference < com::sun::star::sheet::XDataPilotField > SAL_CALL
     599             :         createNameGroup(const com::sun::star::uno::Sequence< OUString >& aItems)
     600             :              throw (::com::sun::star::uno::RuntimeException,
     601             :                     ::com::sun::star::lang::IllegalArgumentException,
     602             :                     std::exception) SAL_OVERRIDE;
     603             :     virtual com::sun::star::uno::Reference < com::sun::star::sheet::XDataPilotField > SAL_CALL
     604             :         createDateGroup(const com::sun::star::sheet::DataPilotFieldGroupInfo& rInfo)
     605             :              throw (::com::sun::star::uno::RuntimeException,
     606             :                     ::com::sun::star::lang::IllegalArgumentException,
     607             :                     std::exception) SAL_OVERRIDE;
     608             : 
     609             :                             // XServiceInfo
     610             :     virtual OUString SAL_CALL getImplementationName()
     611             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     612             :     virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName )
     613             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     614             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
     615             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     616             : 
     617             : private:
     618             :     ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >
     619             :                         mxItems;
     620             :     SfxItemPropertySet  maPropSet;
     621             :     ::com::sun::star::uno::Any maOrient;
     622             : };
     623             : 
     624             : typedef ::std::vector< OUString > ScFieldGroupMembers;
     625             : 
     626           0 : struct ScFieldGroup
     627             : {
     628             :     OUString     maName;
     629             :     ScFieldGroupMembers maMembers;
     630             : };
     631             : 
     632             : typedef ::std::vector< ScFieldGroup > ScFieldGroups;
     633             : 
     634             : typedef ::cppu::WeakImplHelper4
     635             : <
     636             :     ::com::sun::star::container::XNameContainer,
     637             :     ::com::sun::star::container::XEnumerationAccess,
     638             :     ::com::sun::star::container::XIndexAccess,
     639             :     ::com::sun::star::lang::XServiceInfo
     640             : >
     641             : ScDataPilotFieldGroupsObjImpl;
     642             : 
     643             : /** Implementation of all grouped items in a DataPilot field.
     644             : 
     645             :     This is a stand-alone object without any connection to the base DataPilot
     646             :     field. Grouping info has to be written back with the GroupInfo property of
     647             :     the DataPilot field after modifying this object.
     648             :  */
     649             : class ScDataPilotFieldGroupsObj : public ScDataPilotFieldGroupsObjImpl
     650             : {
     651             : public:
     652             :     explicit            ScDataPilotFieldGroupsObj( const ScFieldGroups& rGroups );
     653             :     virtual             ~ScDataPilotFieldGroupsObj();
     654             : 
     655             :                             // XNameAccess
     656             :     virtual ::com::sun::star::uno::Any SAL_CALL getByName( const OUString& aName )
     657             :                                 throw(::com::sun::star::container::NoSuchElementException,
     658             :                                     ::com::sun::star::lang::WrappedTargetException,
     659             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     660             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getElementNames()
     661             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     662             :     virtual sal_Bool SAL_CALL hasByName( const OUString& aName )
     663             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     664             : 
     665             :                                 // XNameReplace
     666             :     virtual void SAL_CALL replaceByName( const OUString& aName,
     667             :                                 const ::com::sun::star::uno::Any& aElement )
     668             :                                 throw (::com::sun::star::lang::IllegalArgumentException,
     669             :                                     ::com::sun::star::container::NoSuchElementException,
     670             :                                     ::com::sun::star::lang::WrappedTargetException,
     671             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     672             : 
     673             :                             // XNameContainer
     674             :     virtual void SAL_CALL insertByName( const OUString& aName,
     675             :                                 const ::com::sun::star::uno::Any& aElement )
     676             :                                 throw (::com::sun::star::lang::IllegalArgumentException,
     677             :                                     ::com::sun::star::container::ElementExistException,
     678             :                                     ::com::sun::star::lang::WrappedTargetException,
     679             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     680             :     virtual void SAL_CALL removeByName( const OUString& Name )
     681             :                                 throw (::com::sun::star::container::NoSuchElementException,
     682             :                                     ::com::sun::star::lang::WrappedTargetException,
     683             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     684             : 
     685             :                         // XIndexAccess
     686             :     virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     687             :     virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index )
     688             :                                 throw(::com::sun::star::lang::IndexOutOfBoundsException,
     689             :                                     ::com::sun::star::lang::WrappedTargetException,
     690             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     691             : 
     692             :                             // XEnumerationAccess
     693             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL
     694             :                             createEnumeration() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     695             : 
     696             :                             // XElementAccess
     697             :     virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
     698             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     699             :     virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     700             : 
     701             :                             // XServiceInfo
     702             :     virtual OUString SAL_CALL getImplementationName()
     703             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     704             :     virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName )
     705             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     706             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
     707             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     708             : 
     709             :     // implementation
     710             :     ScFieldGroup&       getFieldGroup( const OUString& rName ) throw(::com::sun::star::uno::RuntimeException);
     711             :     void                renameFieldGroup( const OUString& rOldName, const OUString& rNewName ) throw(::com::sun::star::uno::RuntimeException);
     712             : 
     713             : private:
     714             :     ScFieldGroups::iterator implFindByName( const OUString& rName );
     715             : 
     716             : private:
     717             :     ScFieldGroups       maGroups;
     718             : };
     719             : 
     720             : typedef ::cppu::WeakImplHelper5
     721             : <
     722             :     ::com::sun::star::container::XNameContainer,
     723             :     ::com::sun::star::container::XEnumerationAccess,
     724             :     ::com::sun::star::container::XIndexAccess,
     725             :     ::com::sun::star::container::XNamed,
     726             :     ::com::sun::star::lang::XServiceInfo
     727             : >
     728             : ScDataPilotFieldGroupObjImpl;
     729             : 
     730             : class ScDataPilotFieldGroupObj : public ScDataPilotFieldGroupObjImpl
     731             : {
     732             : public:
     733             :     explicit            ScDataPilotFieldGroupObj( ScDataPilotFieldGroupsObj& rParent, const OUString& rGroupName );
     734             :     virtual             ~ScDataPilotFieldGroupObj();
     735             : 
     736             :                             // XNameAccess
     737             :     virtual ::com::sun::star::uno::Any SAL_CALL getByName( const OUString& aName )
     738             :                                 throw(::com::sun::star::container::NoSuchElementException,
     739             :                                     ::com::sun::star::lang::WrappedTargetException,
     740             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     741             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getElementNames()
     742             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     743             :     virtual sal_Bool SAL_CALL hasByName( const OUString& aName )
     744             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     745             : 
     746             :                                 // XNameReplace
     747             :     virtual void SAL_CALL replaceByName( const OUString& aName,
     748             :                                 const ::com::sun::star::uno::Any& aElement )
     749             :                                 throw (::com::sun::star::lang::IllegalArgumentException,
     750             :                                     ::com::sun::star::container::NoSuchElementException,
     751             :                                     ::com::sun::star::lang::WrappedTargetException,
     752             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     753             : 
     754             :                                 // XNameContainer
     755             :     virtual void SAL_CALL insertByName( const OUString& aName,
     756             :                                 const ::com::sun::star::uno::Any& aElement )
     757             :                                 throw (::com::sun::star::lang::IllegalArgumentException,
     758             :                                     ::com::sun::star::container::ElementExistException,
     759             :                                     ::com::sun::star::lang::WrappedTargetException,
     760             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     761             :     virtual void SAL_CALL removeByName( const OUString& Name )
     762             :                                 throw (::com::sun::star::container::NoSuchElementException,
     763             :                                     ::com::sun::star::lang::WrappedTargetException,
     764             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     765             : 
     766             :                     // XIndexAccess
     767             :     virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     768             :     virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index )
     769             :                                 throw(::com::sun::star::lang::IndexOutOfBoundsException,
     770             :                                     ::com::sun::star::lang::WrappedTargetException,
     771             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     772             : 
     773             :                             // XEnumerationAccess
     774             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL
     775             :                             createEnumeration() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     776             : 
     777             :                             // XElementAccess
     778             :     virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
     779             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     780             :     virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     781             : 
     782             :                             // XNamed
     783             :     virtual OUString SAL_CALL getName() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     784             :     virtual void SAL_CALL   setName( const OUString& aName )
     785             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     786             : 
     787             :                             // XServiceInfo
     788             :     virtual OUString SAL_CALL getImplementationName()
     789             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     790             :     virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName )
     791             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     792             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
     793             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     794             : 
     795             : private:
     796             :     ScDataPilotFieldGroupsObj& mrParent;
     797             :     OUString     maGroupName;
     798             : };
     799             : 
     800             : typedef ::cppu::WeakImplHelper2
     801             : <
     802             :     ::com::sun::star::container::XNamed,
     803             :     ::com::sun::star::lang::XServiceInfo
     804             : >
     805             : ScDataPilotFieldGroupItemObjImpl;
     806             : 
     807             : class ScDataPilotFieldGroupItemObj : public ScDataPilotFieldGroupItemObjImpl
     808             : {
     809             : public:
     810             :     explicit            ScDataPilotFieldGroupItemObj( ScDataPilotFieldGroupObj& rParent, const OUString& rName );
     811             :     virtual             ~ScDataPilotFieldGroupItemObj();
     812             : 
     813             :                             // XNamed
     814             :     virtual OUString SAL_CALL getName() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     815             :     virtual void SAL_CALL   setName( const OUString& aName )
     816             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     817             : 
     818             :                             // XServiceInfo
     819             :     virtual OUString SAL_CALL getImplementationName()
     820             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     821             :     virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName )
     822             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     823             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
     824             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     825             : 
     826             : private:
     827             :     ScDataPilotFieldGroupObj& mrParent;
     828             :     OUString     maName;
     829             : };
     830             : 
     831             : typedef ::cppu::WeakImplHelper4
     832             : <
     833             :     ::com::sun::star::container::XEnumerationAccess,
     834             :     ::com::sun::star::container::XIndexAccess,
     835             :     ::com::sun::star::container::XNameAccess,
     836             :     ::com::sun::star::lang::XServiceInfo
     837             : >
     838             : ScDataPilotItemsObjImpl;
     839             : 
     840             : class ScDataPilotItemsObj : public ScDataPilotChildObjBase, public ScDataPilotItemsObjImpl
     841             : {
     842             : public:
     843             :     explicit            ScDataPilotItemsObj( ScDataPilotDescriptorBase& rParent, const ScFieldIdentifier& rFieldId );
     844             :     virtual             ~ScDataPilotItemsObj();
     845             : 
     846             :                             // XNameAccess
     847             :     virtual ::com::sun::star::uno::Any SAL_CALL getByName( const OUString& aName )
     848             :                                 throw(::com::sun::star::container::NoSuchElementException,
     849             :                                     ::com::sun::star::lang::WrappedTargetException,
     850             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     851             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getElementNames()
     852             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     853             :     virtual sal_Bool SAL_CALL hasByName( const OUString& aName )
     854             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     855             : 
     856             :                             // XIndexAccess
     857             :     virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     858             :     virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index )
     859             :                                 throw(::com::sun::star::lang::IndexOutOfBoundsException,
     860             :                                     ::com::sun::star::lang::WrappedTargetException,
     861             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     862             : 
     863             :                             // XEnumerationAccess
     864             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL
     865             :                             createEnumeration() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     866             : 
     867             :                             // XElementAccess
     868             :     virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
     869             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     870             :     virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     871             : 
     872             :                             // XServiceInfo
     873             :     virtual OUString SAL_CALL getImplementationName()
     874             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     875             :     virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName )
     876             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     877             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
     878             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     879             : 
     880             : private:
     881             :     ScDataPilotItemObj* GetObjectByIndex_Impl( sal_Int32 nIndex ) const;
     882             : };
     883             : 
     884             : typedef ::cppu::WeakImplHelper3
     885             : <
     886             :     ::com::sun::star::container::XNamed,
     887             :     ::com::sun::star::beans::XPropertySet,
     888             :     ::com::sun::star::lang::XServiceInfo
     889             : >
     890             : ScDataPilotItemObjImpl;
     891             : 
     892             : class ScDataPilotItemObj : public ScDataPilotChildObjBase, public ScDataPilotItemObjImpl
     893             : {
     894             : public:
     895             :     explicit            ScDataPilotItemObj(
     896             :                             ScDataPilotDescriptorBase& rParent,
     897             :                             const ScFieldIdentifier& rFieldId,
     898             :                             sal_Int32 nIndex );
     899             : 
     900             :     virtual             ~ScDataPilotItemObj();
     901             : 
     902             :                             // XNamed
     903             :     virtual OUString SAL_CALL getName() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     904             :     virtual void SAL_CALL   setName( const OUString& aName )
     905             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     906             : 
     907             :                             // XPropertySet
     908             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
     909             :                             SAL_CALL getPropertySetInfo(  )
     910             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     911             :     virtual void SAL_CALL   setPropertyValue( const OUString& aPropertyName,
     912             :                                     const ::com::sun::star::uno::Any& aValue )
     913             :                                 throw (::com::sun::star::beans::UnknownPropertyException,
     914             :                                        ::com::sun::star::beans::PropertyVetoException,
     915             :                                        ::com::sun::star::lang::IllegalArgumentException,
     916             :                                        ::com::sun::star::lang::WrappedTargetException,
     917             :                                        ::com::sun::star::uno::RuntimeException,
     918             :                                        std::exception) SAL_OVERRIDE;
     919             :     virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
     920             :                                     const OUString& PropertyName )
     921             :                                 throw (::com::sun::star::beans::UnknownPropertyException,
     922             :                                        ::com::sun::star::lang::WrappedTargetException,
     923             :                                        ::com::sun::star::uno::RuntimeException,
     924             :                                        std::exception) SAL_OVERRIDE;
     925             :     virtual void SAL_CALL   addPropertyChangeListener( const OUString& aPropertyName,
     926             :                                     const ::com::sun::star::uno::Reference<
     927             :                                         ::com::sun::star::beans::XPropertyChangeListener >& xListener )
     928             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     929             :                                     ::com::sun::star::lang::WrappedTargetException,
     930             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     931             :     virtual void SAL_CALL   removePropertyChangeListener( const OUString& aPropertyName,
     932             :                                     const ::com::sun::star::uno::Reference<
     933             :                                         ::com::sun::star::beans::XPropertyChangeListener >& aListener )
     934             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     935             :                                     ::com::sun::star::lang::WrappedTargetException,
     936             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     937             :     virtual void SAL_CALL   addVetoableChangeListener( const OUString& PropertyName,
     938             :                                     const ::com::sun::star::uno::Reference<
     939             :                                         ::com::sun::star::beans::XVetoableChangeListener >& aListener )
     940             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     941             :                                     ::com::sun::star::lang::WrappedTargetException,
     942             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     943             :     virtual void SAL_CALL   removeVetoableChangeListener( const OUString& PropertyName,
     944             :                                     const ::com::sun::star::uno::Reference<
     945             :                                         ::com::sun::star::beans::XVetoableChangeListener >& aListener )
     946             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     947             :                                     ::com::sun::star::lang::WrappedTargetException,
     948             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     949             : 
     950             :                             // XServiceInfo
     951             :     virtual OUString SAL_CALL getImplementationName()
     952             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     953             :     virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName )
     954             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     955             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
     956             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     957             : 
     958             : private:
     959             :     SfxItemPropertySet  maPropSet;
     960             :     sal_Int32           mnIndex;
     961             : };
     962             : 
     963             : #endif
     964             : 
     965             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10