1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir 28*cdf0e10cSrcweir #ifndef SC_NAMEUNO_HXX 29*cdf0e10cSrcweir #define SC_NAMEUNO_HXX 30*cdf0e10cSrcweir 31*cdf0e10cSrcweir #include <svl/lstner.hxx> 32*cdf0e10cSrcweir #include "address.hxx" 33*cdf0e10cSrcweir #include "formula/grammar.hxx" 34*cdf0e10cSrcweir #include <com/sun/star/sheet/XLabelRange.hpp> 35*cdf0e10cSrcweir #include <com/sun/star/sheet/XLabelRanges.hpp> 36*cdf0e10cSrcweir #include <com/sun/star/sheet/XCellRangeReferrer.hpp> 37*cdf0e10cSrcweir #include <com/sun/star/sheet/XNamedRange.hpp> 38*cdf0e10cSrcweir #include <com/sun/star/sheet/XFormulaTokens.hpp> 39*cdf0e10cSrcweir #include <com/sun/star/sheet/XNamedRanges.hpp> 40*cdf0e10cSrcweir #include <com/sun/star/container/XEnumerationAccess.hpp> 41*cdf0e10cSrcweir #include <com/sun/star/lang/XServiceName.hpp> 42*cdf0e10cSrcweir #include <com/sun/star/lang/XServiceInfo.hpp> 43*cdf0e10cSrcweir #include <com/sun/star/lang/XUnoTunnel.hpp> 44*cdf0e10cSrcweir #include <com/sun/star/beans/XPropertySet.hpp> 45*cdf0e10cSrcweir #include <com/sun/star/document/XActionLockable.hpp> 46*cdf0e10cSrcweir #include <cppuhelper/implbase2.hxx> 47*cdf0e10cSrcweir #include <cppuhelper/implbase3.hxx> 48*cdf0e10cSrcweir #include <cppuhelper/implbase5.hxx> 49*cdf0e10cSrcweir #include <cppuhelper/implbase6.hxx> 50*cdf0e10cSrcweir 51*cdf0e10cSrcweir class ScDocShell; 52*cdf0e10cSrcweir class ScRangeData; 53*cdf0e10cSrcweir class ScTokenArray; 54*cdf0e10cSrcweir 55*cdf0e10cSrcweir 56*cdf0e10cSrcweir class ScNamedRangeObj : public ::cppu::WeakImplHelper6< 57*cdf0e10cSrcweir ::com::sun::star::sheet::XNamedRange, 58*cdf0e10cSrcweir ::com::sun::star::sheet::XFormulaTokens, 59*cdf0e10cSrcweir ::com::sun::star::sheet::XCellRangeReferrer, 60*cdf0e10cSrcweir ::com::sun::star::beans::XPropertySet, 61*cdf0e10cSrcweir ::com::sun::star::lang::XUnoTunnel, 62*cdf0e10cSrcweir ::com::sun::star::lang::XServiceInfo >, 63*cdf0e10cSrcweir public SfxListener 64*cdf0e10cSrcweir { 65*cdf0e10cSrcweir private: 66*cdf0e10cSrcweir ScDocShell* pDocShell; 67*cdf0e10cSrcweir String aName; 68*cdf0e10cSrcweir 69*cdf0e10cSrcweir private: 70*cdf0e10cSrcweir ScRangeData* GetRangeData_Impl(); 71*cdf0e10cSrcweir void Modify_Impl( const String* pNewName, 72*cdf0e10cSrcweir const ScTokenArray* pNewTokens, const String* pNewContent, 73*cdf0e10cSrcweir const ScAddress* pNewPos, const sal_uInt16* pNewType, 74*cdf0e10cSrcweir const formula::FormulaGrammar::Grammar eGrammar ); 75*cdf0e10cSrcweir 76*cdf0e10cSrcweir public: 77*cdf0e10cSrcweir ScNamedRangeObj(ScDocShell* pDocSh, const String& rNm); 78*cdf0e10cSrcweir virtual ~ScNamedRangeObj(); 79*cdf0e10cSrcweir 80*cdf0e10cSrcweir virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); 81*cdf0e10cSrcweir 82*cdf0e10cSrcweir // XNamedRange 83*cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getContent() throw(::com::sun::star::uno::RuntimeException); 84*cdf0e10cSrcweir virtual void SAL_CALL setContent( const ::rtl::OUString& aContent ) 85*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 86*cdf0e10cSrcweir virtual ::com::sun::star::table::CellAddress SAL_CALL getReferencePosition() 87*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 88*cdf0e10cSrcweir virtual void SAL_CALL setReferencePosition( 89*cdf0e10cSrcweir const ::com::sun::star::table::CellAddress& aReferencePosition ) 90*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 91*cdf0e10cSrcweir virtual sal_Int32 SAL_CALL getType() throw(::com::sun::star::uno::RuntimeException); 92*cdf0e10cSrcweir virtual void SAL_CALL setType( sal_Int32 nType ) throw(::com::sun::star::uno::RuntimeException); 93*cdf0e10cSrcweir 94*cdf0e10cSrcweir // XFormulaTokens 95*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::com::sun::star::sheet::FormulaToken > SAL_CALL getTokens() 96*cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 97*cdf0e10cSrcweir virtual void SAL_CALL setTokens( const ::com::sun::star::uno::Sequence< 98*cdf0e10cSrcweir ::com::sun::star::sheet::FormulaToken >& aTokens ) 99*cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 100*cdf0e10cSrcweir 101*cdf0e10cSrcweir // XNamed 102*cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getName() throw(::com::sun::star::uno::RuntimeException); 103*cdf0e10cSrcweir virtual void SAL_CALL setName( const ::rtl::OUString& aName ) 104*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 105*cdf0e10cSrcweir 106*cdf0e10cSrcweir // XCellRangeReferrer 107*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > SAL_CALL 108*cdf0e10cSrcweir getReferredCells() throw(::com::sun::star::uno::RuntimeException); 109*cdf0e10cSrcweir 110*cdf0e10cSrcweir // XPropertySet 111*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > 112*cdf0e10cSrcweir SAL_CALL getPropertySetInfo() 113*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 114*cdf0e10cSrcweir virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, 115*cdf0e10cSrcweir const ::com::sun::star::uno::Any& aValue ) 116*cdf0e10cSrcweir throw(::com::sun::star::beans::UnknownPropertyException, 117*cdf0e10cSrcweir ::com::sun::star::beans::PropertyVetoException, 118*cdf0e10cSrcweir ::com::sun::star::lang::IllegalArgumentException, 119*cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 120*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 121*cdf0e10cSrcweir virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( 122*cdf0e10cSrcweir const ::rtl::OUString& PropertyName ) 123*cdf0e10cSrcweir throw(::com::sun::star::beans::UnknownPropertyException, 124*cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 125*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 126*cdf0e10cSrcweir virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, 127*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 128*cdf0e10cSrcweir ::com::sun::star::beans::XPropertyChangeListener >& xListener ) 129*cdf0e10cSrcweir throw(::com::sun::star::beans::UnknownPropertyException, 130*cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 131*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 132*cdf0e10cSrcweir virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, 133*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 134*cdf0e10cSrcweir ::com::sun::star::beans::XPropertyChangeListener >& aListener ) 135*cdf0e10cSrcweir throw(::com::sun::star::beans::UnknownPropertyException, 136*cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 137*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 138*cdf0e10cSrcweir virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, 139*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 140*cdf0e10cSrcweir ::com::sun::star::beans::XVetoableChangeListener >& aListener ) 141*cdf0e10cSrcweir throw(::com::sun::star::beans::UnknownPropertyException, 142*cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 143*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 144*cdf0e10cSrcweir virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, 145*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 146*cdf0e10cSrcweir ::com::sun::star::beans::XVetoableChangeListener >& aListener ) 147*cdf0e10cSrcweir throw(::com::sun::star::beans::UnknownPropertyException, 148*cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 149*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 150*cdf0e10cSrcweir 151*cdf0e10cSrcweir // XUnoTunnel 152*cdf0e10cSrcweir virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< 153*cdf0e10cSrcweir sal_Int8 >& aIdentifier ) 154*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 155*cdf0e10cSrcweir 156*cdf0e10cSrcweir static const com::sun::star::uno::Sequence<sal_Int8>& getUnoTunnelId(); 157*cdf0e10cSrcweir static ScNamedRangeObj* getImplementation( const com::sun::star::uno::Reference< 158*cdf0e10cSrcweir com::sun::star::uno::XInterface> xObj ); 159*cdf0e10cSrcweir 160*cdf0e10cSrcweir // XServiceInfo 161*cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getImplementationName() 162*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 163*cdf0e10cSrcweir virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) 164*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 165*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() 166*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 167*cdf0e10cSrcweir 168*cdf0e10cSrcweir // methods accessible via getImplementation() 169*cdf0e10cSrcweir void SetContentWithGrammar( const ::rtl::OUString& aContent, 170*cdf0e10cSrcweir const formula::FormulaGrammar::Grammar eGrammar ) 171*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 172*cdf0e10cSrcweir }; 173*cdf0e10cSrcweir 174*cdf0e10cSrcweir 175*cdf0e10cSrcweir class ScNamedRangesObj : public ::cppu::WeakImplHelper5< 176*cdf0e10cSrcweir ::com::sun::star::sheet::XNamedRanges, 177*cdf0e10cSrcweir ::com::sun::star::container::XEnumerationAccess, 178*cdf0e10cSrcweir ::com::sun::star::container::XIndexAccess, 179*cdf0e10cSrcweir ::com::sun::star::document::XActionLockable, 180*cdf0e10cSrcweir ::com::sun::star::lang::XServiceInfo >, 181*cdf0e10cSrcweir public SfxListener 182*cdf0e10cSrcweir { 183*cdf0e10cSrcweir private: 184*cdf0e10cSrcweir ScDocShell* pDocShell; 185*cdf0e10cSrcweir 186*cdf0e10cSrcweir ScNamedRangeObj* GetObjectByIndex_Impl(sal_uInt16 nIndex); 187*cdf0e10cSrcweir ScNamedRangeObj* GetObjectByName_Impl(const ::rtl::OUString& aName); 188*cdf0e10cSrcweir 189*cdf0e10cSrcweir protected: 190*cdf0e10cSrcweir /** called from the XActionLockable interface methods on initial locking */ 191*cdf0e10cSrcweir virtual void lock(); 192*cdf0e10cSrcweir 193*cdf0e10cSrcweir /** called from the XActionLockable interface methods on final unlock */ 194*cdf0e10cSrcweir virtual void unlock(); 195*cdf0e10cSrcweir 196*cdf0e10cSrcweir public: 197*cdf0e10cSrcweir ScNamedRangesObj(ScDocShell* pDocSh); 198*cdf0e10cSrcweir virtual ~ScNamedRangesObj(); 199*cdf0e10cSrcweir 200*cdf0e10cSrcweir virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); 201*cdf0e10cSrcweir 202*cdf0e10cSrcweir // XNamedRanges 203*cdf0e10cSrcweir virtual void SAL_CALL addNewByName( const ::rtl::OUString& aName, const ::rtl::OUString& aContent, 204*cdf0e10cSrcweir const ::com::sun::star::table::CellAddress& aPosition, sal_Int32 nType ) 205*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 206*cdf0e10cSrcweir virtual void SAL_CALL addNewFromTitles( const ::com::sun::star::table::CellRangeAddress& aSource, 207*cdf0e10cSrcweir ::com::sun::star::sheet::Border aBorder ) 208*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 209*cdf0e10cSrcweir virtual void SAL_CALL removeByName( const ::rtl::OUString& aName ) 210*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 211*cdf0e10cSrcweir virtual void SAL_CALL outputList( const ::com::sun::star::table::CellAddress& aOutputPosition ) 212*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 213*cdf0e10cSrcweir 214*cdf0e10cSrcweir // XNameAccess 215*cdf0e10cSrcweir virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) 216*cdf0e10cSrcweir throw(::com::sun::star::container::NoSuchElementException, 217*cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 218*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 219*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames() 220*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 221*cdf0e10cSrcweir virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) 222*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 223*cdf0e10cSrcweir 224*cdf0e10cSrcweir // XIndexAccess 225*cdf0e10cSrcweir virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException); 226*cdf0e10cSrcweir virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) 227*cdf0e10cSrcweir throw(::com::sun::star::lang::IndexOutOfBoundsException, 228*cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 229*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 230*cdf0e10cSrcweir 231*cdf0e10cSrcweir // XEnumerationAccess 232*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL 233*cdf0e10cSrcweir createEnumeration() throw(::com::sun::star::uno::RuntimeException); 234*cdf0e10cSrcweir 235*cdf0e10cSrcweir // XElementAccess 236*cdf0e10cSrcweir virtual ::com::sun::star::uno::Type SAL_CALL getElementType() 237*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 238*cdf0e10cSrcweir virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException); 239*cdf0e10cSrcweir 240*cdf0e10cSrcweir // XActionLockable 241*cdf0e10cSrcweir virtual sal_Bool SAL_CALL isActionLocked() throw(::com::sun::star::uno::RuntimeException); 242*cdf0e10cSrcweir virtual void SAL_CALL addActionLock() throw(::com::sun::star::uno::RuntimeException); 243*cdf0e10cSrcweir virtual void SAL_CALL removeActionLock() throw(::com::sun::star::uno::RuntimeException); 244*cdf0e10cSrcweir virtual void SAL_CALL setActionLocks( sal_Int16 nLock ) throw(::com::sun::star::uno::RuntimeException); 245*cdf0e10cSrcweir virtual sal_Int16 SAL_CALL resetActionLocks() throw(::com::sun::star::uno::RuntimeException); 246*cdf0e10cSrcweir 247*cdf0e10cSrcweir // XServiceInfo 248*cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getImplementationName() 249*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 250*cdf0e10cSrcweir virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) 251*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 252*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() 253*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 254*cdf0e10cSrcweir }; 255*cdf0e10cSrcweir 256*cdf0e10cSrcweir 257*cdf0e10cSrcweir class ScLabelRangeObj : public ::cppu::WeakImplHelper2< 258*cdf0e10cSrcweir ::com::sun::star::sheet::XLabelRange, 259*cdf0e10cSrcweir ::com::sun::star::lang::XServiceInfo >, 260*cdf0e10cSrcweir public SfxListener 261*cdf0e10cSrcweir { 262*cdf0e10cSrcweir private: 263*cdf0e10cSrcweir ScDocShell* pDocShell; 264*cdf0e10cSrcweir sal_Bool bColumn; 265*cdf0e10cSrcweir ScRange aRange; // Kriterium um Bereich zu finden 266*cdf0e10cSrcweir 267*cdf0e10cSrcweir private: 268*cdf0e10cSrcweir ScRangePair* GetData_Impl(); 269*cdf0e10cSrcweir void Modify_Impl( const ScRange* pLabel, const ScRange* pData ); 270*cdf0e10cSrcweir 271*cdf0e10cSrcweir public: 272*cdf0e10cSrcweir ScLabelRangeObj(ScDocShell* pDocSh, sal_Bool bCol, const ScRange& rR); 273*cdf0e10cSrcweir virtual ~ScLabelRangeObj(); 274*cdf0e10cSrcweir 275*cdf0e10cSrcweir virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); 276*cdf0e10cSrcweir 277*cdf0e10cSrcweir // XLabelRange 278*cdf0e10cSrcweir virtual ::com::sun::star::table::CellRangeAddress SAL_CALL getLabelArea() 279*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 280*cdf0e10cSrcweir virtual void SAL_CALL setLabelArea( const ::com::sun::star::table::CellRangeAddress& aLabelArea ) 281*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 282*cdf0e10cSrcweir virtual ::com::sun::star::table::CellRangeAddress SAL_CALL getDataArea() 283*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 284*cdf0e10cSrcweir virtual void SAL_CALL setDataArea( const ::com::sun::star::table::CellRangeAddress& aDataArea ) 285*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 286*cdf0e10cSrcweir 287*cdf0e10cSrcweir // XServiceInfo 288*cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getImplementationName() 289*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 290*cdf0e10cSrcweir virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) 291*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 292*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() 293*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 294*cdf0e10cSrcweir }; 295*cdf0e10cSrcweir 296*cdf0e10cSrcweir 297*cdf0e10cSrcweir class ScLabelRangesObj : public ::cppu::WeakImplHelper3< 298*cdf0e10cSrcweir ::com::sun::star::sheet::XLabelRanges, 299*cdf0e10cSrcweir ::com::sun::star::container::XEnumerationAccess, 300*cdf0e10cSrcweir ::com::sun::star::lang::XServiceInfo >, 301*cdf0e10cSrcweir public SfxListener 302*cdf0e10cSrcweir { 303*cdf0e10cSrcweir private: 304*cdf0e10cSrcweir ScDocShell* pDocShell; 305*cdf0e10cSrcweir sal_Bool bColumn; 306*cdf0e10cSrcweir 307*cdf0e10cSrcweir ScLabelRangeObj* GetObjectByIndex_Impl(sal_uInt16 nIndex); 308*cdf0e10cSrcweir 309*cdf0e10cSrcweir public: 310*cdf0e10cSrcweir ScLabelRangesObj(ScDocShell* pDocSh, sal_Bool bCol); 311*cdf0e10cSrcweir virtual ~ScLabelRangesObj(); 312*cdf0e10cSrcweir 313*cdf0e10cSrcweir virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); 314*cdf0e10cSrcweir 315*cdf0e10cSrcweir // XLabelRanges 316*cdf0e10cSrcweir virtual void SAL_CALL addNew( const ::com::sun::star::table::CellRangeAddress& aLabelArea, 317*cdf0e10cSrcweir const ::com::sun::star::table::CellRangeAddress& aDataArea ) 318*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 319*cdf0e10cSrcweir virtual void SAL_CALL removeByIndex( sal_Int32 nIndex ) 320*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 321*cdf0e10cSrcweir 322*cdf0e10cSrcweir // XIndexAccess 323*cdf0e10cSrcweir virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException); 324*cdf0e10cSrcweir virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) 325*cdf0e10cSrcweir throw(::com::sun::star::lang::IndexOutOfBoundsException, 326*cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 327*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 328*cdf0e10cSrcweir 329*cdf0e10cSrcweir // XEnumerationAccess 330*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL 331*cdf0e10cSrcweir createEnumeration() throw(::com::sun::star::uno::RuntimeException); 332*cdf0e10cSrcweir 333*cdf0e10cSrcweir // XElementAccess 334*cdf0e10cSrcweir virtual ::com::sun::star::uno::Type SAL_CALL getElementType() 335*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 336*cdf0e10cSrcweir virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException); 337*cdf0e10cSrcweir 338*cdf0e10cSrcweir // XServiceInfo 339*cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getImplementationName() 340*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 341*cdf0e10cSrcweir virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) 342*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 343*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() 344*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 345*cdf0e10cSrcweir }; 346*cdf0e10cSrcweir 347*cdf0e10cSrcweir 348*cdf0e10cSrcweir 349*cdf0e10cSrcweir 350*cdf0e10cSrcweir #endif 351*cdf0e10cSrcweir 352