LCOV - code coverage report
Current view: top level - sc/inc - nameuno.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 1 1 100.0 %
Date: 2014-11-03 Functions: 1 1 100.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 INCLUDED_SC_INC_NAMEUNO_HXX
      21             : #define INCLUDED_SC_INC_NAMEUNO_HXX
      22             : 
      23             : #include <svl/lstner.hxx>
      24             : #include "address.hxx"
      25             : #include <formula/grammar.hxx>
      26             : #include <com/sun/star/sheet/XLabelRange.hpp>
      27             : #include <com/sun/star/sheet/XLabelRanges.hpp>
      28             : #include <com/sun/star/sheet/XCellRangeReferrer.hpp>
      29             : #include <com/sun/star/sheet/XNamedRange.hpp>
      30             : #include <com/sun/star/sheet/XFormulaTokens.hpp>
      31             : #include <com/sun/star/sheet/XNamedRanges.hpp>
      32             : #include <com/sun/star/container/XNamed.hpp>
      33             : #include <com/sun/star/container/XEnumerationAccess.hpp>
      34             : #include <com/sun/star/lang/XServiceName.hpp>
      35             : #include <com/sun/star/lang/XServiceInfo.hpp>
      36             : #include <com/sun/star/lang/XUnoTunnel.hpp>
      37             : #include <com/sun/star/beans/XPropertySet.hpp>
      38             : #include <com/sun/star/document/XActionLockable.hpp>
      39             : #include <cppuhelper/implbase2.hxx>
      40             : #include <cppuhelper/implbase3.hxx>
      41             : #include <cppuhelper/implbase5.hxx>
      42             : #include <cppuhelper/implbase6.hxx>
      43             : #include <rtl/ref.hxx>
      44             : 
      45             : class ScDocShell;
      46             : class ScRangeName;
      47             : class ScRangeData;
      48             : class ScTokenArray;
      49             : class ScNamedRangesObj;
      50             : 
      51             : class SC_DLLPUBLIC ScNamedRangeObj : public ::cppu::WeakImplHelper6<
      52             :                             ::com::sun::star::sheet::XNamedRange,
      53             :                             ::com::sun::star::sheet::XFormulaTokens,
      54             :                             ::com::sun::star::sheet::XCellRangeReferrer,
      55             :                             ::com::sun::star::beans::XPropertySet,
      56             :                             ::com::sun::star::lang::XUnoTunnel,
      57             :                             ::com::sun::star::lang::XServiceInfo >,
      58             :                         public SfxListener
      59             : {
      60             : private:
      61             :     rtl::Reference< ScNamedRangesObj > mxParent;
      62             :     ScDocShell*             pDocShell;
      63             :     OUString                aName;
      64             :     com::sun::star::uno::Reference< com::sun::star::container::XNamed > mxSheet;
      65             : 
      66             : private:
      67             : friend class ScVbaName;
      68             :     ScRangeData*            GetRangeData_Impl();
      69             :     void                    Modify_Impl( const OUString* pNewName,
      70             :                                         const ScTokenArray* pNewTokens, const OUString* pNewContent,
      71             :                                         const ScAddress* pNewPos, const sal_uInt16* pNewType,
      72             :                                         const formula::FormulaGrammar::Grammar eGrammar );
      73             :     SCTAB                   GetTab_Impl();
      74             : 
      75             : public:
      76             :                             ScNamedRangeObj( rtl::Reference< ScNamedRangesObj > xParent, ScDocShell* pDocSh, const OUString& rNm,
      77             :                                     com::sun::star::uno::Reference< com::sun::star::container::XNamed > xSheet = com::sun::star::uno::Reference< com::sun::star::container::XNamed > ());
      78             :     virtual                 ~ScNamedRangeObj();
      79             : 
      80             :     virtual void            Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE;
      81             : 
      82             :                             /// XNamedRange
      83             :     virtual OUString SAL_CALL getContent() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      84             :     virtual void SAL_CALL   setContent( const OUString& aContent )
      85             :                                 throw (::com::sun::star::uno::RuntimeException,
      86             :                                        std::exception) SAL_OVERRIDE;
      87             :     virtual ::com::sun::star::table::CellAddress SAL_CALL getReferencePosition()
      88             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      89             :     virtual void SAL_CALL   setReferencePosition(
      90             :                                 const ::com::sun::star::table::CellAddress& aReferencePosition )
      91             :                                     throw (::com::sun::star::uno::RuntimeException,
      92             :                                            std::exception) SAL_OVERRIDE;
      93             :     virtual sal_Int32       SAL_CALL getType() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      94             :     virtual void SAL_CALL   setType( sal_Int32 nType )
      95             :                                 throw (::com::sun::star::uno::RuntimeException,
      96             :                                        std::exception) SAL_OVERRIDE;
      97             : 
      98             :                             /// XFormulaTokens
      99             :     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::sheet::FormulaToken > SAL_CALL getTokens()
     100             :                                 throw (::com::sun::star::uno::RuntimeException,
     101             :                                        std::exception) SAL_OVERRIDE;
     102             :     virtual void SAL_CALL   setTokens( const ::com::sun::star::uno::Sequence<
     103             :                                     ::com::sun::star::sheet::FormulaToken >& aTokens )
     104             :                                 throw (::com::sun::star::uno::RuntimeException,
     105             :                                        std::exception) SAL_OVERRIDE;
     106             : 
     107             :                             /// XNamed
     108             :     virtual OUString SAL_CALL getName() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     109             :     virtual void SAL_CALL   setName( const OUString& aName )
     110             :                                 throw (::com::sun::star::uno::RuntimeException,
     111             :                                        std::exception) SAL_OVERRIDE;
     112             : 
     113             :                             /// XCellRangeReferrer
     114             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > SAL_CALL
     115             :                             getReferredCells() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     116             : 
     117             :                             /// XPropertySet
     118             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
     119             :                             SAL_CALL getPropertySetInfo()
     120             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     121             :     virtual void SAL_CALL   setPropertyValue( const OUString& aPropertyName,
     122             :                                     const ::com::sun::star::uno::Any& aValue )
     123             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     124             :                                     ::com::sun::star::beans::PropertyVetoException,
     125             :                                     ::com::sun::star::lang::IllegalArgumentException,
     126             :                                     ::com::sun::star::lang::WrappedTargetException,
     127             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     128             :     virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
     129             :                                     const OUString& PropertyName )
     130             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     131             :                                     ::com::sun::star::lang::WrappedTargetException,
     132             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     133             :     virtual void SAL_CALL   addPropertyChangeListener( const OUString& aPropertyName,
     134             :                                     const ::com::sun::star::uno::Reference<
     135             :                                         ::com::sun::star::beans::XPropertyChangeListener >& xListener )
     136             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     137             :                                     ::com::sun::star::lang::WrappedTargetException,
     138             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     139             :     virtual void SAL_CALL   removePropertyChangeListener( const OUString& aPropertyName,
     140             :                                     const ::com::sun::star::uno::Reference<
     141             :                                         ::com::sun::star::beans::XPropertyChangeListener >& aListener )
     142             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     143             :                                     ::com::sun::star::lang::WrappedTargetException,
     144             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     145             :     virtual void SAL_CALL   addVetoableChangeListener( const OUString& PropertyName,
     146             :                                     const ::com::sun::star::uno::Reference<
     147             :                                         ::com::sun::star::beans::XVetoableChangeListener >& aListener )
     148             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     149             :                                     ::com::sun::star::lang::WrappedTargetException,
     150             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     151             :     virtual void SAL_CALL   removeVetoableChangeListener( const OUString& PropertyName,
     152             :                                     const ::com::sun::star::uno::Reference<
     153             :                                         ::com::sun::star::beans::XVetoableChangeListener >& aListener )
     154             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     155             :                                     ::com::sun::star::lang::WrappedTargetException,
     156             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     157             : 
     158             :                             /// XUnoTunnel
     159             :     virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence<
     160             :                                     sal_Int8 >& aIdentifier )
     161             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     162             : 
     163             :     static const com::sun::star::uno::Sequence<sal_Int8>& getUnoTunnelId();
     164             : 
     165             :                             /// XServiceInfo
     166             :     virtual OUString SAL_CALL getImplementationName()
     167             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     168             :     virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName )
     169             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     170             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
     171             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     172             : };
     173             : 
     174             : class ScNamedRangesObj : public ::cppu::WeakImplHelper6<
     175             :                             ::com::sun::star::sheet::XNamedRanges,
     176             :                             ::com::sun::star::container::XEnumerationAccess,
     177             :                             ::com::sun::star::container::XIndexAccess,
     178             :                             ::com::sun::star::beans::XPropertySet,
     179             :                             ::com::sun::star::document::XActionLockable,
     180             :                             ::com::sun::star::lang::XServiceInfo >,
     181             :                         public SfxListener
     182             : {
     183             : private:
     184             : 
     185             :      /** if true, adding new name or modifying existing one will set the
     186             :          document 'modified' and broadcast the change.  We turn this off during
     187             :          import. */
     188             :     bool                    mbModifyAndBroadcast;
     189             : 
     190             :     virtual ScNamedRangeObj* GetObjectByIndex_Impl(sal_uInt16 nIndex) = 0;
     191             :     virtual ScNamedRangeObj* GetObjectByName_Impl(const OUString& aName) = 0;
     192             : 
     193             :     virtual ScRangeName*    GetRangeName_Impl() = 0;
     194             :     virtual SCTAB           GetTab_Impl() = 0;
     195             : 
     196             : protected:
     197             : 
     198             :     ScDocShell*             pDocShell;
     199             :     /** called from the XActionLockable interface methods on initial locking */
     200             :     virtual void            lock();
     201             : 
     202             :     /** called from the XActionLockable interface methods on final unlock */
     203             :     virtual void            unlock();
     204             : 
     205             : public:
     206             :                             ScNamedRangesObj(ScDocShell* pDocSh);
     207             :     virtual                 ~ScNamedRangesObj();
     208             : 
     209             :     virtual void            Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE;
     210             : 
     211          22 :     bool                    IsModifyAndBroadcast() const { return mbModifyAndBroadcast;}
     212             : 
     213             :                             /// XNamedRanges
     214             :     virtual void SAL_CALL   addNewByName( const OUString& aName, const OUString& aContent,
     215             :                                 const ::com::sun::star::table::CellAddress& aPosition, sal_Int32 nType )
     216             :                                     throw (::com::sun::star::uno::RuntimeException,
     217             :                                            std::exception) SAL_OVERRIDE;
     218             :     virtual void SAL_CALL   addNewFromTitles( const ::com::sun::star::table::CellRangeAddress& aSource,
     219             :                                 ::com::sun::star::sheet::Border aBorder )
     220             :                                     throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     221             :     virtual void SAL_CALL   removeByName( const OUString& aName )
     222             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     223             :     virtual void SAL_CALL   outputList( const ::com::sun::star::table::CellAddress& aOutputPosition )
     224             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     225             : 
     226             :                             /// XNameAccess
     227             :     virtual ::com::sun::star::uno::Any SAL_CALL getByName( const OUString& aName )
     228             :                                 throw(::com::sun::star::container::NoSuchElementException,
     229             :                                     ::com::sun::star::lang::WrappedTargetException,
     230             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     231             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getElementNames()
     232             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     233             :     virtual sal_Bool SAL_CALL hasByName( const OUString& aName )
     234             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     235             : 
     236             :                             /// XIndexAccess
     237             :     virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     238             :     virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index )
     239             :                                 throw(::com::sun::star::lang::IndexOutOfBoundsException,
     240             :                                     ::com::sun::star::lang::WrappedTargetException,
     241             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     242             : 
     243             :                             /// XEnumerationAccess
     244             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL
     245             :                             createEnumeration() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     246             : 
     247             :                             /// XElementAccess
     248             :     virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
     249             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     250             :     virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     251             : 
     252             :                             /// XPropertySet
     253             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
     254             :                             SAL_CALL getPropertySetInfo()
     255             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     256             :     virtual void SAL_CALL   setPropertyValue( const OUString& aPropertyName,
     257             :                                     const ::com::sun::star::uno::Any& aValue )
     258             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     259             :                                     ::com::sun::star::beans::PropertyVetoException,
     260             :                                     ::com::sun::star::lang::IllegalArgumentException,
     261             :                                     ::com::sun::star::lang::WrappedTargetException,
     262             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     263             :     virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
     264             :                                     const OUString& PropertyName )
     265             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     266             :                                     ::com::sun::star::lang::WrappedTargetException,
     267             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     268             :     virtual void SAL_CALL   addPropertyChangeListener( const OUString& aPropertyName,
     269             :                                     const ::com::sun::star::uno::Reference<
     270             :                                         ::com::sun::star::beans::XPropertyChangeListener >& xListener )
     271             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     272             :                                     ::com::sun::star::lang::WrappedTargetException,
     273             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     274             :     virtual void SAL_CALL   removePropertyChangeListener( const OUString& aPropertyName,
     275             :                                     const ::com::sun::star::uno::Reference<
     276             :                                         ::com::sun::star::beans::XPropertyChangeListener >& aListener )
     277             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     278             :                                     ::com::sun::star::lang::WrappedTargetException,
     279             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     280             :     virtual void SAL_CALL   addVetoableChangeListener( const OUString& PropertyName,
     281             :                                     const ::com::sun::star::uno::Reference<
     282             :                                         ::com::sun::star::beans::XVetoableChangeListener >& aListener )
     283             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     284             :                                     ::com::sun::star::lang::WrappedTargetException,
     285             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     286             :     virtual void SAL_CALL   removeVetoableChangeListener( const OUString& PropertyName,
     287             :                                     const ::com::sun::star::uno::Reference<
     288             :                                         ::com::sun::star::beans::XVetoableChangeListener >& aListener )
     289             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     290             :                                     ::com::sun::star::lang::WrappedTargetException,
     291             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     292             : 
     293             :                             /// XActionLockable
     294             :     virtual sal_Bool SAL_CALL isActionLocked() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     295             :     virtual void SAL_CALL addActionLock() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     296             :     virtual void SAL_CALL removeActionLock() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     297             :     virtual void SAL_CALL setActionLocks( sal_Int16 nLock ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     298             :     virtual sal_Int16 SAL_CALL resetActionLocks() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     299             : 
     300             :                             /// XServiceInfo
     301             :     virtual OUString SAL_CALL getImplementationName()
     302             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     303             :     virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName )
     304             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     305             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
     306             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     307             : };
     308             : 
     309             : class ScGlobalNamedRangesObj: public ScNamedRangesObj
     310             : {
     311             : private:
     312             : 
     313             :     virtual ScNamedRangeObj* GetObjectByIndex_Impl(sal_uInt16 nIndex) SAL_OVERRIDE;
     314             :     virtual ScNamedRangeObj* GetObjectByName_Impl(const OUString& aName) SAL_OVERRIDE;
     315             : 
     316             :     virtual ScRangeName*    GetRangeName_Impl() SAL_OVERRIDE;
     317             :     virtual SCTAB           GetTab_Impl() SAL_OVERRIDE;
     318             : 
     319             : public:
     320             :                             ScGlobalNamedRangesObj(ScDocShell* pDocSh);
     321             :     virtual                 ~ScGlobalNamedRangesObj();
     322             : };
     323             : 
     324             : class ScLocalNamedRangesObj: public ScNamedRangesObj
     325             : {
     326             : private:
     327             : 
     328             :     virtual ScNamedRangeObj* GetObjectByIndex_Impl(sal_uInt16 nIndex) SAL_OVERRIDE;
     329             :     virtual ScNamedRangeObj* GetObjectByName_Impl(const OUString& aName) SAL_OVERRIDE;
     330             : 
     331             :     virtual ScRangeName*    GetRangeName_Impl() SAL_OVERRIDE;
     332             :     virtual SCTAB           GetTab_Impl() SAL_OVERRIDE;
     333             : 
     334             :     ::com::sun::star::uno::Reference< ::com::sun::star::container::XNamed > mxSheet;
     335             : public:
     336             :                             ScLocalNamedRangesObj(ScDocShell* pDocSh, ::com::sun::star::uno::Reference< com::sun::star::container::XNamed > xNamed );
     337             :     virtual                 ~ScLocalNamedRangesObj();
     338             : };
     339             : 
     340             : class ScLabelRangeObj : public ::cppu::WeakImplHelper2<
     341             :                             ::com::sun::star::sheet::XLabelRange,
     342             :                             ::com::sun::star::lang::XServiceInfo >,
     343             :                         public SfxListener
     344             : {
     345             : private:
     346             :     ScDocShell*             pDocShell;
     347             :     bool                    bColumn;
     348             :     ScRange                 aRange;         ///< criterion to find range
     349             : 
     350             : private:
     351             :     ScRangePair*            GetData_Impl();
     352             :     void                    Modify_Impl( const ScRange* pLabel, const ScRange* pData );
     353             : 
     354             : public:
     355             :                             ScLabelRangeObj(ScDocShell* pDocSh, bool bCol, const ScRange& rR);
     356             :     virtual                 ~ScLabelRangeObj();
     357             : 
     358             :     virtual void            Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE;
     359             : 
     360             :                             /// XLabelRange
     361             :     virtual ::com::sun::star::table::CellRangeAddress SAL_CALL getLabelArea()
     362             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     363             :     virtual void SAL_CALL   setLabelArea( const ::com::sun::star::table::CellRangeAddress& aLabelArea )
     364             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     365             :     virtual ::com::sun::star::table::CellRangeAddress SAL_CALL getDataArea()
     366             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     367             :     virtual void SAL_CALL   setDataArea( const ::com::sun::star::table::CellRangeAddress& aDataArea )
     368             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     369             : 
     370             :                             /// XServiceInfo
     371             :     virtual OUString SAL_CALL getImplementationName()
     372             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     373             :     virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName )
     374             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     375             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
     376             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     377             : };
     378             : 
     379             : class ScLabelRangesObj : public ::cppu::WeakImplHelper3<
     380             :                             ::com::sun::star::sheet::XLabelRanges,
     381             :                             ::com::sun::star::container::XEnumerationAccess,
     382             :                             ::com::sun::star::lang::XServiceInfo >,
     383             :                         public SfxListener
     384             : {
     385             : private:
     386             :     ScDocShell*             pDocShell;
     387             :     bool                    bColumn;
     388             : 
     389             :     ScLabelRangeObj*        GetObjectByIndex_Impl(size_t nIndex);
     390             : 
     391             : public:
     392             :                             ScLabelRangesObj(ScDocShell* pDocSh, bool bCol);
     393             :     virtual                 ~ScLabelRangesObj();
     394             : 
     395             :     virtual void            Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE;
     396             : 
     397             :                             /// XLabelRanges
     398             :     virtual void SAL_CALL   addNew( const ::com::sun::star::table::CellRangeAddress& aLabelArea,
     399             :                                 const ::com::sun::star::table::CellRangeAddress& aDataArea )
     400             :                                     throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     401             :     virtual void SAL_CALL   removeByIndex( sal_Int32 nIndex )
     402             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     403             : 
     404             :                             /// XIndexAccess
     405             :     virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     406             :     virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index )
     407             :                                 throw(::com::sun::star::lang::IndexOutOfBoundsException,
     408             :                                     ::com::sun::star::lang::WrappedTargetException,
     409             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     410             : 
     411             :                             /// XEnumerationAccess
     412             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL
     413             :                             createEnumeration() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     414             : 
     415             :                             /// XElementAccess
     416             :     virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
     417             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     418             :     virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     419             : 
     420             :                             /// XServiceInfo
     421             :     virtual OUString SAL_CALL getImplementationName()
     422             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     423             :     virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName )
     424             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     425             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
     426             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     427             : };
     428             : 
     429             : #endif
     430             : 
     431             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10