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_CELLSUNO_HXX 29*cdf0e10cSrcweir #define SC_CELLSUNO_HXX 30*cdf0e10cSrcweir 31*cdf0e10cSrcweir #include "global.hxx" // ScRange, ScAddress 32*cdf0e10cSrcweir #include "rangelst.hxx" // ScRangeList 33*cdf0e10cSrcweir 34*cdf0e10cSrcweir #include "formula/grammar.hxx" 35*cdf0e10cSrcweir #include <svl/lstner.hxx> 36*cdf0e10cSrcweir #include <svl/listener.hxx> 37*cdf0e10cSrcweir #include <svl/itemprop.hxx> 38*cdf0e10cSrcweir #include <com/sun/star/table/XTableChartsSupplier.hpp> 39*cdf0e10cSrcweir #include <com/sun/star/chart/XChartDataArray.hpp> 40*cdf0e10cSrcweir #include <com/sun/star/text/XTextFieldsSupplier.hpp> 41*cdf0e10cSrcweir #include <com/sun/star/drawing/XDrawPageSupplier.hpp> 42*cdf0e10cSrcweir #include <com/sun/star/sheet/XSheetCellRange.hpp> 43*cdf0e10cSrcweir #include <com/sun/star/sheet/XFormulaQuery.hpp> 44*cdf0e10cSrcweir #include <com/sun/star/sheet/XCellRangeAddressable.hpp> 45*cdf0e10cSrcweir #include <com/sun/star/sheet/XSheetOperation.hpp> 46*cdf0e10cSrcweir #include <com/sun/star/sheet/XSheetCellRangeContainer.hpp> 47*cdf0e10cSrcweir #include <com/sun/star/sheet/XCellFormatRangesSupplier.hpp> 48*cdf0e10cSrcweir #include <com/sun/star/sheet/XUniqueCellFormatRangesSupplier.hpp> 49*cdf0e10cSrcweir #include <com/sun/star/sheet/XCellRangesQuery.hpp> 50*cdf0e10cSrcweir #include <com/sun/star/sheet/XSheetFilterableEx.hpp> 51*cdf0e10cSrcweir #include <com/sun/star/sheet/XSpreadsheet.hpp> 52*cdf0e10cSrcweir #include <com/sun/star/sheet/XSheetPageBreak.hpp> 53*cdf0e10cSrcweir #include <com/sun/star/sheet/XCellRangeMovement.hpp> 54*cdf0e10cSrcweir #include <com/sun/star/text/XText.hpp> 55*cdf0e10cSrcweir #include <com/sun/star/sheet/XPrintAreas.hpp> 56*cdf0e10cSrcweir #include <com/sun/star/sheet/XSheetLinkable.hpp> 57*cdf0e10cSrcweir #include <com/sun/star/sheet/XSubTotalCalculatable.hpp> 58*cdf0e10cSrcweir #include <com/sun/star/sheet/XArrayFormulaRange.hpp> 59*cdf0e10cSrcweir #include <com/sun/star/sheet/XCellRangeData.hpp> 60*cdf0e10cSrcweir #include <com/sun/star/sheet/XCellRangeFormula.hpp> 61*cdf0e10cSrcweir #include <com/sun/star/sheet/XCellSeries.hpp> 62*cdf0e10cSrcweir #include <com/sun/star/sheet/XMultipleOperation.hpp> 63*cdf0e10cSrcweir #include <com/sun/star/sheet/XFormulaTokens.hpp> 64*cdf0e10cSrcweir #include <com/sun/star/sheet/XArrayFormulaTokens.hpp> 65*cdf0e10cSrcweir #include <com/sun/star/sheet/XCellAddressable.hpp> 66*cdf0e10cSrcweir #include <com/sun/star/util/XReplaceable.hpp> 67*cdf0e10cSrcweir #include <com/sun/star/util/XIndent.hpp> 68*cdf0e10cSrcweir #include <com/sun/star/lang/XServiceInfo.hpp> 69*cdf0e10cSrcweir #include <com/sun/star/container/XNameContainer.hpp> 70*cdf0e10cSrcweir #include <com/sun/star/util/XMergeable.hpp> 71*cdf0e10cSrcweir #include <com/sun/star/table/XAutoFormattable.hpp> 72*cdf0e10cSrcweir #include <com/sun/star/util/XSortable.hpp> 73*cdf0e10cSrcweir #include <com/sun/star/util/XImportable.hpp> 74*cdf0e10cSrcweir #include <com/sun/star/table/XColumnRowRange.hpp> 75*cdf0e10cSrcweir #include <com/sun/star/table/BorderLine.hpp> 76*cdf0e10cSrcweir #include <com/sun/star/table/TableBorder.hpp> 77*cdf0e10cSrcweir #include <com/sun/star/sheet/XDataPilotTablesSupplier.hpp> 78*cdf0e10cSrcweir #include <com/sun/star/sheet/XSheetAnnotationAnchor.hpp> 79*cdf0e10cSrcweir #include <com/sun/star/sheet/XScenariosSupplier.hpp> 80*cdf0e10cSrcweir #include <com/sun/star/sheet/XSheetAnnotationsSupplier.hpp> 81*cdf0e10cSrcweir #include <com/sun/star/sheet/XSheetAuditing.hpp> 82*cdf0e10cSrcweir #include <com/sun/star/sheet/XSheetOutline.hpp> 83*cdf0e10cSrcweir #include <com/sun/star/util/XProtectable.hpp> 84*cdf0e10cSrcweir #include <com/sun/star/sheet/XScenario.hpp> 85*cdf0e10cSrcweir #include <com/sun/star/sheet/XScenarioEnhanced.hpp> 86*cdf0e10cSrcweir #include <com/sun/star/util/XModifyBroadcaster.hpp> 87*cdf0e10cSrcweir #include <com/sun/star/beans/XPropertyState.hpp> 88*cdf0e10cSrcweir #include <com/sun/star/beans/XMultiPropertySet.hpp> 89*cdf0e10cSrcweir #include <com/sun/star/lang/XUnoTunnel.hpp> 90*cdf0e10cSrcweir #include <com/sun/star/document/XActionLockable.hpp> 91*cdf0e10cSrcweir #include <com/sun/star/beans/XTolerantMultiPropertySet.hpp> 92*cdf0e10cSrcweir #include <com/sun/star/sheet/XExternalSheetName.hpp> 93*cdf0e10cSrcweir #include <com/sun/star/document/XEventsSupplier.hpp> 94*cdf0e10cSrcweir #include <cppuhelper/implbase2.hxx> 95*cdf0e10cSrcweir #include <cppuhelper/implbase3.hxx> 96*cdf0e10cSrcweir 97*cdf0e10cSrcweir #ifndef __SGI_STL_VECTOR 98*cdf0e10cSrcweir #include <vector> 99*cdf0e10cSrcweir #endif 100*cdf0e10cSrcweir 101*cdf0e10cSrcweir class ScDocShell; 102*cdf0e10cSrcweir class ScMarkData; 103*cdf0e10cSrcweir class ScMemChart; 104*cdf0e10cSrcweir class ScPrintRangeSaver; 105*cdf0e10cSrcweir class ScAttrRectIterator; 106*cdf0e10cSrcweir class ScCellRangeObj; 107*cdf0e10cSrcweir class SvxUnoText; 108*cdf0e10cSrcweir class ScLinkListener; 109*cdf0e10cSrcweir class ScPatternAttr; 110*cdf0e10cSrcweir class SvxBorderLine; 111*cdf0e10cSrcweir class SvxBoxItem; 112*cdf0e10cSrcweir class SvxBoxInfoItem; 113*cdf0e10cSrcweir class SvxItemPropertySet; 114*cdf0e10cSrcweir 115*cdf0e10cSrcweir class ScLinkListener : public SvtListener 116*cdf0e10cSrcweir { 117*cdf0e10cSrcweir Link aLink; 118*cdf0e10cSrcweir public: 119*cdf0e10cSrcweir ScLinkListener(const Link& rL) : aLink(rL) {} 120*cdf0e10cSrcweir virtual ~ScLinkListener(); 121*cdf0e10cSrcweir virtual void Notify( SvtBroadcaster& rBC, const SfxHint& rHint ); 122*cdf0e10cSrcweir }; 123*cdf0e10cSrcweir 124*cdf0e10cSrcweir typedef ::com::sun::star::uno::Reference< 125*cdf0e10cSrcweir ::com::sun::star::util::XModifyListener >* XModifyListenerPtr; 126*cdf0e10cSrcweir SV_DECL_PTRARR_DEL( XModifyListenerArr_Impl, XModifyListenerPtr, 4, 4 ) 127*cdf0e10cSrcweir 128*cdf0e10cSrcweir class ScNamedEntry; 129*cdf0e10cSrcweir typedef ScNamedEntry* ScNamedEntryPtr; 130*cdf0e10cSrcweir SV_DECL_PTRARR_DEL( ScNamedEntryArr_Impl, ScNamedEntryPtr, 4, 4 ) 131*cdf0e10cSrcweir 132*cdf0e10cSrcweir 133*cdf0e10cSrcweir // ScCellRangesBase - Basisklasse fuer ScCellRangesObj (mit Index-Access) 134*cdf0e10cSrcweir // und ScCellRangeObj (ohne Index-Access) 135*cdf0e10cSrcweir 136*cdf0e10cSrcweir // XServiceInfo ist in den Ableitungen implementiert 137*cdf0e10cSrcweir 138*cdf0e10cSrcweir class ScHelperFunctions 139*cdf0e10cSrcweir { 140*cdf0e10cSrcweir public: 141*cdf0e10cSrcweir static const SvxBorderLine* GetBorderLine( SvxBorderLine& rLine, const com::sun::star::table::BorderLine& rStruct ); 142*cdf0e10cSrcweir static void FillBoxItems( SvxBoxItem& rOuter, SvxBoxInfoItem& rInner, const com::sun::star::table::TableBorder& rBorder ); 143*cdf0e10cSrcweir static void FillBorderLine( com::sun::star::table::BorderLine& rStruct, const SvxBorderLine* pLine ); 144*cdf0e10cSrcweir static void FillTableBorder( com::sun::star::table::TableBorder& rBorder, 145*cdf0e10cSrcweir const SvxBoxItem& rOuter, const SvxBoxInfoItem& rInner ); 146*cdf0e10cSrcweir static void ApplyBorder( ScDocShell* pDocShell, const ScRangeList& rRanges, 147*cdf0e10cSrcweir const SvxBoxItem& rOuter, const SvxBoxInfoItem& rInner ); 148*cdf0e10cSrcweir }; 149*cdf0e10cSrcweir 150*cdf0e10cSrcweir namespace ooo 151*cdf0e10cSrcweir { 152*cdf0e10cSrcweir namespace vba { 153*cdf0e10cSrcweir namespace excel { 154*cdf0e10cSrcweir class ScVbaCellRangeAccess; // Vba Helper class 155*cdf0e10cSrcweir } 156*cdf0e10cSrcweir } 157*cdf0e10cSrcweir } 158*cdf0e10cSrcweir 159*cdf0e10cSrcweir class SC_DLLPUBLIC ScCellRangesBase : public com::sun::star::beans::XPropertySet, 160*cdf0e10cSrcweir public com::sun::star::beans::XMultiPropertySet, 161*cdf0e10cSrcweir public com::sun::star::beans::XPropertyState, 162*cdf0e10cSrcweir public com::sun::star::sheet::XSheetOperation, 163*cdf0e10cSrcweir public com::sun::star::chart::XChartDataArray, 164*cdf0e10cSrcweir public com::sun::star::util::XIndent, 165*cdf0e10cSrcweir public com::sun::star::sheet::XCellRangesQuery, 166*cdf0e10cSrcweir public com::sun::star::sheet::XFormulaQuery, 167*cdf0e10cSrcweir public com::sun::star::util::XReplaceable, 168*cdf0e10cSrcweir public com::sun::star::util::XModifyBroadcaster, 169*cdf0e10cSrcweir public com::sun::star::lang::XServiceInfo, 170*cdf0e10cSrcweir public com::sun::star::lang::XUnoTunnel, 171*cdf0e10cSrcweir public com::sun::star::lang::XTypeProvider, 172*cdf0e10cSrcweir public com::sun::star::beans::XTolerantMultiPropertySet, 173*cdf0e10cSrcweir public cppu::OWeakObject, 174*cdf0e10cSrcweir public SfxListener 175*cdf0e10cSrcweir { 176*cdf0e10cSrcweir friend class ScTabViewObj; // fuer select() 177*cdf0e10cSrcweir friend class ScTableSheetObj; // fuer createCursorByRange() 178*cdf0e10cSrcweir friend class ooo::vba::excel::ScVbaCellRangeAccess; 179*cdf0e10cSrcweir 180*cdf0e10cSrcweir private: 181*cdf0e10cSrcweir const SfxItemPropertySet* pPropSet; 182*cdf0e10cSrcweir ScDocShell* pDocShell; 183*cdf0e10cSrcweir ScLinkListener* pValueListener; 184*cdf0e10cSrcweir ScPatternAttr* pCurrentFlat; 185*cdf0e10cSrcweir ScPatternAttr* pCurrentDeep; 186*cdf0e10cSrcweir SfxItemSet* pCurrentDataSet; 187*cdf0e10cSrcweir SfxItemSet* pNoDfltCurrentDataSet; 188*cdf0e10cSrcweir ScMarkData* pMarkData; 189*cdf0e10cSrcweir ScRangeList aRanges; 190*cdf0e10cSrcweir sal_Int64 nObjectId; 191*cdf0e10cSrcweir sal_Bool bChartColAsHdr; 192*cdf0e10cSrcweir sal_Bool bChartRowAsHdr; 193*cdf0e10cSrcweir sal_Bool bCursorOnly; 194*cdf0e10cSrcweir sal_Bool bGotDataChangedHint; 195*cdf0e10cSrcweir XModifyListenerArr_Impl aValueListeners; 196*cdf0e10cSrcweir 197*cdf0e10cSrcweir DECL_LINK( ValueListenerHdl, SfxHint* ); 198*cdf0e10cSrcweir 199*cdf0e10cSrcweir private: 200*cdf0e10cSrcweir void PaintRanges_Impl( sal_uInt16 nPart ); 201*cdf0e10cSrcweir ScRangeListRef GetLimitedChartRanges_Impl( long nDataColumns, long nDataRows ) const; 202*cdf0e10cSrcweir void ForceChartListener_Impl(); 203*cdf0e10cSrcweir ScMemChart* CreateMemChart_Impl() const; 204*cdf0e10cSrcweir 205*cdf0e10cSrcweir const ScPatternAttr* GetCurrentAttrsFlat(); 206*cdf0e10cSrcweir const ScPatternAttr* GetCurrentAttrsDeep(); 207*cdf0e10cSrcweir SfxItemSet* GetCurrentDataSet(bool bNoDflt = false); 208*cdf0e10cSrcweir void ForgetMarkData(); 209*cdf0e10cSrcweir void ForgetCurrentAttrs(); 210*cdf0e10cSrcweir 211*cdf0e10cSrcweir com::sun::star::uno::Reference<com::sun::star::sheet::XSheetCellRanges> 212*cdf0e10cSrcweir QueryDifferences_Impl(const com::sun::star::table::CellAddress& aCompare, 213*cdf0e10cSrcweir sal_Bool bColumnDiff); 214*cdf0e10cSrcweir com::sun::star::uno::Reference<com::sun::star::uno::XInterface> 215*cdf0e10cSrcweir Find_Impl(const com::sun::star::uno::Reference< 216*cdf0e10cSrcweir com::sun::star::util::XSearchDescriptor>& xDesc, 217*cdf0e10cSrcweir const ScAddress* pLastPos); 218*cdf0e10cSrcweir 219*cdf0e10cSrcweir protected: 220*cdf0e10cSrcweir const ScMarkData* GetMarkData(); 221*cdf0e10cSrcweir 222*cdf0e10cSrcweir // GetItemPropertyMap for derived classes must contain all entries, including base class 223*cdf0e10cSrcweir virtual const SfxItemPropertyMap* GetItemPropertyMap(); 224*cdf0e10cSrcweir virtual ::com::sun::star::beans::PropertyState GetOnePropertyState( 225*cdf0e10cSrcweir sal_uInt16 nItemWhich, const SfxItemPropertySimpleEntry* pEntry ); 226*cdf0e10cSrcweir virtual void GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry, 227*cdf0e10cSrcweir ::com::sun::star::uno::Any& ) 228*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 229*cdf0e10cSrcweir virtual void SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry, 230*cdf0e10cSrcweir const ::com::sun::star::uno::Any& aValue ) 231*cdf0e10cSrcweir throw(::com::sun::star::lang::IllegalArgumentException, 232*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 233*cdf0e10cSrcweir 234*cdf0e10cSrcweir public: 235*cdf0e10cSrcweir ScCellRangesBase(); // fuer SMART_REFLECTION Krempel 236*cdf0e10cSrcweir ScCellRangesBase(ScDocShell* pDocSh, const ScRange& rR); 237*cdf0e10cSrcweir ScCellRangesBase(ScDocShell* pDocSh, const ScRangeList& rR); 238*cdf0e10cSrcweir virtual ~ScCellRangesBase(); 239*cdf0e10cSrcweir 240*cdf0e10cSrcweir virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( 241*cdf0e10cSrcweir const ::com::sun::star::uno::Type & rType ) 242*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 243*cdf0e10cSrcweir virtual void SAL_CALL acquire() throw(); 244*cdf0e10cSrcweir virtual void SAL_CALL release() throw(); 245*cdf0e10cSrcweir 246*cdf0e10cSrcweir virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); 247*cdf0e10cSrcweir virtual void RefChanged(); 248*cdf0e10cSrcweir 249*cdf0e10cSrcweir // aus Ableitungen, aber auch per getImplementation 250*cdf0e10cSrcweir ScDocShell* GetDocShell() const { return pDocShell; } 251*cdf0e10cSrcweir ScDocument* GetDocument() const; 252*cdf0e10cSrcweir const ScRangeList& GetRangeList() const { return aRanges; } 253*cdf0e10cSrcweir void AddRange(const ScRange& rRange, const sal_Bool bMergeRanges); 254*cdf0e10cSrcweir 255*cdf0e10cSrcweir // per Service erzeugtes Objekt zum Leben erwecken: 256*cdf0e10cSrcweir void InitInsertRange(ScDocShell* pDocSh, const ScRange& rR); 257*cdf0e10cSrcweir 258*cdf0e10cSrcweir void SetNewRange(const ScRange& rNew); // fuer Cursor 259*cdf0e10cSrcweir void SetNewRanges(const ScRangeList& rNew); 260*cdf0e10cSrcweir 261*cdf0e10cSrcweir void SetCursorOnly(sal_Bool bSet); 262*cdf0e10cSrcweir sal_Bool IsCursorOnly() const { return bCursorOnly; } 263*cdf0e10cSrcweir 264*cdf0e10cSrcweir // XSheetOperation 265*cdf0e10cSrcweir virtual double SAL_CALL computeFunction( ::com::sun::star::sheet::GeneralFunction nFunction ) 266*cdf0e10cSrcweir throw(::com::sun::star::uno::Exception, 267*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 268*cdf0e10cSrcweir virtual void SAL_CALL clearContents( sal_Int32 nContentFlags ) 269*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 270*cdf0e10cSrcweir 271*cdf0e10cSrcweir // XPropertySet 272*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > 273*cdf0e10cSrcweir SAL_CALL getPropertySetInfo() 274*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 275*cdf0e10cSrcweir virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, 276*cdf0e10cSrcweir const ::com::sun::star::uno::Any& aValue ) 277*cdf0e10cSrcweir throw(::com::sun::star::beans::UnknownPropertyException, 278*cdf0e10cSrcweir ::com::sun::star::beans::PropertyVetoException, 279*cdf0e10cSrcweir ::com::sun::star::lang::IllegalArgumentException, 280*cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 281*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 282*cdf0e10cSrcweir virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( 283*cdf0e10cSrcweir const ::rtl::OUString& PropertyName ) 284*cdf0e10cSrcweir throw(::com::sun::star::beans::UnknownPropertyException, 285*cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 286*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 287*cdf0e10cSrcweir virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, 288*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 289*cdf0e10cSrcweir ::com::sun::star::beans::XPropertyChangeListener >& xListener ) 290*cdf0e10cSrcweir throw(::com::sun::star::beans::UnknownPropertyException, 291*cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 292*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 293*cdf0e10cSrcweir virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, 294*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 295*cdf0e10cSrcweir ::com::sun::star::beans::XPropertyChangeListener >& aListener ) 296*cdf0e10cSrcweir throw(::com::sun::star::beans::UnknownPropertyException, 297*cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 298*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 299*cdf0e10cSrcweir virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, 300*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 301*cdf0e10cSrcweir ::com::sun::star::beans::XVetoableChangeListener >& aListener ) 302*cdf0e10cSrcweir throw(::com::sun::star::beans::UnknownPropertyException, 303*cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 304*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 305*cdf0e10cSrcweir virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, 306*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 307*cdf0e10cSrcweir ::com::sun::star::beans::XVetoableChangeListener >& aListener ) 308*cdf0e10cSrcweir throw(::com::sun::star::beans::UnknownPropertyException, 309*cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 310*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 311*cdf0e10cSrcweir 312*cdf0e10cSrcweir // XMultiPropertySet 313*cdf0e10cSrcweir virtual void SAL_CALL setPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, 314*cdf0e10cSrcweir const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues ) 315*cdf0e10cSrcweir throw (::com::sun::star::beans::PropertyVetoException, 316*cdf0e10cSrcweir ::com::sun::star::lang::IllegalArgumentException, 317*cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 318*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 319*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL 320*cdf0e10cSrcweir getPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) 321*cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 322*cdf0e10cSrcweir virtual void SAL_CALL addPropertiesChangeListener( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, 323*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) 324*cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 325*cdf0e10cSrcweir virtual void SAL_CALL removePropertiesChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) 326*cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 327*cdf0e10cSrcweir virtual void SAL_CALL firePropertiesChangeEvent( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, 328*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) 329*cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 330*cdf0e10cSrcweir 331*cdf0e10cSrcweir // XTolerantMultiPropertySet 332*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::SetPropertyTolerantFailed > SAL_CALL 333*cdf0e10cSrcweir setPropertyValuesTolerant( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, 334*cdf0e10cSrcweir const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues ) 335*cdf0e10cSrcweir throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); 336*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::GetPropertyTolerantResult > SAL_CALL 337*cdf0e10cSrcweir getPropertyValuesTolerant( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) 338*cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 339*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::GetDirectPropertyTolerantResult > SAL_CALL 340*cdf0e10cSrcweir getDirectPropertyValuesTolerant( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) 341*cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 342*cdf0e10cSrcweir 343*cdf0e10cSrcweir // XPropertyState 344*cdf0e10cSrcweir virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( 345*cdf0e10cSrcweir const ::rtl::OUString& PropertyName ) 346*cdf0e10cSrcweir throw(::com::sun::star::beans::UnknownPropertyException, 347*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 348*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL 349*cdf0e10cSrcweir getPropertyStates( const ::com::sun::star::uno::Sequence< 350*cdf0e10cSrcweir ::rtl::OUString >& aPropertyName ) 351*cdf0e10cSrcweir throw(::com::sun::star::beans::UnknownPropertyException, 352*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 353*cdf0e10cSrcweir virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) 354*cdf0e10cSrcweir throw(::com::sun::star::beans::UnknownPropertyException, 355*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 356*cdf0e10cSrcweir virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( 357*cdf0e10cSrcweir const ::rtl::OUString& aPropertyName ) 358*cdf0e10cSrcweir throw(::com::sun::star::beans::UnknownPropertyException, 359*cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 360*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 361*cdf0e10cSrcweir 362*cdf0e10cSrcweir // XIndent 363*cdf0e10cSrcweir virtual void SAL_CALL decrementIndent() throw(::com::sun::star::uno::RuntimeException); 364*cdf0e10cSrcweir virtual void SAL_CALL incrementIndent() throw(::com::sun::star::uno::RuntimeException); 365*cdf0e10cSrcweir 366*cdf0e10cSrcweir // XChartData 367*cdf0e10cSrcweir virtual void SAL_CALL addChartDataChangeEventListener( 368*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 369*cdf0e10cSrcweir ::com::sun::star::chart::XChartDataChangeEventListener >& aListener ) 370*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 371*cdf0e10cSrcweir virtual void SAL_CALL removeChartDataChangeEventListener( const ::com::sun::star::uno::Reference< 372*cdf0e10cSrcweir ::com::sun::star::chart::XChartDataChangeEventListener >& aListener ) 373*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 374*cdf0e10cSrcweir virtual double SAL_CALL getNotANumber() throw(::com::sun::star::uno::RuntimeException); 375*cdf0e10cSrcweir virtual sal_Bool SAL_CALL isNotANumber( double nNumber ) 376*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 377*cdf0e10cSrcweir 378*cdf0e10cSrcweir // XChartDataArray 379*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< double > > SAL_CALL 380*cdf0e10cSrcweir getData() throw(::com::sun::star::uno::RuntimeException); 381*cdf0e10cSrcweir virtual void SAL_CALL setData( const ::com::sun::star::uno::Sequence< 382*cdf0e10cSrcweir ::com::sun::star::uno::Sequence< double > >& aData ) 383*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 384*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getRowDescriptions() 385*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 386*cdf0e10cSrcweir virtual void SAL_CALL setRowDescriptions( const ::com::sun::star::uno::Sequence< 387*cdf0e10cSrcweir ::rtl::OUString >& aRowDescriptions ) 388*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 389*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getColumnDescriptions() 390*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 391*cdf0e10cSrcweir virtual void SAL_CALL setColumnDescriptions( const ::com::sun::star::uno::Sequence< 392*cdf0e10cSrcweir ::rtl::OUString >& aColumnDescriptions ) 393*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 394*cdf0e10cSrcweir 395*cdf0e10cSrcweir // XCellRangesQuery 396*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetCellRanges > SAL_CALL 397*cdf0e10cSrcweir queryVisibleCells() throw(::com::sun::star::uno::RuntimeException); 398*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetCellRanges > SAL_CALL 399*cdf0e10cSrcweir queryEmptyCells() throw(::com::sun::star::uno::RuntimeException); 400*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetCellRanges > SAL_CALL 401*cdf0e10cSrcweir queryContentCells( sal_Int16 nContentFlags ) 402*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 403*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetCellRanges > SAL_CALL 404*cdf0e10cSrcweir queryFormulaCells( sal_Int32 nResultFlags ) 405*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 406*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetCellRanges > SAL_CALL 407*cdf0e10cSrcweir queryColumnDifferences( 408*cdf0e10cSrcweir const ::com::sun::star::table::CellAddress& aCompare ) 409*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 410*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetCellRanges > SAL_CALL 411*cdf0e10cSrcweir queryRowDifferences( 412*cdf0e10cSrcweir const ::com::sun::star::table::CellAddress& aCompare ) 413*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 414*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetCellRanges > SAL_CALL 415*cdf0e10cSrcweir queryIntersection( 416*cdf0e10cSrcweir const ::com::sun::star::table::CellRangeAddress& aRange ) 417*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 418*cdf0e10cSrcweir 419*cdf0e10cSrcweir // XFormulaQuery 420*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetCellRanges > SAL_CALL 421*cdf0e10cSrcweir queryDependents( sal_Bool bRecursive ) 422*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 423*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetCellRanges > SAL_CALL 424*cdf0e10cSrcweir queryPrecedents( sal_Bool bRecursive ) 425*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 426*cdf0e10cSrcweir 427*cdf0e10cSrcweir // XSearchable 428*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XSearchDescriptor > SAL_CALL 429*cdf0e10cSrcweir createSearchDescriptor() 430*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 431*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL 432*cdf0e10cSrcweir findAll( const ::com::sun::star::uno::Reference< 433*cdf0e10cSrcweir ::com::sun::star::util::XSearchDescriptor >& xDesc ) 434*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 435*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL 436*cdf0e10cSrcweir findFirst( const ::com::sun::star::uno::Reference< 437*cdf0e10cSrcweir ::com::sun::star::util::XSearchDescriptor >& xDesc ) 438*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 439*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL 440*cdf0e10cSrcweir findNext( const ::com::sun::star::uno::Reference< 441*cdf0e10cSrcweir ::com::sun::star::uno::XInterface >& xStartAt, 442*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 443*cdf0e10cSrcweir ::com::sun::star::util::XSearchDescriptor >& xDesc ) 444*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 445*cdf0e10cSrcweir 446*cdf0e10cSrcweir // XReplaceable 447*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XReplaceDescriptor > SAL_CALL 448*cdf0e10cSrcweir createReplaceDescriptor() throw(::com::sun::star::uno::RuntimeException); 449*cdf0e10cSrcweir virtual sal_Int32 SAL_CALL replaceAll( const ::com::sun::star::uno::Reference< 450*cdf0e10cSrcweir ::com::sun::star::util::XSearchDescriptor >& xDesc ) 451*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 452*cdf0e10cSrcweir 453*cdf0e10cSrcweir // XModifyBroadcaster 454*cdf0e10cSrcweir virtual void SAL_CALL addModifyListener( const ::com::sun::star::uno::Reference< 455*cdf0e10cSrcweir ::com::sun::star::util::XModifyListener >& aListener ) 456*cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 457*cdf0e10cSrcweir virtual void SAL_CALL removeModifyListener( const ::com::sun::star::uno::Reference< 458*cdf0e10cSrcweir ::com::sun::star::util::XModifyListener >& aListener ) 459*cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 460*cdf0e10cSrcweir 461*cdf0e10cSrcweir // XServiceInfo 462*cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getImplementationName() 463*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 464*cdf0e10cSrcweir virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) 465*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 466*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() 467*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 468*cdf0e10cSrcweir 469*cdf0e10cSrcweir // XUnoTunnel 470*cdf0e10cSrcweir virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< 471*cdf0e10cSrcweir sal_Int8 >& aIdentifier ) 472*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 473*cdf0e10cSrcweir 474*cdf0e10cSrcweir static const com::sun::star::uno::Sequence<sal_Int8>& getUnoTunnelId(); 475*cdf0e10cSrcweir static ScCellRangesBase* getImplementation( const com::sun::star::uno::Reference< 476*cdf0e10cSrcweir com::sun::star::uno::XInterface> xObj ); 477*cdf0e10cSrcweir 478*cdf0e10cSrcweir // XTypeProvider 479*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() 480*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 481*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() 482*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 483*cdf0e10cSrcweir }; 484*cdf0e10cSrcweir 485*cdf0e10cSrcweir 486*cdf0e10cSrcweir class SC_DLLPUBLIC ScCellRangesObj : public ScCellRangesBase, 487*cdf0e10cSrcweir public com::sun::star::sheet::XSheetCellRangeContainer, 488*cdf0e10cSrcweir public com::sun::star::container::XNameContainer, 489*cdf0e10cSrcweir public com::sun::star::container::XEnumerationAccess 490*cdf0e10cSrcweir { 491*cdf0e10cSrcweir private: 492*cdf0e10cSrcweir ScNamedEntryArr_Impl aNamedEntries; 493*cdf0e10cSrcweir 494*cdf0e10cSrcweir ScCellRangeObj* GetObjectByIndex_Impl(sal_Int32 nIndex) const; 495*cdf0e10cSrcweir 496*cdf0e10cSrcweir public: 497*cdf0e10cSrcweir ScCellRangesObj(ScDocShell* pDocSh, const ScRangeList& rR); 498*cdf0e10cSrcweir virtual ~ScCellRangesObj(); 499*cdf0e10cSrcweir 500*cdf0e10cSrcweir virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( 501*cdf0e10cSrcweir const ::com::sun::star::uno::Type & rType ) 502*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 503*cdf0e10cSrcweir virtual void SAL_CALL acquire() throw(); 504*cdf0e10cSrcweir virtual void SAL_CALL release() throw(); 505*cdf0e10cSrcweir 506*cdf0e10cSrcweir virtual void RefChanged(); 507*cdf0e10cSrcweir 508*cdf0e10cSrcweir // XSheetCellRanges 509*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumerationAccess > SAL_CALL 510*cdf0e10cSrcweir getCells() throw(::com::sun::star::uno::RuntimeException); 511*cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getRangeAddressesAsString() 512*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 513*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::com::sun::star::table::CellRangeAddress > SAL_CALL 514*cdf0e10cSrcweir getRangeAddresses() throw(::com::sun::star::uno::RuntimeException); 515*cdf0e10cSrcweir 516*cdf0e10cSrcweir // XSheetCellRangeContainer 517*cdf0e10cSrcweir virtual void SAL_CALL addRangeAddress( const ::com::sun::star::table::CellRangeAddress& rRange, 518*cdf0e10cSrcweir sal_Bool bMergeRanges ) 519*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 520*cdf0e10cSrcweir virtual void SAL_CALL removeRangeAddress( const ::com::sun::star::table::CellRangeAddress& rRange ) 521*cdf0e10cSrcweir throw(::com::sun::star::container::NoSuchElementException, 522*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 523*cdf0e10cSrcweir virtual void SAL_CALL addRangeAddresses( const ::com::sun::star::uno::Sequence< 524*cdf0e10cSrcweir ::com::sun::star::table::CellRangeAddress >& rRanges, 525*cdf0e10cSrcweir sal_Bool bMergeRanges ) 526*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 527*cdf0e10cSrcweir virtual void SAL_CALL removeRangeAddresses( const ::com::sun::star::uno::Sequence< 528*cdf0e10cSrcweir ::com::sun::star::table::CellRangeAddress >& rRanges ) 529*cdf0e10cSrcweir throw(::com::sun::star::container::NoSuchElementException, 530*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 531*cdf0e10cSrcweir 532*cdf0e10cSrcweir // XNameContainer 533*cdf0e10cSrcweir virtual void SAL_CALL insertByName( const ::rtl::OUString& aName, 534*cdf0e10cSrcweir const ::com::sun::star::uno::Any& aElement ) 535*cdf0e10cSrcweir throw(::com::sun::star::lang::IllegalArgumentException, 536*cdf0e10cSrcweir ::com::sun::star::container::ElementExistException, 537*cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 538*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 539*cdf0e10cSrcweir virtual void SAL_CALL removeByName( const ::rtl::OUString& Name ) 540*cdf0e10cSrcweir throw(::com::sun::star::container::NoSuchElementException, 541*cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 542*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 543*cdf0e10cSrcweir 544*cdf0e10cSrcweir // XNameReplace 545*cdf0e10cSrcweir virtual void SAL_CALL replaceByName( const ::rtl::OUString& aName, 546*cdf0e10cSrcweir const ::com::sun::star::uno::Any& aElement ) 547*cdf0e10cSrcweir throw(::com::sun::star::lang::IllegalArgumentException, 548*cdf0e10cSrcweir ::com::sun::star::container::NoSuchElementException, 549*cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 550*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 551*cdf0e10cSrcweir 552*cdf0e10cSrcweir // XNameAccess 553*cdf0e10cSrcweir virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) 554*cdf0e10cSrcweir throw(::com::sun::star::container::NoSuchElementException, 555*cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 556*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 557*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames() 558*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 559*cdf0e10cSrcweir virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) 560*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 561*cdf0e10cSrcweir 562*cdf0e10cSrcweir // XIndexAccess 563*cdf0e10cSrcweir virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException); 564*cdf0e10cSrcweir virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) 565*cdf0e10cSrcweir throw(::com::sun::star::lang::IndexOutOfBoundsException, 566*cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 567*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 568*cdf0e10cSrcweir 569*cdf0e10cSrcweir // XElementAccess 570*cdf0e10cSrcweir virtual ::com::sun::star::uno::Type SAL_CALL getElementType() 571*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 572*cdf0e10cSrcweir virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException); 573*cdf0e10cSrcweir 574*cdf0e10cSrcweir // XEnumerationAccess 575*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL 576*cdf0e10cSrcweir createEnumeration() throw(::com::sun::star::uno::RuntimeException); 577*cdf0e10cSrcweir 578*cdf0e10cSrcweir // XServiceInfo 579*cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getImplementationName() 580*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 581*cdf0e10cSrcweir virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) 582*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 583*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() 584*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 585*cdf0e10cSrcweir 586*cdf0e10cSrcweir // XTypeProvider 587*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() 588*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 589*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() 590*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 591*cdf0e10cSrcweir }; 592*cdf0e10cSrcweir 593*cdf0e10cSrcweir 594*cdf0e10cSrcweir class SC_DLLPUBLIC ScCellRangeObj : public ScCellRangesBase, 595*cdf0e10cSrcweir public com::sun::star::sheet::XCellRangeAddressable, 596*cdf0e10cSrcweir public com::sun::star::sheet::XSheetCellRange, 597*cdf0e10cSrcweir public com::sun::star::sheet::XArrayFormulaRange, 598*cdf0e10cSrcweir public com::sun::star::sheet::XArrayFormulaTokens, 599*cdf0e10cSrcweir public com::sun::star::sheet::XCellRangeData, 600*cdf0e10cSrcweir public com::sun::star::sheet::XCellRangeFormula, 601*cdf0e10cSrcweir public com::sun::star::sheet::XMultipleOperation, 602*cdf0e10cSrcweir public com::sun::star::util::XMergeable, 603*cdf0e10cSrcweir public com::sun::star::sheet::XCellSeries, 604*cdf0e10cSrcweir public com::sun::star::table::XAutoFormattable, 605*cdf0e10cSrcweir public com::sun::star::util::XSortable, 606*cdf0e10cSrcweir public com::sun::star::sheet::XSheetFilterableEx, 607*cdf0e10cSrcweir public com::sun::star::sheet::XSubTotalCalculatable, 608*cdf0e10cSrcweir public com::sun::star::util::XImportable, 609*cdf0e10cSrcweir public com::sun::star::sheet::XCellFormatRangesSupplier, 610*cdf0e10cSrcweir public com::sun::star::sheet::XUniqueCellFormatRangesSupplier, 611*cdf0e10cSrcweir public com::sun::star::table::XColumnRowRange 612*cdf0e10cSrcweir { 613*cdf0e10cSrcweir private: 614*cdf0e10cSrcweir const SfxItemPropertySet* pRangePropSet; 615*cdf0e10cSrcweir ScRange aRange; 616*cdf0e10cSrcweir 617*cdf0e10cSrcweir protected: 618*cdf0e10cSrcweir const ScRange& GetRange() const { return aRange; } 619*cdf0e10cSrcweir virtual const SfxItemPropertyMap* GetItemPropertyMap(); 620*cdf0e10cSrcweir virtual void GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry, 621*cdf0e10cSrcweir ::com::sun::star::uno::Any& ) 622*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 623*cdf0e10cSrcweir virtual void SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry, 624*cdf0e10cSrcweir const ::com::sun::star::uno::Any& aValue ) 625*cdf0e10cSrcweir throw(::com::sun::star::lang::IllegalArgumentException, 626*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 627*cdf0e10cSrcweir 628*cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::table::XCell > 629*cdf0e10cSrcweir GetCellByPosition_Impl( sal_Int32 nColumn, sal_Int32 nRow ) 630*cdf0e10cSrcweir throw(::com::sun::star::lang::IndexOutOfBoundsException, 631*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 632*cdf0e10cSrcweir 633*cdf0e10cSrcweir void SetArrayFormula_Impl( const rtl::OUString& rFormula, 634*cdf0e10cSrcweir const rtl::OUString& rFormulaNmsp, 635*cdf0e10cSrcweir const formula::FormulaGrammar::Grammar eGrammar ) 636*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 637*cdf0e10cSrcweir 638*cdf0e10cSrcweir public: 639*cdf0e10cSrcweir ScCellRangeObj(ScDocShell* pDocSh, const ScRange& rR); 640*cdf0e10cSrcweir virtual ~ScCellRangeObj(); 641*cdf0e10cSrcweir 642*cdf0e10cSrcweir // uses ObjectShell from document, if set (returns NULL otherwise) 643*cdf0e10cSrcweir static com::sun::star::uno::Reference<com::sun::star::table::XCellRange> 644*cdf0e10cSrcweir CreateRangeFromDoc( ScDocument* pDoc, const ScRange& rR ); 645*cdf0e10cSrcweir 646*cdf0e10cSrcweir virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( 647*cdf0e10cSrcweir const ::com::sun::star::uno::Type & rType ) 648*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 649*cdf0e10cSrcweir virtual void SAL_CALL acquire() throw(); 650*cdf0e10cSrcweir virtual void SAL_CALL release() throw(); 651*cdf0e10cSrcweir 652*cdf0e10cSrcweir virtual void RefChanged(); 653*cdf0e10cSrcweir 654*cdf0e10cSrcweir // via getImplementation() 655*cdf0e10cSrcweir virtual void SetArrayFormulaWithGrammar( const ::rtl::OUString& rFormula, 656*cdf0e10cSrcweir const ::rtl::OUString& rFormulaNmsp, 657*cdf0e10cSrcweir const formula::FormulaGrammar::Grammar ) 658*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 659*cdf0e10cSrcweir 660*cdf0e10cSrcweir // XCellRange ist Basisklasse von XSheetCellRange und XSheetOperation 661*cdf0e10cSrcweir // operator XCellRangeRef() const { return (XSheetCellRange*)this; } 662*cdf0e10cSrcweir 663*cdf0e10cSrcweir // XCellRangeAddressable 664*cdf0e10cSrcweir virtual ::com::sun::star::table::CellRangeAddress SAL_CALL getRangeAddress() 665*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 666*cdf0e10cSrcweir 667*cdf0e10cSrcweir // XSheetCellRange 668*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSpreadsheet > SAL_CALL 669*cdf0e10cSrcweir getSpreadsheet() throw(::com::sun::star::uno::RuntimeException); 670*cdf0e10cSrcweir 671*cdf0e10cSrcweir // XArrayFormulaRange 672*cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getArrayFormula() throw(::com::sun::star::uno::RuntimeException); 673*cdf0e10cSrcweir virtual void SAL_CALL setArrayFormula( const ::rtl::OUString& aFormula ) 674*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 675*cdf0e10cSrcweir 676*cdf0e10cSrcweir // XArrayFormulaTokens 677*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::com::sun::star::sheet::FormulaToken > SAL_CALL getArrayTokens() 678*cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 679*cdf0e10cSrcweir virtual void SAL_CALL setArrayTokens( const ::com::sun::star::uno::Sequence< 680*cdf0e10cSrcweir ::com::sun::star::sheet::FormulaToken >& aTokens ) 681*cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 682*cdf0e10cSrcweir 683*cdf0e10cSrcweir // XCellRangeData 684*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< 685*cdf0e10cSrcweir ::com::sun::star::uno::Any > > SAL_CALL getDataArray() 686*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 687*cdf0e10cSrcweir virtual void SAL_CALL setDataArray( const ::com::sun::star::uno::Sequence< 688*cdf0e10cSrcweir ::com::sun::star::uno::Sequence< 689*cdf0e10cSrcweir ::com::sun::star::uno::Any > >& aArray ) 690*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 691*cdf0e10cSrcweir 692*cdf0e10cSrcweir // XCellRangeFormula 693*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< 694*cdf0e10cSrcweir ::rtl::OUString > > SAL_CALL getFormulaArray() 695*cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 696*cdf0e10cSrcweir virtual void SAL_CALL setFormulaArray( const ::com::sun::star::uno::Sequence< 697*cdf0e10cSrcweir ::com::sun::star::uno::Sequence< ::rtl::OUString > >& aArray ) 698*cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 699*cdf0e10cSrcweir 700*cdf0e10cSrcweir // XMultipleOperation 701*cdf0e10cSrcweir virtual void SAL_CALL setTableOperation( 702*cdf0e10cSrcweir const ::com::sun::star::table::CellRangeAddress& aFormulaRange, 703*cdf0e10cSrcweir ::com::sun::star::sheet::TableOperationMode nMode, 704*cdf0e10cSrcweir const ::com::sun::star::table::CellAddress& aColumnCell, 705*cdf0e10cSrcweir const ::com::sun::star::table::CellAddress& aRowCell ) 706*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 707*cdf0e10cSrcweir 708*cdf0e10cSrcweir // XMergeable 709*cdf0e10cSrcweir virtual void SAL_CALL merge( sal_Bool bMerge ) throw(::com::sun::star::uno::RuntimeException); 710*cdf0e10cSrcweir virtual sal_Bool SAL_CALL getIsMerged() throw(::com::sun::star::uno::RuntimeException); 711*cdf0e10cSrcweir 712*cdf0e10cSrcweir // XCellSeries 713*cdf0e10cSrcweir virtual void SAL_CALL fillSeries( ::com::sun::star::sheet::FillDirection nFillDirection, 714*cdf0e10cSrcweir ::com::sun::star::sheet::FillMode nFillMode, 715*cdf0e10cSrcweir ::com::sun::star::sheet::FillDateMode nFillDateMode, 716*cdf0e10cSrcweir double fStep, double fEndValue ) 717*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 718*cdf0e10cSrcweir virtual void SAL_CALL fillAuto( ::com::sun::star::sheet::FillDirection nFillDirection, 719*cdf0e10cSrcweir sal_Int32 nSourceCount ) 720*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 721*cdf0e10cSrcweir 722*cdf0e10cSrcweir // XAutoFormattable 723*cdf0e10cSrcweir virtual void SAL_CALL autoFormat( const ::rtl::OUString& aName ) 724*cdf0e10cSrcweir throw(::com::sun::star::lang::IllegalArgumentException, 725*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 726*cdf0e10cSrcweir 727*cdf0e10cSrcweir // XSortable 728*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL 729*cdf0e10cSrcweir createSortDescriptor() throw(::com::sun::star::uno::RuntimeException); 730*cdf0e10cSrcweir virtual void SAL_CALL sort( const ::com::sun::star::uno::Sequence< 731*cdf0e10cSrcweir ::com::sun::star::beans::PropertyValue >& xDescriptor ) 732*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 733*cdf0e10cSrcweir 734*cdf0e10cSrcweir // XSheetFilterableEx 735*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetFilterDescriptor > SAL_CALL 736*cdf0e10cSrcweir createFilterDescriptorByObject( const ::com::sun::star::uno::Reference< 737*cdf0e10cSrcweir ::com::sun::star::sheet::XSheetFilterable >& xObject ) 738*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 739*cdf0e10cSrcweir 740*cdf0e10cSrcweir // XSheetFilterable 741*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetFilterDescriptor > SAL_CALL 742*cdf0e10cSrcweir createFilterDescriptor( sal_Bool bEmpty ) 743*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 744*cdf0e10cSrcweir virtual void SAL_CALL filter( const ::com::sun::star::uno::Reference< 745*cdf0e10cSrcweir ::com::sun::star::sheet::XSheetFilterDescriptor >& xDescriptor ) 746*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 747*cdf0e10cSrcweir 748*cdf0e10cSrcweir // XSubTotalCalculatable 749*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSubTotalDescriptor > SAL_CALL 750*cdf0e10cSrcweir createSubTotalDescriptor( sal_Bool bEmpty ) 751*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 752*cdf0e10cSrcweir virtual void SAL_CALL applySubTotals( const ::com::sun::star::uno::Reference< 753*cdf0e10cSrcweir ::com::sun::star::sheet::XSubTotalDescriptor >& xDescriptor, 754*cdf0e10cSrcweir sal_Bool bReplace ) throw(::com::sun::star::uno::RuntimeException); 755*cdf0e10cSrcweir virtual void SAL_CALL removeSubTotals() throw(::com::sun::star::uno::RuntimeException); 756*cdf0e10cSrcweir 757*cdf0e10cSrcweir // XImportable 758*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL 759*cdf0e10cSrcweir createImportDescriptor( sal_Bool bEmpty ) 760*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 761*cdf0e10cSrcweir virtual void SAL_CALL doImport( const ::com::sun::star::uno::Sequence< 762*cdf0e10cSrcweir ::com::sun::star::beans::PropertyValue >& aDescriptor ) 763*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 764*cdf0e10cSrcweir 765*cdf0e10cSrcweir // XCellFormatRangesSupplier 766*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL 767*cdf0e10cSrcweir getCellFormatRanges() throw(::com::sun::star::uno::RuntimeException); 768*cdf0e10cSrcweir 769*cdf0e10cSrcweir // XUniqueCellFormatRangesSupplier 770*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL 771*cdf0e10cSrcweir getUniqueCellFormatRanges() throw(::com::sun::star::uno::RuntimeException); 772*cdf0e10cSrcweir 773*cdf0e10cSrcweir // XColumnRowRange 774*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XTableColumns > SAL_CALL 775*cdf0e10cSrcweir getColumns() throw(::com::sun::star::uno::RuntimeException); 776*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XTableRows > SAL_CALL 777*cdf0e10cSrcweir getRows() throw(::com::sun::star::uno::RuntimeException); 778*cdf0e10cSrcweir 779*cdf0e10cSrcweir // XCellRange 780*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCell > SAL_CALL 781*cdf0e10cSrcweir getCellByPosition( sal_Int32 nColumn, sal_Int32 nRow ) 782*cdf0e10cSrcweir throw(::com::sun::star::lang::IndexOutOfBoundsException, 783*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 784*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > SAL_CALL 785*cdf0e10cSrcweir getCellRangeByPosition( sal_Int32 nLeft, sal_Int32 nTop, 786*cdf0e10cSrcweir sal_Int32 nRight, sal_Int32 nBottom ) 787*cdf0e10cSrcweir throw(::com::sun::star::lang::IndexOutOfBoundsException, 788*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 789*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > SAL_CALL 790*cdf0e10cSrcweir getCellRangeByName( const ::rtl::OUString& aRange ) 791*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 792*cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > 793*cdf0e10cSrcweir getCellRangeByName( const ::rtl::OUString& aRange, const ScAddress::Details& rDetails ) 794*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 795*cdf0e10cSrcweir 796*cdf0e10cSrcweir // XPropertySet ueberladen wegen Range-Properties 797*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > 798*cdf0e10cSrcweir SAL_CALL getPropertySetInfo() 799*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 800*cdf0e10cSrcweir 801*cdf0e10cSrcweir // XServiceInfo 802*cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getImplementationName() 803*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 804*cdf0e10cSrcweir virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) 805*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 806*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() 807*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 808*cdf0e10cSrcweir 809*cdf0e10cSrcweir // XTypeProvider 810*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() 811*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 812*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() 813*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 814*cdf0e10cSrcweir }; 815*cdf0e10cSrcweir 816*cdf0e10cSrcweir 817*cdf0e10cSrcweir //! really derive cell from range? 818*cdf0e10cSrcweir 819*cdf0e10cSrcweir class SC_DLLPUBLIC ScCellObj : public ScCellRangeObj, 820*cdf0e10cSrcweir public com::sun::star::text::XText, 821*cdf0e10cSrcweir public com::sun::star::container::XEnumerationAccess, 822*cdf0e10cSrcweir public com::sun::star::table::XCell, 823*cdf0e10cSrcweir public com::sun::star::sheet::XFormulaTokens, 824*cdf0e10cSrcweir public com::sun::star::sheet::XCellAddressable, 825*cdf0e10cSrcweir public com::sun::star::sheet::XSheetAnnotationAnchor, 826*cdf0e10cSrcweir public com::sun::star::text::XTextFieldsSupplier, 827*cdf0e10cSrcweir public com::sun::star::document::XActionLockable 828*cdf0e10cSrcweir { 829*cdf0e10cSrcweir private: 830*cdf0e10cSrcweir SvxUnoText* pUnoText; 831*cdf0e10cSrcweir const SfxItemPropertySet* pCellPropSet; 832*cdf0e10cSrcweir ScAddress aCellPos; 833*cdf0e10cSrcweir sal_Int16 nActionLockCount; 834*cdf0e10cSrcweir 835*cdf0e10cSrcweir private: 836*cdf0e10cSrcweir String GetInputString_Impl(sal_Bool bEnglish) const; 837*cdf0e10cSrcweir String GetOutputString_Impl() const; 838*cdf0e10cSrcweir void SetString_Impl(const String& rString, sal_Bool bInterpret, sal_Bool bEnglish); 839*cdf0e10cSrcweir double GetValue_Impl() const; 840*cdf0e10cSrcweir void SetValue_Impl(double fValue); 841*cdf0e10cSrcweir com::sun::star::table::CellContentType GetResultType_Impl(); 842*cdf0e10cSrcweir 843*cdf0e10cSrcweir protected: 844*cdf0e10cSrcweir virtual const SfxItemPropertyMap* GetItemPropertyMap(); 845*cdf0e10cSrcweir virtual void GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry, 846*cdf0e10cSrcweir ::com::sun::star::uno::Any& ) 847*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 848*cdf0e10cSrcweir virtual void SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry, 849*cdf0e10cSrcweir const ::com::sun::star::uno::Any& aValue ) 850*cdf0e10cSrcweir throw(::com::sun::star::lang::IllegalArgumentException, 851*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 852*cdf0e10cSrcweir 853*cdf0e10cSrcweir public: 854*cdf0e10cSrcweir static const SvxItemPropertySet* GetEditPropertySet(); 855*cdf0e10cSrcweir static const SfxItemPropertyMap* GetCellPropertyMap(); 856*cdf0e10cSrcweir 857*cdf0e10cSrcweir ScCellObj(ScDocShell* pDocSh, const ScAddress& rP); 858*cdf0e10cSrcweir virtual ~ScCellObj(); 859*cdf0e10cSrcweir 860*cdf0e10cSrcweir virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( 861*cdf0e10cSrcweir const ::com::sun::star::uno::Type & rType ) 862*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 863*cdf0e10cSrcweir virtual void SAL_CALL acquire() throw(); 864*cdf0e10cSrcweir virtual void SAL_CALL release() throw(); 865*cdf0e10cSrcweir 866*cdf0e10cSrcweir virtual void RefChanged(); 867*cdf0e10cSrcweir 868*cdf0e10cSrcweir SvxUnoText& GetUnoText(); 869*cdf0e10cSrcweir 870*cdf0e10cSrcweir // XML import needs to set results at formula cells, 871*cdf0e10cSrcweir // not meant for any other purpose. 872*cdf0e10cSrcweir void SetFormulaResultString( const ::rtl::OUString& rResult ); 873*cdf0e10cSrcweir void SetFormulaResultDouble( double fResult ); 874*cdf0e10cSrcweir void SetFormulaWithGrammar( const ::rtl::OUString& rFormula, 875*cdf0e10cSrcweir const ::rtl::OUString& rFormulaNmsp, const formula::FormulaGrammar::Grammar ); 876*cdf0e10cSrcweir const ScAddress& GetPosition() const { return aCellPos; } 877*cdf0e10cSrcweir 878*cdf0e10cSrcweir void InputEnglishString( const ::rtl::OUString& rText ); 879*cdf0e10cSrcweir 880*cdf0e10cSrcweir // XText 881*cdf0e10cSrcweir virtual void SAL_CALL insertTextContent( const ::com::sun::star::uno::Reference< 882*cdf0e10cSrcweir ::com::sun::star::text::XTextRange >& xRange, 883*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 884*cdf0e10cSrcweir ::com::sun::star::text::XTextContent >& xContent, 885*cdf0e10cSrcweir sal_Bool bAbsorb ) 886*cdf0e10cSrcweir throw(::com::sun::star::lang::IllegalArgumentException, 887*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 888*cdf0e10cSrcweir virtual void SAL_CALL removeTextContent( const ::com::sun::star::uno::Reference< 889*cdf0e10cSrcweir ::com::sun::star::text::XTextContent >& xContent ) 890*cdf0e10cSrcweir throw(::com::sun::star::container::NoSuchElementException, 891*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 892*cdf0e10cSrcweir 893*cdf0e10cSrcweir // XSimpleText 894*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL 895*cdf0e10cSrcweir createTextCursor() throw(::com::sun::star::uno::RuntimeException); 896*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL 897*cdf0e10cSrcweir createTextCursorByRange( const ::com::sun::star::uno::Reference< 898*cdf0e10cSrcweir ::com::sun::star::text::XTextRange >& aTextPosition ) 899*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 900*cdf0e10cSrcweir virtual void SAL_CALL insertString( const ::com::sun::star::uno::Reference< 901*cdf0e10cSrcweir ::com::sun::star::text::XTextRange >& xRange, 902*cdf0e10cSrcweir const ::rtl::OUString& aString, sal_Bool bAbsorb ) 903*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 904*cdf0e10cSrcweir virtual void SAL_CALL insertControlCharacter( const ::com::sun::star::uno::Reference< 905*cdf0e10cSrcweir ::com::sun::star::text::XTextRange >& xRange, 906*cdf0e10cSrcweir sal_Int16 nControlCharacter, sal_Bool bAbsorb ) 907*cdf0e10cSrcweir throw(::com::sun::star::lang::IllegalArgumentException, 908*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 909*cdf0e10cSrcweir 910*cdf0e10cSrcweir // XTextRange 911*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL 912*cdf0e10cSrcweir getText() throw(::com::sun::star::uno::RuntimeException); 913*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL 914*cdf0e10cSrcweir getStart() throw(::com::sun::star::uno::RuntimeException); 915*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL 916*cdf0e10cSrcweir getEnd() throw(::com::sun::star::uno::RuntimeException); 917*cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getString() throw(::com::sun::star::uno::RuntimeException); 918*cdf0e10cSrcweir virtual void SAL_CALL setString( const ::rtl::OUString& aString ) 919*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 920*cdf0e10cSrcweir 921*cdf0e10cSrcweir // XEnumerationAccess 922*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL 923*cdf0e10cSrcweir createEnumeration() throw(::com::sun::star::uno::RuntimeException); 924*cdf0e10cSrcweir 925*cdf0e10cSrcweir // XElementAccess 926*cdf0e10cSrcweir virtual ::com::sun::star::uno::Type SAL_CALL getElementType() 927*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 928*cdf0e10cSrcweir virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException); 929*cdf0e10cSrcweir 930*cdf0e10cSrcweir // XCell 931*cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getFormula() throw(::com::sun::star::uno::RuntimeException); 932*cdf0e10cSrcweir virtual void SAL_CALL setFormula( const ::rtl::OUString& aFormula ) 933*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 934*cdf0e10cSrcweir virtual double SAL_CALL getValue() throw(::com::sun::star::uno::RuntimeException); 935*cdf0e10cSrcweir virtual void SAL_CALL setValue( double nValue ) throw(::com::sun::star::uno::RuntimeException); 936*cdf0e10cSrcweir virtual ::com::sun::star::table::CellContentType SAL_CALL getType() 937*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 938*cdf0e10cSrcweir virtual sal_Int32 SAL_CALL getError() throw(::com::sun::star::uno::RuntimeException); 939*cdf0e10cSrcweir 940*cdf0e10cSrcweir // XFormulaTokens 941*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::com::sun::star::sheet::FormulaToken > SAL_CALL getTokens() 942*cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 943*cdf0e10cSrcweir virtual void SAL_CALL setTokens( const ::com::sun::star::uno::Sequence< 944*cdf0e10cSrcweir ::com::sun::star::sheet::FormulaToken >& aTokens ) 945*cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 946*cdf0e10cSrcweir 947*cdf0e10cSrcweir // XCellAddressable 948*cdf0e10cSrcweir virtual ::com::sun::star::table::CellAddress SAL_CALL getCellAddress() 949*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 950*cdf0e10cSrcweir 951*cdf0e10cSrcweir // XSheetAnnotationAnchor 952*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetAnnotation > SAL_CALL 953*cdf0e10cSrcweir getAnnotation() throw(::com::sun::star::uno::RuntimeException); 954*cdf0e10cSrcweir 955*cdf0e10cSrcweir // XTextFieldsSupplier 956*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumerationAccess > SAL_CALL 957*cdf0e10cSrcweir getTextFields() throw(::com::sun::star::uno::RuntimeException); 958*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL 959*cdf0e10cSrcweir getTextFieldMasters() throw(::com::sun::star::uno::RuntimeException); 960*cdf0e10cSrcweir 961*cdf0e10cSrcweir // XPropertySet ueberladen wegen Zell-Properties 962*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > 963*cdf0e10cSrcweir SAL_CALL getPropertySetInfo() 964*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 965*cdf0e10cSrcweir 966*cdf0e10cSrcweir // XServiceInfo 967*cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getImplementationName() 968*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 969*cdf0e10cSrcweir virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) 970*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 971*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() 972*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 973*cdf0e10cSrcweir 974*cdf0e10cSrcweir // XTypeProvider 975*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() 976*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 977*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() 978*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 979*cdf0e10cSrcweir 980*cdf0e10cSrcweir // XActionLockable 981*cdf0e10cSrcweir virtual sal_Bool SAL_CALL isActionLocked() throw(::com::sun::star::uno::RuntimeException); 982*cdf0e10cSrcweir virtual void SAL_CALL addActionLock() throw(::com::sun::star::uno::RuntimeException); 983*cdf0e10cSrcweir virtual void SAL_CALL removeActionLock() throw(::com::sun::star::uno::RuntimeException); 984*cdf0e10cSrcweir virtual void SAL_CALL setActionLocks( sal_Int16 nLock ) 985*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 986*cdf0e10cSrcweir virtual sal_Int16 SAL_CALL resetActionLocks() throw(::com::sun::star::uno::RuntimeException); 987*cdf0e10cSrcweir 988*cdf0e10cSrcweir static String GetOutputString_Impl(ScDocument* pDoc, const ScAddress& aPos); 989*cdf0e10cSrcweir }; 990*cdf0e10cSrcweir 991*cdf0e10cSrcweir 992*cdf0e10cSrcweir class ScTableSheetObj : public ScCellRangeObj, 993*cdf0e10cSrcweir public com::sun::star::sheet::XSpreadsheet, 994*cdf0e10cSrcweir public com::sun::star::container::XNamed, 995*cdf0e10cSrcweir public com::sun::star::sheet::XSheetPageBreak, 996*cdf0e10cSrcweir public com::sun::star::sheet::XCellRangeMovement, 997*cdf0e10cSrcweir public com::sun::star::table::XTableChartsSupplier, 998*cdf0e10cSrcweir public com::sun::star::sheet::XDataPilotTablesSupplier, 999*cdf0e10cSrcweir public com::sun::star::sheet::XScenariosSupplier, 1000*cdf0e10cSrcweir public com::sun::star::sheet::XSheetAnnotationsSupplier, 1001*cdf0e10cSrcweir public com::sun::star::drawing::XDrawPageSupplier, 1002*cdf0e10cSrcweir public com::sun::star::sheet::XPrintAreas, 1003*cdf0e10cSrcweir public com::sun::star::sheet::XSheetLinkable, 1004*cdf0e10cSrcweir public com::sun::star::sheet::XSheetAuditing, 1005*cdf0e10cSrcweir public com::sun::star::sheet::XSheetOutline, 1006*cdf0e10cSrcweir public com::sun::star::util::XProtectable, 1007*cdf0e10cSrcweir public com::sun::star::sheet::XScenario, 1008*cdf0e10cSrcweir public com::sun::star::sheet::XScenarioEnhanced, 1009*cdf0e10cSrcweir public com::sun::star::sheet::XExternalSheetName, 1010*cdf0e10cSrcweir public com::sun::star::document::XEventsSupplier 1011*cdf0e10cSrcweir { 1012*cdf0e10cSrcweir friend class ScTableSheetsObj; // fuer insertByName() 1013*cdf0e10cSrcweir 1014*cdf0e10cSrcweir private: 1015*cdf0e10cSrcweir const SfxItemPropertySet* pSheetPropSet; 1016*cdf0e10cSrcweir 1017*cdf0e10cSrcweir SCTAB GetTab_Impl() const; 1018*cdf0e10cSrcweir void PrintAreaUndo_Impl( ScPrintRangeSaver* pOldRanges ); 1019*cdf0e10cSrcweir 1020*cdf0e10cSrcweir protected: 1021*cdf0e10cSrcweir virtual const SfxItemPropertyMap* GetItemPropertyMap(); 1022*cdf0e10cSrcweir virtual void GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry, 1023*cdf0e10cSrcweir ::com::sun::star::uno::Any& ) 1024*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1025*cdf0e10cSrcweir virtual void SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry, 1026*cdf0e10cSrcweir const ::com::sun::star::uno::Any& aValue ) 1027*cdf0e10cSrcweir throw(::com::sun::star::lang::IllegalArgumentException, 1028*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 1029*cdf0e10cSrcweir 1030*cdf0e10cSrcweir public: 1031*cdf0e10cSrcweir ScTableSheetObj(ScDocShell* pDocSh, SCTAB nTab); 1032*cdf0e10cSrcweir virtual ~ScTableSheetObj(); 1033*cdf0e10cSrcweir 1034*cdf0e10cSrcweir void InitInsertSheet(ScDocShell* pDocSh, SCTAB nTab); 1035*cdf0e10cSrcweir 1036*cdf0e10cSrcweir virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( 1037*cdf0e10cSrcweir const ::com::sun::star::uno::Type & rType ) 1038*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1039*cdf0e10cSrcweir virtual void SAL_CALL acquire() throw(); 1040*cdf0e10cSrcweir virtual void SAL_CALL release() throw(); 1041*cdf0e10cSrcweir 1042*cdf0e10cSrcweir // XSpreadsheet 1043*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetCellCursor > 1044*cdf0e10cSrcweir SAL_CALL createCursor() throw(::com::sun::star::uno::RuntimeException); 1045*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetCellCursor > SAL_CALL 1046*cdf0e10cSrcweir createCursorByRange( const ::com::sun::star::uno::Reference< 1047*cdf0e10cSrcweir ::com::sun::star::sheet::XSheetCellRange >& aRange ) 1048*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1049*cdf0e10cSrcweir 1050*cdf0e10cSrcweir // XSheetCellRange 1051*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSpreadsheet > SAL_CALL 1052*cdf0e10cSrcweir getSpreadsheet() throw(::com::sun::star::uno::RuntimeException); 1053*cdf0e10cSrcweir 1054*cdf0e10cSrcweir // XCellRange 1055*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCell > SAL_CALL 1056*cdf0e10cSrcweir getCellByPosition( sal_Int32 nColumn, sal_Int32 nRow ) 1057*cdf0e10cSrcweir throw(::com::sun::star::lang::IndexOutOfBoundsException, 1058*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 1059*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > SAL_CALL 1060*cdf0e10cSrcweir getCellRangeByPosition( sal_Int32 nLeft, sal_Int32 nTop, 1061*cdf0e10cSrcweir sal_Int32 nRight, sal_Int32 nBottom ) 1062*cdf0e10cSrcweir throw(::com::sun::star::lang::IndexOutOfBoundsException, 1063*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 1064*cdf0e10cSrcweir using ScCellRangeObj::getCellRangeByName; 1065*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > SAL_CALL 1066*cdf0e10cSrcweir getCellRangeByName( const ::rtl::OUString& aRange ) 1067*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1068*cdf0e10cSrcweir 1069*cdf0e10cSrcweir // XNamed 1070*cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getName() throw(::com::sun::star::uno::RuntimeException); 1071*cdf0e10cSrcweir virtual void SAL_CALL setName( const ::rtl::OUString& aName ) 1072*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1073*cdf0e10cSrcweir 1074*cdf0e10cSrcweir // XSheetPageBreak 1075*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::com::sun::star::sheet::TablePageBreakData > SAL_CALL 1076*cdf0e10cSrcweir getColumnPageBreaks() throw(::com::sun::star::uno::RuntimeException); 1077*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::com::sun::star::sheet::TablePageBreakData > SAL_CALL 1078*cdf0e10cSrcweir getRowPageBreaks() throw(::com::sun::star::uno::RuntimeException); 1079*cdf0e10cSrcweir virtual void SAL_CALL removeAllManualPageBreaks() throw(::com::sun::star::uno::RuntimeException); 1080*cdf0e10cSrcweir 1081*cdf0e10cSrcweir // XCellRangeMovement 1082*cdf0e10cSrcweir virtual void SAL_CALL insertCells( const ::com::sun::star::table::CellRangeAddress& aRange, 1083*cdf0e10cSrcweir ::com::sun::star::sheet::CellInsertMode nMode ) 1084*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1085*cdf0e10cSrcweir virtual void SAL_CALL removeRange( const ::com::sun::star::table::CellRangeAddress& aRange, 1086*cdf0e10cSrcweir ::com::sun::star::sheet::CellDeleteMode nMode ) 1087*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1088*cdf0e10cSrcweir virtual void SAL_CALL moveRange( const ::com::sun::star::table::CellAddress& aDestination, 1089*cdf0e10cSrcweir const ::com::sun::star::table::CellRangeAddress& aSource ) 1090*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1091*cdf0e10cSrcweir virtual void SAL_CALL copyRange( const ::com::sun::star::table::CellAddress& aDestination, 1092*cdf0e10cSrcweir const ::com::sun::star::table::CellRangeAddress& aSource ) 1093*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1094*cdf0e10cSrcweir 1095*cdf0e10cSrcweir // XTableChartsSupplier 1096*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XTableCharts > SAL_CALL 1097*cdf0e10cSrcweir getCharts() throw(::com::sun::star::uno::RuntimeException); 1098*cdf0e10cSrcweir 1099*cdf0e10cSrcweir // XDataPilotTablesSupplier 1100*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XDataPilotTables > SAL_CALL 1101*cdf0e10cSrcweir getDataPilotTables() throw(::com::sun::star::uno::RuntimeException); 1102*cdf0e10cSrcweir 1103*cdf0e10cSrcweir // XScenariosSupplier 1104*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XScenarios > SAL_CALL 1105*cdf0e10cSrcweir getScenarios() throw(::com::sun::star::uno::RuntimeException); 1106*cdf0e10cSrcweir 1107*cdf0e10cSrcweir // XSheetAnnotationsSupplier 1108*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetAnnotations > SAL_CALL 1109*cdf0e10cSrcweir getAnnotations() throw(::com::sun::star::uno::RuntimeException); 1110*cdf0e10cSrcweir 1111*cdf0e10cSrcweir // XDrawPageSupplier 1112*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > SAL_CALL 1113*cdf0e10cSrcweir getDrawPage() throw(::com::sun::star::uno::RuntimeException); 1114*cdf0e10cSrcweir 1115*cdf0e10cSrcweir // XPrintAreas 1116*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::com::sun::star::table::CellRangeAddress > SAL_CALL 1117*cdf0e10cSrcweir getPrintAreas() throw(::com::sun::star::uno::RuntimeException); 1118*cdf0e10cSrcweir virtual void SAL_CALL setPrintAreas( const ::com::sun::star::uno::Sequence< 1119*cdf0e10cSrcweir ::com::sun::star::table::CellRangeAddress >& aPrintAreas ) 1120*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1121*cdf0e10cSrcweir virtual sal_Bool SAL_CALL getPrintTitleColumns() throw(::com::sun::star::uno::RuntimeException); 1122*cdf0e10cSrcweir virtual void SAL_CALL setPrintTitleColumns( sal_Bool bPrintTitleColumns ) 1123*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1124*cdf0e10cSrcweir virtual ::com::sun::star::table::CellRangeAddress SAL_CALL getTitleColumns() 1125*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1126*cdf0e10cSrcweir virtual void SAL_CALL setTitleColumns( 1127*cdf0e10cSrcweir const ::com::sun::star::table::CellRangeAddress& aTitleColumns ) 1128*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1129*cdf0e10cSrcweir virtual sal_Bool SAL_CALL getPrintTitleRows() throw(::com::sun::star::uno::RuntimeException); 1130*cdf0e10cSrcweir virtual void SAL_CALL setPrintTitleRows( sal_Bool bPrintTitleRows ) 1131*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1132*cdf0e10cSrcweir virtual ::com::sun::star::table::CellRangeAddress SAL_CALL getTitleRows() 1133*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1134*cdf0e10cSrcweir virtual void SAL_CALL setTitleRows( 1135*cdf0e10cSrcweir const ::com::sun::star::table::CellRangeAddress& aTitleRows ) 1136*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1137*cdf0e10cSrcweir 1138*cdf0e10cSrcweir // XSheetLinkable 1139*cdf0e10cSrcweir virtual ::com::sun::star::sheet::SheetLinkMode SAL_CALL getLinkMode() 1140*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1141*cdf0e10cSrcweir virtual void SAL_CALL setLinkMode( ::com::sun::star::sheet::SheetLinkMode nLinkMode ) 1142*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1143*cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getLinkUrl() throw(::com::sun::star::uno::RuntimeException); 1144*cdf0e10cSrcweir virtual void SAL_CALL setLinkUrl( const ::rtl::OUString& aLinkUrl ) 1145*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1146*cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getLinkSheetName() throw(::com::sun::star::uno::RuntimeException); 1147*cdf0e10cSrcweir virtual void SAL_CALL setLinkSheetName( const ::rtl::OUString& aLinkSheetName ) 1148*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1149*cdf0e10cSrcweir virtual void SAL_CALL link( const ::rtl::OUString& aUrl, 1150*cdf0e10cSrcweir const ::rtl::OUString& aSheetName, 1151*cdf0e10cSrcweir const ::rtl::OUString& aFilterName, 1152*cdf0e10cSrcweir const ::rtl::OUString& aFilterOptions, 1153*cdf0e10cSrcweir ::com::sun::star::sheet::SheetLinkMode nMode ) 1154*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1155*cdf0e10cSrcweir 1156*cdf0e10cSrcweir // XSheetAuditing 1157*cdf0e10cSrcweir virtual sal_Bool SAL_CALL hideDependents( const ::com::sun::star::table::CellAddress& aPosition ) 1158*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1159*cdf0e10cSrcweir virtual sal_Bool SAL_CALL hidePrecedents( const ::com::sun::star::table::CellAddress& aPosition ) 1160*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1161*cdf0e10cSrcweir virtual sal_Bool SAL_CALL showDependents( const ::com::sun::star::table::CellAddress& aPosition ) 1162*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1163*cdf0e10cSrcweir virtual sal_Bool SAL_CALL showPrecedents( const ::com::sun::star::table::CellAddress& aPosition ) 1164*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1165*cdf0e10cSrcweir virtual sal_Bool SAL_CALL showErrors( const ::com::sun::star::table::CellAddress& aPosition ) 1166*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1167*cdf0e10cSrcweir virtual sal_Bool SAL_CALL showInvalid() throw(::com::sun::star::uno::RuntimeException); 1168*cdf0e10cSrcweir virtual void SAL_CALL clearArrows() throw(::com::sun::star::uno::RuntimeException); 1169*cdf0e10cSrcweir 1170*cdf0e10cSrcweir // XSheetOutline 1171*cdf0e10cSrcweir virtual void SAL_CALL group( const ::com::sun::star::table::CellRangeAddress& aRange, 1172*cdf0e10cSrcweir ::com::sun::star::table::TableOrientation nOrientation ) 1173*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1174*cdf0e10cSrcweir virtual void SAL_CALL ungroup( const ::com::sun::star::table::CellRangeAddress& aRange, 1175*cdf0e10cSrcweir ::com::sun::star::table::TableOrientation nOrientation ) 1176*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1177*cdf0e10cSrcweir virtual void SAL_CALL autoOutline( const ::com::sun::star::table::CellRangeAddress& aRange ) 1178*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1179*cdf0e10cSrcweir virtual void SAL_CALL clearOutline() throw(::com::sun::star::uno::RuntimeException); 1180*cdf0e10cSrcweir virtual void SAL_CALL hideDetail( const ::com::sun::star::table::CellRangeAddress& aRange ) 1181*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1182*cdf0e10cSrcweir virtual void SAL_CALL showDetail( const ::com::sun::star::table::CellRangeAddress& aRange ) 1183*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1184*cdf0e10cSrcweir virtual void SAL_CALL showLevel( sal_Int16 nLevel, 1185*cdf0e10cSrcweir ::com::sun::star::table::TableOrientation nOrientation ) 1186*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1187*cdf0e10cSrcweir 1188*cdf0e10cSrcweir // XProtectable 1189*cdf0e10cSrcweir virtual void SAL_CALL protect( const ::rtl::OUString& aPassword ) 1190*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1191*cdf0e10cSrcweir virtual void SAL_CALL unprotect( const ::rtl::OUString& aPassword ) 1192*cdf0e10cSrcweir throw(::com::sun::star::lang::IllegalArgumentException, 1193*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 1194*cdf0e10cSrcweir virtual sal_Bool SAL_CALL isProtected() throw(::com::sun::star::uno::RuntimeException); 1195*cdf0e10cSrcweir 1196*cdf0e10cSrcweir // XScenario 1197*cdf0e10cSrcweir virtual sal_Bool SAL_CALL getIsScenario() throw(::com::sun::star::uno::RuntimeException); 1198*cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getScenarioComment() throw(::com::sun::star::uno::RuntimeException); 1199*cdf0e10cSrcweir virtual void SAL_CALL setScenarioComment( const ::rtl::OUString& aScenarioComment ) 1200*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1201*cdf0e10cSrcweir virtual void SAL_CALL addRanges( const ::com::sun::star::uno::Sequence< 1202*cdf0e10cSrcweir ::com::sun::star::table::CellRangeAddress >& aRanges ) 1203*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1204*cdf0e10cSrcweir virtual void SAL_CALL apply() throw(::com::sun::star::uno::RuntimeException); 1205*cdf0e10cSrcweir // XScenarioEnhanced 1206*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::com::sun::star::table::CellRangeAddress > SAL_CALL 1207*cdf0e10cSrcweir getRanges( ) 1208*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1209*cdf0e10cSrcweir 1210*cdf0e10cSrcweir // XExternalSheetName 1211*cdf0e10cSrcweir virtual void SAL_CALL setExternalName( const ::rtl::OUString& aUrl, const ::rtl::OUString& aSheetName ) 1212*cdf0e10cSrcweir throw (::com::sun::star::container::ElementExistException, 1213*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 1214*cdf0e10cSrcweir 1215*cdf0e10cSrcweir // XEventsSupplier 1216*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > SAL_CALL getEvents() 1217*cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 1218*cdf0e10cSrcweir 1219*cdf0e10cSrcweir // XPropertySet ueberladen wegen Sheet-Properties 1220*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > 1221*cdf0e10cSrcweir SAL_CALL getPropertySetInfo() 1222*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1223*cdf0e10cSrcweir 1224*cdf0e10cSrcweir // XServiceInfo 1225*cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getImplementationName() 1226*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1227*cdf0e10cSrcweir virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) 1228*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1229*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() 1230*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1231*cdf0e10cSrcweir 1232*cdf0e10cSrcweir // XUnoTunnel 1233*cdf0e10cSrcweir virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< 1234*cdf0e10cSrcweir sal_Int8 >& aIdentifier ) 1235*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1236*cdf0e10cSrcweir 1237*cdf0e10cSrcweir static const com::sun::star::uno::Sequence<sal_Int8>& getUnoTunnelId(); 1238*cdf0e10cSrcweir static ScTableSheetObj* getImplementation( const com::sun::star::uno::Reference< 1239*cdf0e10cSrcweir com::sun::star::uno::XInterface> xObj ); 1240*cdf0e10cSrcweir 1241*cdf0e10cSrcweir // XTypeProvider 1242*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() 1243*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1244*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() 1245*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1246*cdf0e10cSrcweir }; 1247*cdf0e10cSrcweir 1248*cdf0e10cSrcweir 1249*cdf0e10cSrcweir class ScTableColumnObj : public ScCellRangeObj, 1250*cdf0e10cSrcweir public com::sun::star::container::XNamed 1251*cdf0e10cSrcweir { 1252*cdf0e10cSrcweir private: 1253*cdf0e10cSrcweir const SfxItemPropertySet* pColPropSet; 1254*cdf0e10cSrcweir 1255*cdf0e10cSrcweir protected: 1256*cdf0e10cSrcweir virtual const SfxItemPropertyMap* GetItemPropertyMap(); 1257*cdf0e10cSrcweir virtual void GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry, 1258*cdf0e10cSrcweir ::com::sun::star::uno::Any& ) 1259*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1260*cdf0e10cSrcweir virtual void SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry, 1261*cdf0e10cSrcweir const ::com::sun::star::uno::Any& aValue ) 1262*cdf0e10cSrcweir throw(::com::sun::star::lang::IllegalArgumentException, 1263*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 1264*cdf0e10cSrcweir 1265*cdf0e10cSrcweir public: 1266*cdf0e10cSrcweir ScTableColumnObj(ScDocShell* pDocSh, SCCOL nCol, SCTAB nTab); 1267*cdf0e10cSrcweir virtual ~ScTableColumnObj(); 1268*cdf0e10cSrcweir 1269*cdf0e10cSrcweir virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( 1270*cdf0e10cSrcweir const ::com::sun::star::uno::Type & rType ) 1271*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1272*cdf0e10cSrcweir virtual void SAL_CALL acquire() throw(); 1273*cdf0e10cSrcweir virtual void SAL_CALL release() throw(); 1274*cdf0e10cSrcweir 1275*cdf0e10cSrcweir // XNamed 1276*cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getName() throw(::com::sun::star::uno::RuntimeException); 1277*cdf0e10cSrcweir virtual void SAL_CALL setName( const ::rtl::OUString& aName ) 1278*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1279*cdf0e10cSrcweir 1280*cdf0e10cSrcweir // XPropertySet ueberladen wegen Spalten-Properties 1281*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > 1282*cdf0e10cSrcweir SAL_CALL getPropertySetInfo() 1283*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1284*cdf0e10cSrcweir 1285*cdf0e10cSrcweir // XServiceInfo 1286*cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getImplementationName() 1287*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1288*cdf0e10cSrcweir virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) 1289*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1290*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() 1291*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1292*cdf0e10cSrcweir 1293*cdf0e10cSrcweir // XTypeProvider 1294*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() 1295*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1296*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() 1297*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1298*cdf0e10cSrcweir }; 1299*cdf0e10cSrcweir 1300*cdf0e10cSrcweir 1301*cdf0e10cSrcweir class ScTableRowObj : public ScCellRangeObj 1302*cdf0e10cSrcweir { 1303*cdf0e10cSrcweir private: 1304*cdf0e10cSrcweir const SfxItemPropertySet* pRowPropSet; 1305*cdf0e10cSrcweir 1306*cdf0e10cSrcweir protected: 1307*cdf0e10cSrcweir virtual const SfxItemPropertyMap* GetItemPropertyMap(); 1308*cdf0e10cSrcweir virtual void GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry, 1309*cdf0e10cSrcweir ::com::sun::star::uno::Any& ) 1310*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1311*cdf0e10cSrcweir virtual void SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry, 1312*cdf0e10cSrcweir const ::com::sun::star::uno::Any& aValue ) 1313*cdf0e10cSrcweir throw(::com::sun::star::lang::IllegalArgumentException, 1314*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 1315*cdf0e10cSrcweir 1316*cdf0e10cSrcweir public: 1317*cdf0e10cSrcweir ScTableRowObj(ScDocShell* pDocSh, SCROW nRow, SCTAB nTab); 1318*cdf0e10cSrcweir virtual ~ScTableRowObj(); 1319*cdf0e10cSrcweir 1320*cdf0e10cSrcweir // XPropertySet ueberladen wegen Zeilen-Properties 1321*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > 1322*cdf0e10cSrcweir SAL_CALL getPropertySetInfo() 1323*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1324*cdf0e10cSrcweir 1325*cdf0e10cSrcweir // XServiceInfo 1326*cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getImplementationName() 1327*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1328*cdf0e10cSrcweir virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) 1329*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1330*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() 1331*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1332*cdf0e10cSrcweir }; 1333*cdf0e10cSrcweir 1334*cdf0e10cSrcweir 1335*cdf0e10cSrcweir class ScCellsObj : public cppu::WeakImplHelper2< 1336*cdf0e10cSrcweir com::sun::star::container::XEnumerationAccess, 1337*cdf0e10cSrcweir com::sun::star::lang::XServiceInfo >, 1338*cdf0e10cSrcweir public SfxListener 1339*cdf0e10cSrcweir { 1340*cdf0e10cSrcweir private: 1341*cdf0e10cSrcweir ScDocShell* pDocShell; 1342*cdf0e10cSrcweir ScRangeList aRanges; 1343*cdf0e10cSrcweir 1344*cdf0e10cSrcweir public: 1345*cdf0e10cSrcweir ScCellsObj(ScDocShell* pDocSh, const ScRangeList& rR); 1346*cdf0e10cSrcweir virtual ~ScCellsObj(); 1347*cdf0e10cSrcweir 1348*cdf0e10cSrcweir virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); 1349*cdf0e10cSrcweir 1350*cdf0e10cSrcweir // XEnumerationAccess 1351*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL 1352*cdf0e10cSrcweir createEnumeration() throw(::com::sun::star::uno::RuntimeException); 1353*cdf0e10cSrcweir 1354*cdf0e10cSrcweir // XElementAccess 1355*cdf0e10cSrcweir virtual ::com::sun::star::uno::Type SAL_CALL getElementType() 1356*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1357*cdf0e10cSrcweir virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException); 1358*cdf0e10cSrcweir 1359*cdf0e10cSrcweir // XServiceInfo 1360*cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getImplementationName() 1361*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1362*cdf0e10cSrcweir virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) 1363*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1364*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() 1365*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1366*cdf0e10cSrcweir }; 1367*cdf0e10cSrcweir 1368*cdf0e10cSrcweir 1369*cdf0e10cSrcweir class ScCellsEnumeration : public cppu::WeakImplHelper2< 1370*cdf0e10cSrcweir com::sun::star::container::XEnumeration, 1371*cdf0e10cSrcweir com::sun::star::lang::XServiceInfo >, 1372*cdf0e10cSrcweir public SfxListener 1373*cdf0e10cSrcweir { 1374*cdf0e10cSrcweir private: 1375*cdf0e10cSrcweir ScDocShell* pDocShell; 1376*cdf0e10cSrcweir ScRangeList aRanges; 1377*cdf0e10cSrcweir ScAddress aPos; 1378*cdf0e10cSrcweir ScMarkData* pMark; 1379*cdf0e10cSrcweir sal_Bool bAtEnd; 1380*cdf0e10cSrcweir 1381*cdf0e10cSrcweir private: 1382*cdf0e10cSrcweir void Advance_Impl(); 1383*cdf0e10cSrcweir void CheckPos_Impl(); 1384*cdf0e10cSrcweir 1385*cdf0e10cSrcweir public: 1386*cdf0e10cSrcweir ScCellsEnumeration(ScDocShell* pDocSh, const ScRangeList& rR); 1387*cdf0e10cSrcweir virtual ~ScCellsEnumeration(); 1388*cdf0e10cSrcweir 1389*cdf0e10cSrcweir virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); 1390*cdf0e10cSrcweir 1391*cdf0e10cSrcweir // XEnumeration 1392*cdf0e10cSrcweir virtual sal_Bool SAL_CALL hasMoreElements() throw(::com::sun::star::uno::RuntimeException); 1393*cdf0e10cSrcweir virtual ::com::sun::star::uno::Any SAL_CALL nextElement() 1394*cdf0e10cSrcweir throw(::com::sun::star::container::NoSuchElementException, 1395*cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 1396*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 1397*cdf0e10cSrcweir 1398*cdf0e10cSrcweir // XServiceInfo 1399*cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getImplementationName() 1400*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1401*cdf0e10cSrcweir virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) 1402*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1403*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() 1404*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1405*cdf0e10cSrcweir }; 1406*cdf0e10cSrcweir 1407*cdf0e10cSrcweir class ScCellFormatsObj : public cppu::WeakImplHelper3< 1408*cdf0e10cSrcweir com::sun::star::container::XIndexAccess, 1409*cdf0e10cSrcweir com::sun::star::container::XEnumerationAccess, 1410*cdf0e10cSrcweir com::sun::star::lang::XServiceInfo >, 1411*cdf0e10cSrcweir public SfxListener 1412*cdf0e10cSrcweir { 1413*cdf0e10cSrcweir private: 1414*cdf0e10cSrcweir ScDocShell* pDocShell; 1415*cdf0e10cSrcweir ScRange aTotalRange; 1416*cdf0e10cSrcweir 1417*cdf0e10cSrcweir private: 1418*cdf0e10cSrcweir ScCellRangeObj* GetObjectByIndex_Impl(long nIndex) const; 1419*cdf0e10cSrcweir 1420*cdf0e10cSrcweir public: 1421*cdf0e10cSrcweir ScCellFormatsObj(ScDocShell* pDocSh, const ScRange& rR); 1422*cdf0e10cSrcweir virtual ~ScCellFormatsObj(); 1423*cdf0e10cSrcweir 1424*cdf0e10cSrcweir virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); 1425*cdf0e10cSrcweir 1426*cdf0e10cSrcweir // XIndexAccess 1427*cdf0e10cSrcweir virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException); 1428*cdf0e10cSrcweir virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) 1429*cdf0e10cSrcweir throw(::com::sun::star::lang::IndexOutOfBoundsException, 1430*cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 1431*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 1432*cdf0e10cSrcweir 1433*cdf0e10cSrcweir // XEnumerationAccess 1434*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL 1435*cdf0e10cSrcweir createEnumeration() throw(::com::sun::star::uno::RuntimeException); 1436*cdf0e10cSrcweir 1437*cdf0e10cSrcweir // XElementAccess 1438*cdf0e10cSrcweir virtual ::com::sun::star::uno::Type SAL_CALL getElementType() 1439*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1440*cdf0e10cSrcweir virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException); 1441*cdf0e10cSrcweir 1442*cdf0e10cSrcweir // XServiceInfo 1443*cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getImplementationName() 1444*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1445*cdf0e10cSrcweir virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) 1446*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1447*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() 1448*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1449*cdf0e10cSrcweir }; 1450*cdf0e10cSrcweir 1451*cdf0e10cSrcweir 1452*cdf0e10cSrcweir class ScCellFormatsEnumeration : public cppu::WeakImplHelper2< 1453*cdf0e10cSrcweir com::sun::star::container::XEnumeration, 1454*cdf0e10cSrcweir com::sun::star::lang::XServiceInfo >, 1455*cdf0e10cSrcweir public SfxListener 1456*cdf0e10cSrcweir { 1457*cdf0e10cSrcweir private: 1458*cdf0e10cSrcweir ScDocShell* pDocShell; 1459*cdf0e10cSrcweir SCTAB nTab; 1460*cdf0e10cSrcweir ScAttrRectIterator* pIter; 1461*cdf0e10cSrcweir ScRange aNext; 1462*cdf0e10cSrcweir sal_Bool bAtEnd; 1463*cdf0e10cSrcweir sal_Bool bDirty; 1464*cdf0e10cSrcweir 1465*cdf0e10cSrcweir private: 1466*cdf0e10cSrcweir void Advance_Impl(); 1467*cdf0e10cSrcweir ScCellRangeObj* NextObject_Impl(); 1468*cdf0e10cSrcweir 1469*cdf0e10cSrcweir public: 1470*cdf0e10cSrcweir ScCellFormatsEnumeration(ScDocShell* pDocSh, const ScRange& rR); 1471*cdf0e10cSrcweir virtual ~ScCellFormatsEnumeration(); 1472*cdf0e10cSrcweir 1473*cdf0e10cSrcweir virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); 1474*cdf0e10cSrcweir 1475*cdf0e10cSrcweir // XEnumeration 1476*cdf0e10cSrcweir virtual sal_Bool SAL_CALL hasMoreElements() throw(::com::sun::star::uno::RuntimeException); 1477*cdf0e10cSrcweir virtual ::com::sun::star::uno::Any SAL_CALL nextElement() 1478*cdf0e10cSrcweir throw(::com::sun::star::container::NoSuchElementException, 1479*cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 1480*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 1481*cdf0e10cSrcweir 1482*cdf0e10cSrcweir // XServiceInfo 1483*cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getImplementationName() 1484*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1485*cdf0e10cSrcweir virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) 1486*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1487*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() 1488*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1489*cdf0e10cSrcweir }; 1490*cdf0e10cSrcweir 1491*cdf0e10cSrcweir typedef std::vector< ScRangeList > ScMyRangeLists; 1492*cdf0e10cSrcweir 1493*cdf0e10cSrcweir class ScUniqueCellFormatsObj : public cppu::WeakImplHelper3< 1494*cdf0e10cSrcweir com::sun::star::container::XIndexAccess, 1495*cdf0e10cSrcweir com::sun::star::container::XEnumerationAccess, 1496*cdf0e10cSrcweir com::sun::star::lang::XServiceInfo >, 1497*cdf0e10cSrcweir public SfxListener 1498*cdf0e10cSrcweir { 1499*cdf0e10cSrcweir private: 1500*cdf0e10cSrcweir ScDocShell* pDocShell; 1501*cdf0e10cSrcweir ScRange aTotalRange; 1502*cdf0e10cSrcweir ScMyRangeLists aRangeLists; 1503*cdf0e10cSrcweir 1504*cdf0e10cSrcweir private: 1505*cdf0e10cSrcweir void GetObjects_Impl(); 1506*cdf0e10cSrcweir 1507*cdf0e10cSrcweir public: 1508*cdf0e10cSrcweir ScUniqueCellFormatsObj(ScDocShell* pDocSh, const ScRange& rR); 1509*cdf0e10cSrcweir virtual ~ScUniqueCellFormatsObj(); 1510*cdf0e10cSrcweir 1511*cdf0e10cSrcweir virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); 1512*cdf0e10cSrcweir 1513*cdf0e10cSrcweir // XIndexAccess 1514*cdf0e10cSrcweir virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException); 1515*cdf0e10cSrcweir virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) 1516*cdf0e10cSrcweir throw(::com::sun::star::lang::IndexOutOfBoundsException, 1517*cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 1518*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 1519*cdf0e10cSrcweir 1520*cdf0e10cSrcweir // XEnumerationAccess 1521*cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL 1522*cdf0e10cSrcweir createEnumeration() throw(::com::sun::star::uno::RuntimeException); 1523*cdf0e10cSrcweir 1524*cdf0e10cSrcweir // XElementAccess 1525*cdf0e10cSrcweir virtual ::com::sun::star::uno::Type SAL_CALL getElementType() 1526*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1527*cdf0e10cSrcweir virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException); 1528*cdf0e10cSrcweir 1529*cdf0e10cSrcweir // XServiceInfo 1530*cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getImplementationName() 1531*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1532*cdf0e10cSrcweir virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) 1533*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1534*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() 1535*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1536*cdf0e10cSrcweir }; 1537*cdf0e10cSrcweir 1538*cdf0e10cSrcweir class ScUniqueCellFormatsEnumeration : public cppu::WeakImplHelper2< 1539*cdf0e10cSrcweir com::sun::star::container::XEnumeration, 1540*cdf0e10cSrcweir com::sun::star::lang::XServiceInfo >, 1541*cdf0e10cSrcweir public SfxListener 1542*cdf0e10cSrcweir { 1543*cdf0e10cSrcweir private: 1544*cdf0e10cSrcweir ScMyRangeLists aRangeLists; 1545*cdf0e10cSrcweir ScDocShell* pDocShell; 1546*cdf0e10cSrcweir sal_Int32 nCurrentPosition; 1547*cdf0e10cSrcweir 1548*cdf0e10cSrcweir public: 1549*cdf0e10cSrcweir ScUniqueCellFormatsEnumeration(ScDocShell* pDocShell, const ScMyRangeLists& rRangeLists); 1550*cdf0e10cSrcweir virtual ~ScUniqueCellFormatsEnumeration(); 1551*cdf0e10cSrcweir 1552*cdf0e10cSrcweir virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); 1553*cdf0e10cSrcweir 1554*cdf0e10cSrcweir // XEnumeration 1555*cdf0e10cSrcweir virtual sal_Bool SAL_CALL hasMoreElements() throw(::com::sun::star::uno::RuntimeException); 1556*cdf0e10cSrcweir virtual ::com::sun::star::uno::Any SAL_CALL nextElement() 1557*cdf0e10cSrcweir throw(::com::sun::star::container::NoSuchElementException, 1558*cdf0e10cSrcweir ::com::sun::star::lang::WrappedTargetException, 1559*cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException); 1560*cdf0e10cSrcweir 1561*cdf0e10cSrcweir // XServiceInfo 1562*cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getImplementationName() 1563*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1564*cdf0e10cSrcweir virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) 1565*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1566*cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() 1567*cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 1568*cdf0e10cSrcweir }; 1569*cdf0e10cSrcweir 1570*cdf0e10cSrcweir 1571*cdf0e10cSrcweir #endif 1572*cdf0e10cSrcweir 1573