LCOV - code coverage report
Current view: top level - sc/inc - dapiuno.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 7 7 100.0 %
Date: 2014-11-03 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        1556 :     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 com::sun::star::uno::Reference<
     261             :                                     com::sun::star::sheet::XDataPilotDescriptor> xObj );
     262             : 
     263             :                             // XTypeProvider (overloaded in ScDataPilotTableObj)
     264             :     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes()
     265             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     266             :     virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
     267             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     268             : 
     269             :                             // XServiceInfo is in derived classes
     270             : };
     271             : 
     272             : class ScDataPilotDescriptor : public ScDataPilotDescriptorBase
     273             : {
     274             : private:
     275             :     ScDPObject*             mpDPObject;
     276             : 
     277             : public:
     278             :                             ScDataPilotDescriptor(ScDocShell* pDocSh);
     279             :     virtual                 ~ScDataPilotDescriptor();
     280             : 
     281             :     virtual ScDPObject* GetDPObject() const SAL_OVERRIDE;
     282             :     virtual void SetDPObject(ScDPObject* pDPObj) SAL_OVERRIDE;
     283             : 
     284             :                             // rest of XDataPilotDescriptor (incl. XNamed)
     285             :     virtual OUString SAL_CALL getName() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     286             :     virtual void SAL_CALL   setName( const OUString& aName )
     287             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     288             :     virtual OUString SAL_CALL getTag() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     289             :     virtual void SAL_CALL   setTag( const OUString& aTag )
     290             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     291             : 
     292             :                             // XServiceInfo
     293             :     virtual OUString SAL_CALL getImplementationName()
     294             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     295             :     virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName )
     296             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     297             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
     298             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     299             : };
     300             : 
     301             : class ScDataPilotTableObj : public ScDataPilotDescriptorBase,
     302             :                             public com::sun::star::sheet::XDataPilotTable2,
     303             :                             public com::sun::star::util::XModifyBroadcaster
     304             : {
     305             : private:
     306             :     SCTAB                   nTab;
     307             :     OUString                aName;
     308             :     XModifyListenerArr_Impl aModifyListeners;
     309             : 
     310             :     void                    Refreshed_Impl();
     311             : 
     312             : public:
     313             :                             ScDataPilotTableObj(ScDocShell* pDocSh, SCTAB nT, const OUString& rN);
     314             :     virtual                 ~ScDataPilotTableObj();
     315             : 
     316             :     virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
     317             :                                 const ::com::sun::star::uno::Type & rType )
     318             :                                     throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     319             :     virtual void SAL_CALL   acquire() throw() SAL_OVERRIDE;
     320             :     virtual void SAL_CALL   release() throw() SAL_OVERRIDE;
     321             : 
     322             :     virtual void            Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE;
     323             : 
     324             :     virtual ScDPObject* GetDPObject() const SAL_OVERRIDE;
     325             :     virtual void SetDPObject(ScDPObject* pDPObj) SAL_OVERRIDE;
     326             : 
     327             :                             // rest of XDataPilotDescriptor (incl. XNamed)
     328             :     virtual OUString SAL_CALL getName() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     329             :     virtual void SAL_CALL   setName( const OUString& aName )
     330             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     331             :     virtual OUString SAL_CALL getTag() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     332             :     virtual void SAL_CALL   setTag( const OUString& aTag )
     333             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     334             : 
     335             :                             // XDataPilotTable
     336             :     virtual ::com::sun::star::table::CellRangeAddress SAL_CALL getOutputRange()
     337             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     338             :     virtual void SAL_CALL   refresh() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     339             : 
     340             :                             // XDataPilotTable2
     341             :     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > >
     342             :         SAL_CALL getDrillDownData(const ::com::sun::star::table::CellAddress& aAddr)
     343             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     344             : 
     345             :     virtual ::com::sun::star::sheet::DataPilotTablePositionData
     346             :         SAL_CALL getPositionData(const ::com::sun::star::table::CellAddress& aAddr)
     347             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     348             : 
     349             :     virtual void SAL_CALL insertDrillDownSheet(const ::com::sun::star::table::CellAddress& aAddr)
     350             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     351             : 
     352             :     virtual ::com::sun::star::table::CellRangeAddress SAL_CALL getOutputRangeByType( sal_Int32 nType )
     353             :                                 throw(::com::sun::star::lang::IllegalArgumentException,
     354             :                                       ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     355             : 
     356             :                             // XModifyBroadcaster
     357             :     virtual void SAL_CALL   addModifyListener( const ::com::sun::star::uno::Reference<
     358             :                                                 ::com::sun::star::util::XModifyListener >& aListener )
     359             :                                 throw (::com::sun::star::uno::RuntimeException,
     360             :                                        std::exception) SAL_OVERRIDE;
     361             :     virtual void SAL_CALL   removeModifyListener( const ::com::sun::star::uno::Reference<
     362             :                                                 ::com::sun::star::util::XModifyListener >& aListener )
     363             :                                 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     364             : 
     365             :                             // XTypeProvider (overloaded)
     366             :     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes()
     367             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     368             :     virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
     369             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     370             : 
     371             :                             // XServiceInfo
     372             :     virtual OUString SAL_CALL getImplementationName()
     373             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     374             :     virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName )
     375             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     376             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
     377             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     378             : };
     379             : 
     380        1404 : struct ScFieldIdentifier
     381             : {
     382             :     OUString     maFieldName;    /// Source field name.
     383             :     sal_Int32           mnFieldIdx;     /// Field index (if several fields with same name exist).
     384             :     bool                mbDataLayout;   /// True = data layout field collecting all data fields as items.
     385             : 
     386         594 :     inline explicit     ScFieldIdentifier() :
     387         594 :                             mnFieldIdx( 0 ), mbDataLayout( false ) {}
     388             : 
     389           4 :     inline explicit     ScFieldIdentifier( const OUString& rFieldName, sal_Int32 nFieldIdx, bool bDataLayout ) :
     390           4 :                             maFieldName( rFieldName ), mnFieldIdx( nFieldIdx ), mbDataLayout( bDataLayout ) {}
     391             : };
     392             : 
     393             : /** Base class of all implementation objects based on a DataPilot descriptor
     394             :     or DataPilot table object. Wraps acquiring and releasing the parent. */
     395             : class ScDataPilotChildObjBase
     396             : {
     397             : protected:
     398             :     explicit            ScDataPilotChildObjBase( ScDataPilotDescriptorBase& rParent );
     399             :     explicit            ScDataPilotChildObjBase( ScDataPilotDescriptorBase& rParent, const ScFieldIdentifier& rFieldId );
     400             :     virtual             ~ScDataPilotChildObjBase();
     401             : 
     402             :     /** Returns the wrapped DataPilot object (calls GetDPObject() at parent). */
     403             :     ScDPObject*         GetDPObject() const;
     404             :     /** Sets the passed DataPilot object (calls SetDPObject() at parent). */
     405             :     void                SetDPObject( ScDPObject* pDPObject );
     406             : 
     407             :     /** Returns the DataPilot dimension object related to the field described by maFieldId. */
     408             :     ScDPSaveDimension*  GetDPDimension( ScDPObject** ppDPObject = 0 ) const;
     409             : 
     410             :     /** Returns the number of members for the field described by maFieldId. */
     411             :     sal_Int32           GetMemberCount() const;
     412             :     /** Returns the collection of members for the field described by maFieldId. */
     413             :     ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >
     414             :                         GetMembers() const;
     415             : 
     416             :     ScDocShell* GetDocShell() const;
     417             : protected:
     418             :     ScDataPilotDescriptorBase& mrParent;
     419             :     ScFieldIdentifier   maFieldId;
     420             : 
     421             : private:
     422             :     ScDataPilotChildObjBase& operator=( const ScDataPilotChildObjBase& );
     423             : };
     424             : 
     425             : typedef ::cppu::WeakImplHelper4
     426             : <
     427             :     ::com::sun::star::container::XEnumerationAccess,
     428             :     ::com::sun::star::container::XIndexAccess,
     429             :     ::com::sun::star::container::XNameAccess,
     430             :     ::com::sun::star::lang::XServiceInfo
     431             : >
     432             : ScDataPilotFieldsObjImpl;
     433             : 
     434             : /** Collection of all DataPilot fields, or of all fields from a specific dimension. */
     435             : class ScDataPilotFieldsObj : public ScDataPilotChildObjBase, public ScDataPilotFieldsObjImpl
     436             : {
     437             : public:
     438             :     explicit            ScDataPilotFieldsObj(
     439             :                             ScDataPilotDescriptorBase& rParent );
     440             : 
     441             :     explicit            ScDataPilotFieldsObj(
     442             :                             ScDataPilotDescriptorBase& rParent,
     443             :                             ::com::sun::star::sheet::DataPilotFieldOrientation eOrient );
     444             : 
     445             :     virtual             ~ScDataPilotFieldsObj();
     446             : 
     447             :                             // XNameAccess
     448             :     virtual ::com::sun::star::uno::Any SAL_CALL getByName( const OUString& aName )
     449             :                                 throw(::com::sun::star::container::NoSuchElementException,
     450             :                                     ::com::sun::star::lang::WrappedTargetException,
     451             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     452             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getElementNames()
     453             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     454             :     virtual sal_Bool SAL_CALL hasByName( const OUString& aName )
     455             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     456             : 
     457             :                             // XIndexAccess
     458             :     virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     459             :     virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index )
     460             :                                 throw(::com::sun::star::lang::IndexOutOfBoundsException,
     461             :                                     ::com::sun::star::lang::WrappedTargetException,
     462             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     463             : 
     464             :                             // XEnumerationAccess
     465             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL
     466             :                             createEnumeration() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     467             : 
     468             :                             // XElementAccess
     469             :     virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
     470             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     471             :     virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     472             : 
     473             :                             // XServiceInfo
     474             :     virtual OUString SAL_CALL getImplementationName()
     475             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     476             :     virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName )
     477             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     478             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
     479             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     480             : 
     481             : private:
     482             :     ScDataPilotFieldObj*    GetObjectByIndex_Impl( sal_Int32 nIndex ) const;
     483             :     ScDataPilotFieldObj*    GetObjectByName_Impl( const OUString& rName ) const;
     484             : 
     485             : private:
     486             :     ::com::sun::star::uno::Any maOrient;    /// Field orientation, no value = all fields.
     487             : };
     488             : 
     489             : typedef ::cppu::WeakImplHelper5
     490             : <
     491             :     ::com::sun::star::container::XNamed,
     492             :     ::com::sun::star::beans::XPropertySet,
     493             :     ::com::sun::star::sheet::XDataPilotField,
     494             :     ::com::sun::star::sheet::XDataPilotFieldGrouping,
     495             :     ::com::sun::star::lang::XServiceInfo
     496             : >
     497             : ScDataPilotFieldObjImpl;
     498             : 
     499             : /** Implementation of a single DataPilot field. */
     500             : class ScDataPilotFieldObj : public ScDataPilotChildObjBase, public ScDataPilotFieldObjImpl
     501             : {
     502             : public:
     503             :                         ScDataPilotFieldObj(
     504             :                             ScDataPilotDescriptorBase& rParent,
     505             :                             const ScFieldIdentifier& rIdent );
     506             : 
     507             :                         ScDataPilotFieldObj(
     508             :                             ScDataPilotDescriptorBase& rParent,
     509             :                             const ScFieldIdentifier& rIdent,
     510             :                             const ::com::sun::star::uno::Any& rOrient );
     511             : 
     512             :     virtual             ~ScDataPilotFieldObj();
     513             : 
     514             :                             // XNamed
     515             :     virtual OUString SAL_CALL getName()
     516             :         throw (::com::sun::star::uno::RuntimeException,
     517             :                std::exception) SAL_OVERRIDE;
     518             :     virtual void SAL_CALL   setName(const OUString& aName)
     519             :         throw (::com::sun::star::uno::RuntimeException,
     520             :                std::exception) SAL_OVERRIDE;
     521             : 
     522             :                             // XPropertySet
     523             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
     524             :                             SAL_CALL getPropertySetInfo(  )
     525             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     526             :     virtual void SAL_CALL   setPropertyValue( const OUString& aPropertyName,
     527             :                                     const ::com::sun::star::uno::Any& aValue )
     528             :                                 throw (::com::sun::star::beans::UnknownPropertyException,
     529             :                                        ::com::sun::star::beans::PropertyVetoException,
     530             :                                        ::com::sun::star::lang::IllegalArgumentException,
     531             :                                        ::com::sun::star::lang::WrappedTargetException,
     532             :                                        ::com::sun::star::uno::RuntimeException,
     533             :                                        std::exception) SAL_OVERRIDE;
     534             :     virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
     535             :                                     const OUString& PropertyName )
     536             :                                 throw (::com::sun::star::beans::UnknownPropertyException,
     537             :                                        ::com::sun::star::lang::WrappedTargetException,
     538             :                                        ::com::sun::star::uno::RuntimeException,
     539             :                                        std::exception) SAL_OVERRIDE;
     540             :     virtual void SAL_CALL   addPropertyChangeListener( const OUString& aPropertyName,
     541             :                                     const ::com::sun::star::uno::Reference<
     542             :                                         ::com::sun::star::beans::XPropertyChangeListener >& xListener )
     543             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     544             :                                     ::com::sun::star::lang::WrappedTargetException,
     545             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     546             :     virtual void SAL_CALL   removePropertyChangeListener( const OUString& aPropertyName,
     547             :                                     const ::com::sun::star::uno::Reference<
     548             :                                         ::com::sun::star::beans::XPropertyChangeListener >& aListener )
     549             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     550             :                                     ::com::sun::star::lang::WrappedTargetException,
     551             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     552             :     virtual void SAL_CALL   addVetoableChangeListener( const OUString& PropertyName,
     553             :                                     const ::com::sun::star::uno::Reference<
     554             :                                         ::com::sun::star::beans::XVetoableChangeListener >& aListener )
     555             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     556             :                                     ::com::sun::star::lang::WrappedTargetException,
     557             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     558             :     virtual void SAL_CALL   removeVetoableChangeListener( const OUString& PropertyName,
     559             :                                     const ::com::sun::star::uno::Reference<
     560             :                                         ::com::sun::star::beans::XVetoableChangeListener >& aListener )
     561             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     562             :                                     ::com::sun::star::lang::WrappedTargetException,
     563             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     564             : 
     565             :                             // XDatePilotField
     566             :     virtual com::sun::star::uno::Reference<com::sun::star::container::XIndexAccess> SAL_CALL
     567             :                                 getItems() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     568             : 
     569             :                             // only called from property-functions:
     570             :     com::sun::star::sheet::DataPilotFieldOrientation getOrientation(void) const;
     571             :     void setOrientation(com::sun::star::sheet::DataPilotFieldOrientation Orientation);
     572             :     com::sun::star::sheet::GeneralFunction getFunction(void) const;
     573             :     void setFunction(com::sun::star::sheet::GeneralFunction Function);
     574             :     com::sun::star::uno::Sequence< com::sun::star::sheet::GeneralFunction > getSubtotals() const;
     575             :     void setSubtotals(const com::sun::star::uno::Sequence< com::sun::star::sheet::GeneralFunction >& rFunctions);
     576             :     OUString getCurrentPage() const;
     577             :     void setCurrentPage(const OUString& sPage);
     578             :     bool getUseCurrentPage() const;
     579             :     void setUseCurrentPage(bool bUse);
     580             :     const com::sun::star::sheet::DataPilotFieldAutoShowInfo* getAutoShowInfo();
     581             :     void setAutoShowInfo(const com::sun::star::sheet::DataPilotFieldAutoShowInfo* pInfo);
     582             :     const com::sun::star::sheet::DataPilotFieldLayoutInfo* getLayoutInfo();
     583             :     void setLayoutInfo(const com::sun::star::sheet::DataPilotFieldLayoutInfo* pInfo);
     584             :     const com::sun::star::sheet::DataPilotFieldReference* getReference();
     585             :     void setReference(const com::sun::star::sheet::DataPilotFieldReference* pInfo);
     586             :     const com::sun::star::sheet::DataPilotFieldSortInfo* getSortInfo();
     587             :     void setSortInfo(const com::sun::star::sheet::DataPilotFieldSortInfo* pInfo);
     588             :     bool getShowEmpty() const;
     589             :     void setShowEmpty(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             :     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          36 : 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.10