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

Generated by: LCOV version 1.11