LCOV - code coverage report
Current view: top level - libreoffice/sc/inc - dapiuno.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 7 0.0 %
Date: 2012-12-27 Functions: 0 9 0.0 %
Legend: Lines: hit not hit

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

Generated by: LCOV version 1.10