LCOV - code coverage report
Current view: top level - libreoffice/sc/inc - datauno.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 2 0.0 %
Date: 2012-12-27 Functions: 0 2 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_DATAUNO_HXX
      21             : #define SC_DATAUNO_HXX
      22             : 
      23             : #include "global.hxx"
      24             : #include "queryparam.hxx"
      25             : #include "subtotalparam.hxx"
      26             : 
      27             : #include <com/sun/star/sheet/TableFilterField.hpp>
      28             : #include <com/sun/star/sheet/GeneralFunction.hpp>
      29             : #include <com/sun/star/sheet/XCellRangeReferrer.hpp>
      30             : #include <com/sun/star/sheet/XSheetFilterDescriptor.hpp>
      31             : #include <com/sun/star/sheet/XSheetFilterDescriptor2.hpp>
      32             : #include <com/sun/star/sheet/XSheetFilterDescriptor3.hpp>
      33             : #include <com/sun/star/sheet/XConsolidationDescriptor.hpp>
      34             : #include <com/sun/star/sheet/XDatabaseRanges.hpp>
      35             : #include <com/sun/star/sheet/XDatabaseRange.hpp>
      36             : #include <com/sun/star/sheet/XUnnamedDatabaseRanges.hpp>
      37             : #include <com/sun/star/sheet/XSubTotalDescriptor.hpp>
      38             : #include <com/sun/star/sheet/XSubTotalField.hpp>
      39             : #include <com/sun/star/lang/XServiceInfo.hpp>
      40             : #include <com/sun/star/container/XEnumerationAccess.hpp>
      41             : #include <com/sun/star/container/XIndexAccess.hpp>
      42             : #include <com/sun/star/beans/XPropertySet.hpp>
      43             : #include <com/sun/star/lang/XUnoTunnel.hpp>
      44             : #include <com/sun/star/container/XNamed.hpp>
      45             : #include <com/sun/star/util/XRefreshable.hpp>
      46             : #include <cppuhelper/implbase2.hxx>
      47             : #include <cppuhelper/implbase3.hxx>
      48             : #include <cppuhelper/implbase4.hxx>
      49             : #include <cppuhelper/implbase5.hxx>
      50             : #include <cppuhelper/implbase6.hxx>
      51             : #include "svl/itemprop.hxx"
      52             : #include "svl/lstner.hxx"
      53             : #include <boost/ptr_container/ptr_vector.hpp>
      54             : 
      55             : class ScDBData;
      56             : class ScDocShell;
      57             : 
      58             : class ScSubTotalFieldObj;
      59             : class ScDatabaseRangeObj;
      60             : class ScDataPilotDescriptorBase;
      61             : 
      62             : struct ScSortParam;
      63             : 
      64             : typedef ::com::sun::star::uno::Reference<
      65             :             ::com::sun::star::util::XRefreshListener > XDBRefreshListenerRef;
      66             : typedef boost::ptr_vector<XDBRefreshListenerRef> XDBRefreshListenerArr_Impl;
      67             : 
      68             : class ScDataUnoConversion
      69             : {
      70             : public:
      71             :     static ScSubTotalFunc   GeneralToSubTotal( com::sun::star::sheet::GeneralFunction eSummary );
      72             :     static com::sun::star::sheet::GeneralFunction SubTotalToGeneral( ScSubTotalFunc eSubTotal );
      73             : };
      74             : 
      75             : 
      76             : //  ImportDescriptor is not available as Uno-Objekt any longer, only Property-Sequence
      77             : 
      78             : class ScImportDescriptor
      79             : {
      80             : public:
      81             :     static void FillImportParam(
      82             :                     ScImportParam& rParam,
      83             :                     const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& rSeq );
      84             :     static void FillProperties(
      85             :                     com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& rSeq,
      86             :                     const ScImportParam& rParam );
      87             :     static long GetPropertyCount();
      88             : };
      89             : 
      90             : //  SortDescriptor is not available as Uno-Objekt any longer, only Property-Sequence
      91             : 
      92             : class ScSortDescriptor
      93             : {
      94             : public:
      95             :     static void FillSortParam(
      96             :                     ScSortParam& rParam,
      97             :                     const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& rSeq );
      98             :     static void FillProperties(
      99             :                     com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& rSeq,
     100             :                     const ScSortParam& rParam );
     101             :     static long GetPropertyCount();
     102             : };
     103             : 
     104             : 
     105             : //  ScSubTotalDescriptorBase - base class for SubTotalDescriptor stand alone and in DB area (context?)
     106             : 
     107             : //  to uno, both look the same
     108             : 
     109             : class ScSubTotalDescriptorBase : public cppu::WeakImplHelper6<
     110             :                                         com::sun::star::sheet::XSubTotalDescriptor,
     111             :                                         com::sun::star::container::XEnumerationAccess,
     112             :                                         com::sun::star::container::XIndexAccess,
     113             :                                         com::sun::star::beans::XPropertySet,
     114             :                                         com::sun::star::lang::XUnoTunnel,
     115             :                                         com::sun::star::lang::XServiceInfo >
     116             : {
     117             : private:
     118             :     SfxItemPropertySet      aPropSet;
     119             : 
     120             :     ScSubTotalFieldObj*     GetObjectByIndex_Impl(sal_uInt16 nIndex);
     121             : 
     122             : public:
     123             :                             ScSubTotalDescriptorBase();
     124             :     virtual                 ~ScSubTotalDescriptorBase();
     125             : 
     126             :                             // in derived classes:
     127             :                             // (Fields are within the range)
     128             :     virtual void            GetData( ScSubTotalParam& rParam ) const = 0;
     129             :     virtual void            PutData( const ScSubTotalParam& rParam ) = 0;
     130             : 
     131             :                             // XSubTotalDescriptor
     132             :     virtual void SAL_CALL   addNew( const ::com::sun::star::uno::Sequence<
     133             :                                     ::com::sun::star::sheet::SubTotalColumn >& aSubTotalColumns,
     134             :                                 sal_Int32 nGroupColumn )
     135             :                                     throw(::com::sun::star::uno::RuntimeException);
     136             :     virtual void SAL_CALL   clear() throw(::com::sun::star::uno::RuntimeException);
     137             : 
     138             :                             // XIndexAccess
     139             :     virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException);
     140             :     virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index )
     141             :                                 throw(::com::sun::star::lang::IndexOutOfBoundsException,
     142             :                                     ::com::sun::star::lang::WrappedTargetException,
     143             :                                     ::com::sun::star::uno::RuntimeException);
     144             : 
     145             :                             // XEnumerationAccess
     146             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL
     147             :                             createEnumeration() throw(::com::sun::star::uno::RuntimeException);
     148             : 
     149             :                             // XElementAccess
     150             :     virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
     151             :                                 throw(::com::sun::star::uno::RuntimeException);
     152             :     virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
     153             : 
     154             :                             // XPropertySet
     155             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
     156             :                             SAL_CALL getPropertySetInfo()
     157             :                                 throw(::com::sun::star::uno::RuntimeException);
     158             :     virtual void SAL_CALL   setPropertyValue( const ::rtl::OUString& aPropertyName,
     159             :                                     const ::com::sun::star::uno::Any& aValue )
     160             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     161             :                                     ::com::sun::star::beans::PropertyVetoException,
     162             :                                     ::com::sun::star::lang::IllegalArgumentException,
     163             :                                     ::com::sun::star::lang::WrappedTargetException,
     164             :                                     ::com::sun::star::uno::RuntimeException);
     165             :     virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
     166             :                                     const ::rtl::OUString& PropertyName )
     167             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     168             :                                     ::com::sun::star::lang::WrappedTargetException,
     169             :                                     ::com::sun::star::uno::RuntimeException);
     170             :     virtual void SAL_CALL   addPropertyChangeListener( const ::rtl::OUString& aPropertyName,
     171             :                                     const ::com::sun::star::uno::Reference<
     172             :                                         ::com::sun::star::beans::XPropertyChangeListener >& xListener )
     173             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     174             :                                     ::com::sun::star::lang::WrappedTargetException,
     175             :                                     ::com::sun::star::uno::RuntimeException);
     176             :     virtual void SAL_CALL   removePropertyChangeListener( const ::rtl::OUString& aPropertyName,
     177             :                                     const ::com::sun::star::uno::Reference<
     178             :                                         ::com::sun::star::beans::XPropertyChangeListener >& aListener )
     179             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     180             :                                     ::com::sun::star::lang::WrappedTargetException,
     181             :                                     ::com::sun::star::uno::RuntimeException);
     182             :     virtual void SAL_CALL   addVetoableChangeListener( const ::rtl::OUString& PropertyName,
     183             :                                     const ::com::sun::star::uno::Reference<
     184             :                                         ::com::sun::star::beans::XVetoableChangeListener >& aListener )
     185             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     186             :                                     ::com::sun::star::lang::WrappedTargetException,
     187             :                                     ::com::sun::star::uno::RuntimeException);
     188             :     virtual void SAL_CALL   removeVetoableChangeListener( const ::rtl::OUString& PropertyName,
     189             :                                     const ::com::sun::star::uno::Reference<
     190             :                                         ::com::sun::star::beans::XVetoableChangeListener >& aListener )
     191             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     192             :                                     ::com::sun::star::lang::WrappedTargetException,
     193             :                                     ::com::sun::star::uno::RuntimeException);
     194             : 
     195             :                             // XUnoTunnel
     196             :     virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence<
     197             :                                     sal_Int8 >& aIdentifier )
     198             :                                 throw(::com::sun::star::uno::RuntimeException);
     199             : 
     200             :     static const com::sun::star::uno::Sequence<sal_Int8>& getUnoTunnelId();
     201             :     static ScSubTotalDescriptorBase* getImplementation( const com::sun::star::uno::Reference<
     202             :                                     com::sun::star::sheet::XSubTotalDescriptor> xObj );
     203             : 
     204             :                             // XServiceInfo
     205             :     virtual ::rtl::OUString SAL_CALL getImplementationName()
     206             :                                 throw(::com::sun::star::uno::RuntimeException);
     207             :     virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
     208             :                                 throw(::com::sun::star::uno::RuntimeException);
     209             :     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
     210             :                                 throw(::com::sun::star::uno::RuntimeException);
     211             : };
     212             : 
     213             : 
     214             : //  ScSubTotalDescriptor - dummy container to use with XImportTarget
     215             : 
     216             : class ScSubTotalDescriptor : public ScSubTotalDescriptorBase
     217             : {
     218             : private:
     219             :     ScSubTotalParam         aStoredParam;
     220             : 
     221             : public:
     222             :                             ScSubTotalDescriptor();
     223             :     virtual                 ~ScSubTotalDescriptor();
     224             : 
     225             :                             // from ScSubTotalDescriptorBase:
     226             :     virtual void            GetData( ScSubTotalParam& rParam ) const;
     227             :     virtual void            PutData( const ScSubTotalParam& rParam );
     228             : 
     229             :                             // external access:
     230             :     void                    SetParam( const ScSubTotalParam& rNew );
     231             : };
     232             : 
     233             : 
     234             : //  ScRangeSubTotalDescriptor - SubTotalDescriptor of a data base area
     235             : 
     236             : class ScRangeSubTotalDescriptor : public ScSubTotalDescriptorBase
     237             : {
     238             : private:
     239             :     ScDatabaseRangeObj*     pParent;
     240             : 
     241             : public:
     242             :                             ScRangeSubTotalDescriptor(ScDatabaseRangeObj* pPar);
     243             :     virtual                 ~ScRangeSubTotalDescriptor();
     244             : 
     245             :                             // from ScSubTotalDescriptorBase:
     246             :     virtual void            GetData( ScSubTotalParam& rParam ) const;
     247             :     virtual void            PutData( const ScSubTotalParam& rParam );
     248             : };
     249             : 
     250             : 
     251             : class ScSubTotalFieldObj : public cppu::WeakImplHelper2<
     252             :                                 com::sun::star::sheet::XSubTotalField,
     253             :                                 com::sun::star::lang::XServiceInfo >
     254             : {
     255             : private:
     256             :     com::sun::star::uno::Reference<com::sun::star::sheet::XSubTotalDescriptor> xRef;
     257             :     ScSubTotalDescriptorBase&   rParent;
     258             :     sal_uInt16                      nPos;
     259             : 
     260             : public:
     261             :                             ScSubTotalFieldObj( ScSubTotalDescriptorBase* pDesc, sal_uInt16 nP );
     262             :     virtual                 ~ScSubTotalFieldObj();
     263             : 
     264             :                             // XSubTotalField
     265             :     virtual sal_Int32 SAL_CALL getGroupColumn() throw(::com::sun::star::uno::RuntimeException);
     266             :     virtual void SAL_CALL   setGroupColumn( sal_Int32 nGroupColumn )
     267             :                                 throw(::com::sun::star::uno::RuntimeException);
     268             :     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::sheet::SubTotalColumn > SAL_CALL
     269             :                             getSubTotalColumns() throw(::com::sun::star::uno::RuntimeException);
     270             :     virtual void SAL_CALL   setSubTotalColumns( const ::com::sun::star::uno::Sequence<
     271             :                                 ::com::sun::star::sheet::SubTotalColumn >& aSubTotalColumns )
     272             :                                     throw(::com::sun::star::uno::RuntimeException);
     273             : 
     274             :                             // XServiceInfo
     275             :     virtual ::rtl::OUString SAL_CALL getImplementationName()
     276             :                                 throw(::com::sun::star::uno::RuntimeException);
     277             :     virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
     278             :                                 throw(::com::sun::star::uno::RuntimeException);
     279             :     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
     280             :                                 throw(::com::sun::star::uno::RuntimeException);
     281             : };
     282             : 
     283             : 
     284             : class ScConsolidationDescriptor : public cppu::WeakImplHelper2<
     285             :                                         com::sun::star::sheet::XConsolidationDescriptor,
     286             :                                         com::sun::star::lang::XServiceInfo >
     287             : {
     288             : private:
     289             :     ScConsolidateParam      aParam;
     290             : 
     291             : public:
     292             :                             ScConsolidationDescriptor();
     293             :     virtual                 ~ScConsolidationDescriptor();
     294             : 
     295             :     void                    SetParam( const ScConsolidateParam& rNew );
     296           0 :     const ScConsolidateParam& GetParam() const  { return aParam; }
     297             : 
     298             :                             // XConsolidationDescriptor
     299             :     virtual ::com::sun::star::sheet::GeneralFunction SAL_CALL getFunction()
     300             :                                 throw(::com::sun::star::uno::RuntimeException);
     301             :     virtual void SAL_CALL   setFunction( ::com::sun::star::sheet::GeneralFunction nFunction )
     302             :                                 throw(::com::sun::star::uno::RuntimeException);
     303             :     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::table::CellRangeAddress > SAL_CALL
     304             :                             getSources(  ) throw(::com::sun::star::uno::RuntimeException);
     305             :     virtual void SAL_CALL   setSources( const ::com::sun::star::uno::Sequence<
     306             :                                 ::com::sun::star::table::CellRangeAddress >& aSources )
     307             :                                     throw(::com::sun::star::uno::RuntimeException);
     308             :     virtual ::com::sun::star::table::CellAddress SAL_CALL getStartOutputPosition()
     309             :                                 throw(::com::sun::star::uno::RuntimeException);
     310             :     virtual void SAL_CALL   setStartOutputPosition(
     311             :                                 const ::com::sun::star::table::CellAddress& aStartOutputPosition )
     312             :                                     throw(::com::sun::star::uno::RuntimeException);
     313             :     virtual sal_Bool SAL_CALL getUseColumnHeaders() throw(::com::sun::star::uno::RuntimeException);
     314             :     virtual void SAL_CALL   setUseColumnHeaders( sal_Bool bUseColumnHeaders )
     315             :                                 throw(::com::sun::star::uno::RuntimeException);
     316             :     virtual sal_Bool SAL_CALL getUseRowHeaders() throw(::com::sun::star::uno::RuntimeException);
     317             :     virtual void SAL_CALL   setUseRowHeaders( sal_Bool bUseRowHeaders )
     318             :                                 throw(::com::sun::star::uno::RuntimeException);
     319             :     virtual sal_Bool SAL_CALL getInsertLinks() throw(::com::sun::star::uno::RuntimeException);
     320             :     virtual void SAL_CALL   setInsertLinks( sal_Bool bInsertLinks )
     321             :                                 throw(::com::sun::star::uno::RuntimeException);
     322             : 
     323             :                             // XServiceInfo
     324             :     virtual ::rtl::OUString SAL_CALL getImplementationName()
     325             :                                 throw(::com::sun::star::uno::RuntimeException);
     326             :     virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
     327             :                                 throw(::com::sun::star::uno::RuntimeException);
     328             :     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
     329             :                                 throw(::com::sun::star::uno::RuntimeException);
     330             : };
     331             : 
     332             : 
     333             : //  ScFilterDescriptorBase - base class for FilterDescriptor
     334             : //                           stand alone, in a DB area (or context?) and in the DataPilot
     335             : 
     336             : //  to uno, all three look the same
     337             : 
     338             : class ScFilterDescriptorBase : public cppu::WeakImplHelper5<
     339             :                                     com::sun::star::sheet::XSheetFilterDescriptor,
     340             :                                     com::sun::star::sheet::XSheetFilterDescriptor2,
     341             :                                     com::sun::star::sheet::XSheetFilterDescriptor3,
     342             :                                     com::sun::star::beans::XPropertySet,
     343             :                                     com::sun::star::lang::XServiceInfo >,
     344             :                                public SfxListener
     345             : {
     346             : private:
     347             :     SfxItemPropertySet      aPropSet;
     348             :     ScDocShell*             pDocSh;
     349             : 
     350             : public:
     351             :                             ScFilterDescriptorBase(ScDocShell* pDocShell);
     352             :     virtual                 ~ScFilterDescriptorBase();
     353             : 
     354             :     virtual void            Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
     355             : 
     356             :                             // in the derived classes(?):
     357             :                             // (nField[] here within the area)
     358             :     virtual void            GetData( ScQueryParam& rParam ) const = 0;
     359             :     virtual void            PutData( const ScQueryParam& rParam ) = 0;
     360             : 
     361             :                             // XSheetFilterDescriptor
     362             :     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::sheet::TableFilterField > SAL_CALL
     363             :                             getFilterFields() throw(::com::sun::star::uno::RuntimeException);
     364             :     virtual void SAL_CALL   setFilterFields( const ::com::sun::star::uno::Sequence<
     365             :                                 ::com::sun::star::sheet::TableFilterField >& aFilterFields )
     366             :                                     throw(::com::sun::star::uno::RuntimeException);
     367             : 
     368             :                             // XSheetFilterDescriptor2
     369             :     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::sheet::TableFilterField2 > SAL_CALL
     370             :                             getFilterFields2() throw(::com::sun::star::uno::RuntimeException);
     371             :     virtual void SAL_CALL   setFilterFields2( const ::com::sun::star::uno::Sequence<
     372             :                                 ::com::sun::star::sheet::TableFilterField2 >& aFilterFields )
     373             :                                     throw(::com::sun::star::uno::RuntimeException);
     374             : 
     375             :                             // XSheetFilterDescriptor3
     376             :     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::sheet::TableFilterField3 > SAL_CALL
     377             :                             getFilterFields3() throw(::com::sun::star::uno::RuntimeException);
     378             :     virtual void SAL_CALL   setFilterFields3( const ::com::sun::star::uno::Sequence<
     379             :                                 ::com::sun::star::sheet::TableFilterField3 >& aFilterFields )
     380             :                                     throw(::com::sun::star::uno::RuntimeException);
     381             : 
     382             :                             // XPropertySet
     383             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
     384             :                             SAL_CALL getPropertySetInfo()
     385             :                                 throw(::com::sun::star::uno::RuntimeException);
     386             :     virtual void SAL_CALL   setPropertyValue( const ::rtl::OUString& aPropertyName,
     387             :                                     const ::com::sun::star::uno::Any& aValue )
     388             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     389             :                                     ::com::sun::star::beans::PropertyVetoException,
     390             :                                     ::com::sun::star::lang::IllegalArgumentException,
     391             :                                     ::com::sun::star::lang::WrappedTargetException,
     392             :                                     ::com::sun::star::uno::RuntimeException);
     393             :     virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
     394             :                                     const ::rtl::OUString& PropertyName )
     395             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     396             :                                     ::com::sun::star::lang::WrappedTargetException,
     397             :                                     ::com::sun::star::uno::RuntimeException);
     398             :     virtual void SAL_CALL   addPropertyChangeListener( const ::rtl::OUString& aPropertyName,
     399             :                                     const ::com::sun::star::uno::Reference<
     400             :                                         ::com::sun::star::beans::XPropertyChangeListener >& xListener )
     401             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     402             :                                     ::com::sun::star::lang::WrappedTargetException,
     403             :                                     ::com::sun::star::uno::RuntimeException);
     404             :     virtual void SAL_CALL   removePropertyChangeListener( const ::rtl::OUString& aPropertyName,
     405             :                                     const ::com::sun::star::uno::Reference<
     406             :                                         ::com::sun::star::beans::XPropertyChangeListener >& aListener )
     407             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     408             :                                     ::com::sun::star::lang::WrappedTargetException,
     409             :                                     ::com::sun::star::uno::RuntimeException);
     410             :     virtual void SAL_CALL   addVetoableChangeListener( const ::rtl::OUString& PropertyName,
     411             :                                     const ::com::sun::star::uno::Reference<
     412             :                                         ::com::sun::star::beans::XVetoableChangeListener >& aListener )
     413             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     414             :                                     ::com::sun::star::lang::WrappedTargetException,
     415             :                                     ::com::sun::star::uno::RuntimeException);
     416             :     virtual void SAL_CALL   removeVetoableChangeListener( const ::rtl::OUString& PropertyName,
     417             :                                     const ::com::sun::star::uno::Reference<
     418             :                                         ::com::sun::star::beans::XVetoableChangeListener >& aListener )
     419             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     420             :                                     ::com::sun::star::lang::WrappedTargetException,
     421             :                                     ::com::sun::star::uno::RuntimeException);
     422             : 
     423             :                             // XServiceInfo
     424             :     virtual ::rtl::OUString SAL_CALL getImplementationName()
     425             :                                 throw(::com::sun::star::uno::RuntimeException);
     426             :     virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
     427             :                                 throw(::com::sun::star::uno::RuntimeException);
     428             :     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
     429             :                                 throw(::com::sun::star::uno::RuntimeException);
     430             : };
     431             : 
     432             : 
     433             : //  ScFilterDescriptor - dummy container to use with XFilterable
     434             : 
     435             : class ScFilterDescriptor : public ScFilterDescriptorBase
     436             : {
     437             : private:
     438             :     ScQueryParam            aStoredParam;       // nField[] here within the area
     439             : 
     440             : public:
     441             :                             ScFilterDescriptor(ScDocShell* pDocSh);
     442             :     virtual                 ~ScFilterDescriptor();
     443             : 
     444             :                             // from ScFilterDescriptorBase:
     445             :     virtual void            GetData( ScQueryParam& rParam ) const;
     446             :     virtual void            PutData( const ScQueryParam& rParam );
     447             : 
     448             :                             // external access:
     449             :     void                    SetParam( const ScQueryParam& rNew );
     450           0 :     const ScQueryParam&     GetParam() const    { return aStoredParam; }
     451             : };
     452             : 
     453             : 
     454             : //  ScRangeFilterDescriptor - FilterDescriptor of a data base area
     455             : 
     456             : class ScRangeFilterDescriptor : public ScFilterDescriptorBase
     457             : {
     458             : private:
     459             :     ScDatabaseRangeObj*     pParent;
     460             : 
     461             : public:
     462             :                             ScRangeFilterDescriptor(ScDocShell* pDocSh, ScDatabaseRangeObj* pPar);
     463             :     virtual                 ~ScRangeFilterDescriptor();
     464             : 
     465             :                             // from ScFilterDescriptorBase:
     466             :     virtual void            GetData( ScQueryParam& rParam ) const;
     467             :     virtual void            PutData( const ScQueryParam& rParam );
     468             : };
     469             : 
     470             : 
     471             : //  ScDataPilotFilterDescriptor - FilterDescriptor of a DataPilotDescriptors
     472             : 
     473             : class ScDataPilotFilterDescriptor : public ScFilterDescriptorBase
     474             : {
     475             : private:
     476             :     ScDataPilotDescriptorBase*  pParent;
     477             : 
     478             : public:
     479             :                             ScDataPilotFilterDescriptor(ScDocShell* pDocSh, ScDataPilotDescriptorBase* pPar);
     480             :     virtual                 ~ScDataPilotFilterDescriptor();
     481             : 
     482             :                             // from ScFilterDescriptorBase:
     483             :     virtual void            GetData( ScQueryParam& rParam ) const;
     484             :     virtual void            PutData( const ScQueryParam& rParam );
     485             : };
     486             : 
     487             : 
     488             : class ScDatabaseRangeObj : public cppu::WeakImplHelper6<
     489             :                                 com::sun::star::sheet::XDatabaseRange,
     490             :                                 com::sun::star::util::XRefreshable,
     491             :                                 com::sun::star::container::XNamed,
     492             :                                 com::sun::star::sheet::XCellRangeReferrer,
     493             :                                 com::sun::star::beans::XPropertySet,
     494             :                                 com::sun::star::lang::XServiceInfo >,
     495             :                            public SfxListener
     496             : {
     497             : private:
     498             :     ScDocShell*             pDocShell;
     499             :     String                  aName;
     500             :     SfxItemPropertySet      aPropSet;
     501             :     XDBRefreshListenerArr_Impl aRefreshListeners;
     502             :     bool                    bIsUnnamed;
     503             :     SCTAB                   aTab;
     504             : 
     505             : private:
     506             :     ScDBData*               GetDBData_Impl() const;
     507             :     void                    Refreshed_Impl();
     508             : 
     509             : public:
     510             :     ScDatabaseRangeObj(ScDocShell* pDocSh, const String& rNm);
     511             :     SC_DLLPUBLIC ScDatabaseRangeObj(ScDocShell* pDocSh, const SCTAB nTab);
     512             :     virtual ~ScDatabaseRangeObj();
     513             : 
     514             :     virtual void            Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
     515             : 
     516             :                             // nField[] here within the area:
     517             :     void                    GetQueryParam(ScQueryParam& rQueryParam) const;
     518             :     void                    SetQueryParam(const ScQueryParam& rQueryParam);
     519             :     void                    GetSubTotalParam(ScSubTotalParam& rSubTotalParam) const;
     520             :     void                    SetSubTotalParam(const ScSubTotalParam& rSubTotalParam);
     521             : 
     522             :                             // XNamed
     523             :     virtual ::rtl::OUString SAL_CALL getName() throw(::com::sun::star::uno::RuntimeException);
     524             :     virtual void SAL_CALL   setName( const ::rtl::OUString& aName )
     525             :                                 throw(::com::sun::star::uno::RuntimeException);
     526             : 
     527             :                             // XDatabaseRange
     528             :     virtual ::com::sun::star::table::CellRangeAddress SAL_CALL getDataArea()
     529             :                                 throw(::com::sun::star::uno::RuntimeException);
     530             :     virtual void SAL_CALL   setDataArea( const ::com::sun::star::table::CellRangeAddress& aDataArea )
     531             :                                 throw(::com::sun::star::uno::RuntimeException);
     532             :     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL
     533             :                             getSortDescriptor() throw(::com::sun::star::uno::RuntimeException);
     534             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetFilterDescriptor > SAL_CALL
     535             :                             getFilterDescriptor() throw(::com::sun::star::uno::RuntimeException);
     536             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSubTotalDescriptor > SAL_CALL
     537             :                             getSubTotalDescriptor() throw(::com::sun::star::uno::RuntimeException);
     538             :     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL
     539             :                             getImportDescriptor() throw(::com::sun::star::uno::RuntimeException);
     540             : 
     541             :                             // XRefreshable
     542             :     virtual void SAL_CALL   refresh() throw(::com::sun::star::uno::RuntimeException);
     543             :     virtual void SAL_CALL   addRefreshListener( const ::com::sun::star::uno::Reference<
     544             :                                     ::com::sun::star::util::XRefreshListener >& l )
     545             :                                 throw(::com::sun::star::uno::RuntimeException);
     546             :     virtual void SAL_CALL   removeRefreshListener( const ::com::sun::star::uno::Reference<
     547             :                                     ::com::sun::star::util::XRefreshListener >& l )
     548             :                                 throw(::com::sun::star::uno::RuntimeException);
     549             : 
     550             :                             // XCellRangeReferrer
     551             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > SAL_CALL
     552             :                             getReferredCells() throw(::com::sun::star::uno::RuntimeException);
     553             : 
     554             :                             // XPropertySet
     555             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
     556             :                             SAL_CALL getPropertySetInfo()
     557             :                                 throw(::com::sun::star::uno::RuntimeException);
     558             :     virtual void SAL_CALL   setPropertyValue( const ::rtl::OUString& aPropertyName,
     559             :                                     const ::com::sun::star::uno::Any& aValue )
     560             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     561             :                                     ::com::sun::star::beans::PropertyVetoException,
     562             :                                     ::com::sun::star::lang::IllegalArgumentException,
     563             :                                     ::com::sun::star::lang::WrappedTargetException,
     564             :                                     ::com::sun::star::uno::RuntimeException);
     565             :     virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
     566             :                                     const ::rtl::OUString& PropertyName )
     567             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     568             :                                     ::com::sun::star::lang::WrappedTargetException,
     569             :                                     ::com::sun::star::uno::RuntimeException);
     570             :     virtual void SAL_CALL   addPropertyChangeListener( const ::rtl::OUString& aPropertyName,
     571             :                                     const ::com::sun::star::uno::Reference<
     572             :                                         ::com::sun::star::beans::XPropertyChangeListener >& xListener )
     573             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     574             :                                     ::com::sun::star::lang::WrappedTargetException,
     575             :                                     ::com::sun::star::uno::RuntimeException);
     576             :     virtual void SAL_CALL   removePropertyChangeListener( const ::rtl::OUString& aPropertyName,
     577             :                                     const ::com::sun::star::uno::Reference<
     578             :                                         ::com::sun::star::beans::XPropertyChangeListener >& aListener )
     579             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     580             :                                     ::com::sun::star::lang::WrappedTargetException,
     581             :                                     ::com::sun::star::uno::RuntimeException);
     582             :     virtual void SAL_CALL   addVetoableChangeListener( const ::rtl::OUString& PropertyName,
     583             :                                     const ::com::sun::star::uno::Reference<
     584             :                                         ::com::sun::star::beans::XVetoableChangeListener >& aListener )
     585             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     586             :                                     ::com::sun::star::lang::WrappedTargetException,
     587             :                                     ::com::sun::star::uno::RuntimeException);
     588             :     virtual void SAL_CALL   removeVetoableChangeListener( const ::rtl::OUString& PropertyName,
     589             :                                     const ::com::sun::star::uno::Reference<
     590             :                                         ::com::sun::star::beans::XVetoableChangeListener >& aListener )
     591             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     592             :                                     ::com::sun::star::lang::WrappedTargetException,
     593             :                                     ::com::sun::star::uno::RuntimeException);
     594             : 
     595             :                             // XServiceInfo
     596             :     virtual ::rtl::OUString SAL_CALL getImplementationName()
     597             :                                 throw(::com::sun::star::uno::RuntimeException);
     598             :     virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
     599             :                                 throw(::com::sun::star::uno::RuntimeException);
     600             :     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
     601             :                                 throw(::com::sun::star::uno::RuntimeException);
     602             : };
     603             : 
     604             : 
     605             : class ScDatabaseRangesObj : public cppu::WeakImplHelper4<
     606             :                                 com::sun::star::sheet::XDatabaseRanges,
     607             :                                 com::sun::star::container::XEnumerationAccess,
     608             :                                 com::sun::star::container::XIndexAccess,
     609             :                                 com::sun::star::lang::XServiceInfo >,
     610             :                             public SfxListener
     611             : {
     612             : private:
     613             :     ScDocShell*             pDocShell;
     614             : 
     615             :     ScDatabaseRangeObj*     GetObjectByIndex_Impl(size_t nIndex);
     616             :     ScDatabaseRangeObj*     GetObjectByName_Impl(const ::rtl::OUString& aName);
     617             : 
     618             : public:
     619             :                             ScDatabaseRangesObj(ScDocShell* pDocSh);
     620             :     virtual                 ~ScDatabaseRangesObj();
     621             : 
     622             :     virtual void            Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
     623             : 
     624             :                             // XDatabaseRanges
     625             :     virtual void SAL_CALL   addNewByName( const ::rtl::OUString& aName,
     626             :                                 const ::com::sun::star::table::CellRangeAddress& aRange )
     627             :                                     throw(::com::sun::star::uno::RuntimeException);
     628             :     virtual void SAL_CALL   removeByName( const ::rtl::OUString& aName )
     629             :                                 throw(::com::sun::star::uno::RuntimeException);
     630             : 
     631             :                             // XEnumerationAccess
     632             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL
     633             :                             createEnumeration() throw(::com::sun::star::uno::RuntimeException);
     634             : 
     635             :                             // XIndexAccess
     636             :     virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException);
     637             :     virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index )
     638             :                                 throw(::com::sun::star::lang::IndexOutOfBoundsException,
     639             :                                     ::com::sun::star::lang::WrappedTargetException,
     640             :                                     ::com::sun::star::uno::RuntimeException);
     641             : 
     642             :                             // XElementAccess
     643             :     virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
     644             :                                 throw(::com::sun::star::uno::RuntimeException);
     645             :     virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
     646             : 
     647             :                             // XNameAccess
     648             :     virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName )
     649             :                                 throw(::com::sun::star::container::NoSuchElementException,
     650             :                                     ::com::sun::star::lang::WrappedTargetException,
     651             :                                     ::com::sun::star::uno::RuntimeException);
     652             :     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames()
     653             :                                 throw(::com::sun::star::uno::RuntimeException);
     654             :     virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName )
     655             :                                 throw(::com::sun::star::uno::RuntimeException);
     656             : 
     657             :                             // XServiceInfo
     658             :     virtual ::rtl::OUString SAL_CALL getImplementationName()
     659             :                                 throw(::com::sun::star::uno::RuntimeException);
     660             :     virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
     661             :                                 throw(::com::sun::star::uno::RuntimeException);
     662             :     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
     663             :                                 throw(::com::sun::star::uno::RuntimeException);
     664             : };
     665             : 
     666             : class ScUnnamedDatabaseRangesObj : public cppu::WeakImplHelper1<
     667             :                                 com::sun::star::sheet::XUnnamedDatabaseRanges>,
     668             :                             public SfxListener
     669             : {
     670             : private:
     671             :     ScDocShell*             pDocShell;
     672             : 
     673             : public:
     674             :                             ScUnnamedDatabaseRangesObj(ScDocShell* pDocSh);
     675             :     virtual                 ~ScUnnamedDatabaseRangesObj();
     676             : 
     677             :     virtual void            Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
     678             : 
     679             :                             // XUnnamedDatabaseRanges
     680             :     virtual void SAL_CALL setByTable( const ::com::sun::star::table::CellRangeAddress& aRange )
     681             :                                 throw(::com::sun::star::uno::RuntimeException,
     682             :                                       ::com::sun::star::lang::IndexOutOfBoundsException );
     683             :     virtual com::sun::star::uno::Any SAL_CALL getByTable( sal_Int32 nTab )
     684             :                                 throw(::com::sun::star::uno::RuntimeException,
     685             :                                 ::com::sun::star::lang::IndexOutOfBoundsException,
     686             :                                 ::com::sun::star::container::NoSuchElementException );
     687             :     virtual sal_Bool SAL_CALL hasByTable( sal_Int32 nTab )
     688             :                                 throw (::com::sun::star::uno::RuntimeException,
     689             :                                 ::com::sun::star::lang::IndexOutOfBoundsException);
     690             : };
     691             : 
     692             : 
     693             : 
     694             : #endif
     695             : 
     696             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10