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 #ifndef SC_VBA_RANGE_HXX 28*cdf0e10cSrcweir #define SC_VBA_RANGE_HXX 29*cdf0e10cSrcweir 30*cdf0e10cSrcweir #include <cppuhelper/implbase4.hxx> 31*cdf0e10cSrcweir #include <com/sun/star/container/XEnumerationAccess.hpp> 32*cdf0e10cSrcweir 33*cdf0e10cSrcweir #include <ooo/vba/excel/XRange.hpp> 34*cdf0e10cSrcweir #include <com/sun/star/table/XCellRange.hpp> 35*cdf0e10cSrcweir #include <ooo/vba/excel/XFont.hpp> 36*cdf0e10cSrcweir #include <ooo/vba/excel/XComment.hpp> 37*cdf0e10cSrcweir #include <ooo/vba/XCollection.hpp> 38*cdf0e10cSrcweir #include <ooo/vba/excel/XlPasteType.hdl> 39*cdf0e10cSrcweir #include <ooo/vba/excel/XlPasteSpecialOperation.hdl> 40*cdf0e10cSrcweir 41*cdf0e10cSrcweir #include <comphelper/proparrhlp.hxx> 42*cdf0e10cSrcweir #include <comphelper/propertycontainer.hxx> 43*cdf0e10cSrcweir #include <com/sun/star/beans/XPropertySet.hpp> 44*cdf0e10cSrcweir #include <com/sun/star/beans/PropertyAttribute.hpp> 45*cdf0e10cSrcweir #include <com/sun/star/script/XDefaultMethod.hpp> 46*cdf0e10cSrcweir #include <com/sun/star/script/XDefaultProperty.hpp> 47*cdf0e10cSrcweir #include <com/sun/star/sheet/FillDateMode.hpp> 48*cdf0e10cSrcweir #include <com/sun/star/sheet/FillMode.hpp> 49*cdf0e10cSrcweir #include <com/sun/star/sheet/FillDirection.hpp> 50*cdf0e10cSrcweir #include <com/sun/star/sheet/XSpreadsheet.hpp> 51*cdf0e10cSrcweir #include <com/sun/star/sheet/XSheetCellRangeContainer.hpp> 52*cdf0e10cSrcweir 53*cdf0e10cSrcweir //#include <vbahelper/vbahelperinterface.hxx> 54*cdf0e10cSrcweir #include "vbaformat.hxx" 55*cdf0e10cSrcweir #include <formula/grammar.hxx> 56*cdf0e10cSrcweir 57*cdf0e10cSrcweir class ScTableSheetsObj; 58*cdf0e10cSrcweir class ScCellRangesBase; 59*cdf0e10cSrcweir class ScCellRangeObj; 60*cdf0e10cSrcweir class ScCellRangesObj; 61*cdf0e10cSrcweir class ScDocShell; 62*cdf0e10cSrcweir class ScDocument; 63*cdf0e10cSrcweir class ScRangeList; 64*cdf0e10cSrcweir 65*cdf0e10cSrcweir //typedef InheritedHelperInterfaceImpl1< ov::excel::XRange > ScVbaRange_BASE; 66*cdf0e10cSrcweir typedef ScVbaFormat< ov::excel::XRange > ScVbaRange_BASE; 67*cdf0e10cSrcweir 68*cdf0e10cSrcweir class ArrayVisitor 69*cdf0e10cSrcweir { 70*cdf0e10cSrcweir public: 71*cdf0e10cSrcweir virtual void visitNode( sal_Int32 x, sal_Int32 y, const css::uno::Reference< css::table::XCell >& xCell ) = 0; 72*cdf0e10cSrcweir virtual ~ArrayVisitor(){} 73*cdf0e10cSrcweir }; 74*cdf0e10cSrcweir 75*cdf0e10cSrcweir class ValueSetter : public ArrayVisitor 76*cdf0e10cSrcweir { 77*cdf0e10cSrcweir public: 78*cdf0e10cSrcweir virtual bool processValue( const css::uno::Any& aValue, const css::uno::Reference< css::table::XCell >& xCell ) = 0; 79*cdf0e10cSrcweir 80*cdf0e10cSrcweir 81*cdf0e10cSrcweir }; 82*cdf0e10cSrcweir 83*cdf0e10cSrcweir class ValueGetter : public ArrayVisitor 84*cdf0e10cSrcweir { 85*cdf0e10cSrcweir 86*cdf0e10cSrcweir public: 87*cdf0e10cSrcweir virtual void processValue( sal_Int32 x, sal_Int32 y, const css::uno::Any& aValue ) = 0; 88*cdf0e10cSrcweir virtual const css::uno::Any& getValue() const = 0; 89*cdf0e10cSrcweir }; 90*cdf0e10cSrcweir 91*cdf0e10cSrcweir 92*cdf0e10cSrcweir 93*cdf0e10cSrcweir class ScVbaRange : public ScVbaRange_BASE 94*cdf0e10cSrcweir { 95*cdf0e10cSrcweir css::uno::Reference< ov::XCollection > m_Areas; 96*cdf0e10cSrcweir css::uno::Reference< ov::XCollection > m_Borders; 97*cdf0e10cSrcweir css::uno::Reference< css::table::XCellRange > mxRange; 98*cdf0e10cSrcweir css::uno::Reference< css::sheet::XSheetCellRangeContainer > mxRanges; 99*cdf0e10cSrcweir sal_Bool mbIsRows; 100*cdf0e10cSrcweir sal_Bool mbIsColumns; 101*cdf0e10cSrcweir css::uno::Reference< ov::excel::XValidation > m_xValidation; 102*cdf0e10cSrcweir 103*cdf0e10cSrcweir double getCalcColWidth( const css::table::CellRangeAddress& ) throw (css::uno::RuntimeException); 104*cdf0e10cSrcweir double getCalcRowHeight( const css::table::CellRangeAddress& ) throw (css::uno::RuntimeException); 105*cdf0e10cSrcweir void visitArray( ArrayVisitor& vistor ); 106*cdf0e10cSrcweir 107*cdf0e10cSrcweir css::uno::Reference< ov::excel::XRange > getEntireColumnOrRow( bool bColumn = true ) throw( css::uno::RuntimeException ); 108*cdf0e10cSrcweir 109*cdf0e10cSrcweir void fillSeries( css::sheet::FillDirection nFillDirection, css::sheet::FillMode nFillMode, css::sheet::FillDateMode nFillDateMode, double fStep, double fEndValue ) throw( css::uno::RuntimeException ); 110*cdf0e10cSrcweir 111*cdf0e10cSrcweir void ClearContents( sal_Int32 nFlags, bool bFireEvent ) throw (css::uno::RuntimeException); 112*cdf0e10cSrcweir 113*cdf0e10cSrcweir css::uno::Any getValue( ValueGetter& rValueGetter ) throw (css::uno::RuntimeException); 114*cdf0e10cSrcweir void setValue( const css::uno::Any& aValue, ValueSetter& setter, bool bFireEvent ) throw ( css::uno::RuntimeException); 115*cdf0e10cSrcweir 116*cdf0e10cSrcweir css::uno::Any getFormulaValue( formula::FormulaGrammar::Grammar ) throw (css::uno::RuntimeException); 117*cdf0e10cSrcweir void setFormulaValue( const css::uno::Any& aValue, formula::FormulaGrammar::Grammar, bool bFireEvent ) throw ( css::uno::RuntimeException); 118*cdf0e10cSrcweir 119*cdf0e10cSrcweir css::uno::Reference< ov::excel::XRange > getArea( sal_Int32 nIndex ) throw( css::uno::RuntimeException ); 120*cdf0e10cSrcweir ScCellRangeObj* getCellRangeObj( ) throw ( css::uno::RuntimeException ); 121*cdf0e10cSrcweir ScCellRangesObj* getCellRangesObj() throw ( css::uno::RuntimeException ); 122*cdf0e10cSrcweir css::uno::Reference< ov::XCollection >& getBorders(); 123*cdf0e10cSrcweir void groupUnGroup( bool bUnGroup = false ) throw ( css::script::BasicErrorException, css::uno::RuntimeException ); 124*cdf0e10cSrcweir css::uno::Reference< ov::excel::XRange > PreviousNext( bool bIsPrevious ); 125*cdf0e10cSrcweir css::uno::Reference< ov::excel::XRange > SpecialCellsImpl( sal_Int32 nType, const css::uno::Any& _oValue) throw ( css::script::BasicErrorException ); 126*cdf0e10cSrcweir css::awt::Point getPosition() throw ( css::uno::RuntimeException ); 127*cdf0e10cSrcweir 128*cdf0e10cSrcweir /** Fires a Worksheet_Change event for this range or range list. */ 129*cdf0e10cSrcweir void fireChangeEvent(); 130*cdf0e10cSrcweir 131*cdf0e10cSrcweir protected: 132*cdf0e10cSrcweir virtual ScCellRangesBase* getCellRangesBase() throw ( css::uno::RuntimeException ); 133*cdf0e10cSrcweir virtual SfxItemSet* getCurrentDataSet( ) throw ( css::uno::RuntimeException ); 134*cdf0e10cSrcweir public: 135*cdf0e10cSrcweir ScVbaRange( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::table::XCellRange >& xRange, sal_Bool bIsRows = false, sal_Bool bIsColumns = false ) throw ( css::lang::IllegalArgumentException ); 136*cdf0e10cSrcweir ScVbaRange( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::sheet::XSheetCellRangeContainer >& xRanges, sal_Bool bIsRows = false, sal_Bool bIsColumns = false ) throw ( css::lang::IllegalArgumentException ); 137*cdf0e10cSrcweir ScVbaRange( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext >const& xContext ) throw ( css::lang::IllegalArgumentException ); 138*cdf0e10cSrcweir 139*cdf0e10cSrcweir ScDocument* getScDocument() throw (css::uno::RuntimeException); 140*cdf0e10cSrcweir ScDocShell* getScDocShell() throw (css::uno::RuntimeException); 141*cdf0e10cSrcweir 142*cdf0e10cSrcweir /** Returns the ScVbaRange implementation object for the passed VBA Range object. */ 143*cdf0e10cSrcweir static ScVbaRange* getImplementation( const css::uno::Reference< ov::excel::XRange >& rxRange ); 144*cdf0e10cSrcweir 145*cdf0e10cSrcweir css::uno::Reference< css::frame::XModel > getUnoModel() throw (css::uno::RuntimeException); 146*cdf0e10cSrcweir static css::uno::Reference< css::frame::XModel > getUnoModel( const css::uno::Reference< ov::excel::XRange >& rxRange ) throw (css::uno::RuntimeException); 147*cdf0e10cSrcweir 148*cdf0e10cSrcweir const ScRangeList& getScRangeList() throw (css::uno::RuntimeException); 149*cdf0e10cSrcweir static const ScRangeList& getScRangeList( const css::uno::Reference< ov::excel::XRange >& rxRange ) throw (css::uno::RuntimeException); 150*cdf0e10cSrcweir 151*cdf0e10cSrcweir virtual ~ScVbaRange(); 152*cdf0e10cSrcweir virtual css::uno::Reference< ov::XHelperInterface > thisHelperIface() { return this; } 153*cdf0e10cSrcweir bool isSingleCellRange(); 154*cdf0e10cSrcweir 155*cdf0e10cSrcweir static css::uno::Reference< ov::excel::XRange > getRangeObjectForName( 156*cdf0e10cSrcweir const css::uno::Reference< css::uno::XComponentContext >& xContext, 157*cdf0e10cSrcweir const rtl::OUString& sRangeName, ScDocShell* pDocSh, 158*cdf0e10cSrcweir formula::FormulaGrammar::AddressConvention eConv = formula::FormulaGrammar::CONV_XL_A1 ) throw ( css::uno::RuntimeException ); 159*cdf0e10cSrcweir 160*cdf0e10cSrcweir static css::uno::Reference< ov::excel::XRange > CellsHelper( 161*cdf0e10cSrcweir const css::uno::Reference< ov::XHelperInterface >& xParent, 162*cdf0e10cSrcweir const css::uno::Reference< css::uno::XComponentContext >& xContext, 163*cdf0e10cSrcweir const css::uno::Reference< css::table::XCellRange >& xRange, 164*cdf0e10cSrcweir const css::uno::Any &nRowIndex, const css::uno::Any &nColumnIndex ) throw(css::uno::RuntimeException); 165*cdf0e10cSrcweir 166*cdf0e10cSrcweir // Attributes 167*cdf0e10cSrcweir virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException); 168*cdf0e10cSrcweir virtual void SAL_CALL setValue( const css::uno::Any& aValue ) throw ( css::uno::RuntimeException); 169*cdf0e10cSrcweir virtual css::uno::Any SAL_CALL getFormula() throw (css::uno::RuntimeException); 170*cdf0e10cSrcweir virtual void SAL_CALL setFormula( const css::uno::Any& rFormula ) throw (css::uno::RuntimeException); 171*cdf0e10cSrcweir virtual css::uno::Any SAL_CALL getFormulaArray() throw (css::uno::RuntimeException); 172*cdf0e10cSrcweir virtual void SAL_CALL setFormulaArray(const css::uno::Any& rFormula) throw (css::uno::RuntimeException); 173*cdf0e10cSrcweir virtual css::uno::Any SAL_CALL getFormulaR1C1() throw (css::uno::RuntimeException); 174*cdf0e10cSrcweir virtual void SAL_CALL setFormulaR1C1( const css::uno::Any &rFormula ) throw (css::uno::RuntimeException); 175*cdf0e10cSrcweir virtual ::sal_Int32 SAL_CALL getCount() throw (css::uno::RuntimeException); 176*cdf0e10cSrcweir virtual ::sal_Int32 SAL_CALL getRow() throw (css::uno::RuntimeException); 177*cdf0e10cSrcweir virtual ::sal_Int32 SAL_CALL getColumn() throw (css::uno::RuntimeException); 178*cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getText() throw (css::uno::RuntimeException); 179*cdf0e10cSrcweir using ScVbaRange_BASE::setNumberFormat; 180*cdf0e10cSrcweir virtual void SAL_CALL setNumberFormat( const css::uno::Any& rNumberFormat ) throw ( css::script::BasicErrorException, css::uno::RuntimeException); 181*cdf0e10cSrcweir virtual css::uno::Any SAL_CALL getNumberFormat() throw (css::script::BasicErrorException, css::uno::RuntimeException); 182*cdf0e10cSrcweir virtual void SAL_CALL setMergeCells( const css::uno::Any& bMerge ) throw (css::script::BasicErrorException, css::uno::RuntimeException); 183*cdf0e10cSrcweir virtual css::uno::Any SAL_CALL getMergeCells() throw (css::script::BasicErrorException, css::uno::RuntimeException); 184*cdf0e10cSrcweir virtual void SAL_CALL setWrapText( const css::uno::Any& bIsWrapped ) throw (css::script::BasicErrorException, css::uno::RuntimeException); 185*cdf0e10cSrcweir virtual css::uno::Any SAL_CALL getWrapText() throw (css::script::BasicErrorException, css::uno::RuntimeException); 186*cdf0e10cSrcweir virtual css::uno::Reference< ov::excel::XRange > SAL_CALL getEntireRow() throw (css::uno::RuntimeException); 187*cdf0e10cSrcweir virtual css::uno::Reference< ov::excel::XRange > SAL_CALL getEntireColumn() throw (css::uno::RuntimeException); 188*cdf0e10cSrcweir virtual css::uno::Reference< ov::excel::XComment > SAL_CALL getComment() throw (css::uno::RuntimeException); 189*cdf0e10cSrcweir virtual css::uno::Any SAL_CALL getHidden() throw (css::uno::RuntimeException); 190*cdf0e10cSrcweir virtual void SAL_CALL setHidden( const css::uno::Any& _hidden ) throw (css::uno::RuntimeException); 191*cdf0e10cSrcweir virtual css::uno::Any SAL_CALL getColumnWidth() throw (css::uno::RuntimeException); 192*cdf0e10cSrcweir virtual void SAL_CALL setColumnWidth( const css::uno::Any& _columnwidth ) throw (css::uno::RuntimeException); 193*cdf0e10cSrcweir virtual css::uno::Any SAL_CALL getRowHeight() throw (css::uno::RuntimeException); 194*cdf0e10cSrcweir virtual void SAL_CALL setRowHeight( const css::uno::Any& _rowheight ) throw (css::uno::RuntimeException); 195*cdf0e10cSrcweir virtual css::uno::Any SAL_CALL getWidth() throw (css::uno::RuntimeException); 196*cdf0e10cSrcweir virtual css::uno::Any SAL_CALL getHeight() throw (css::uno::RuntimeException); 197*cdf0e10cSrcweir virtual css::uno::Any SAL_CALL getTop() throw (css::uno::RuntimeException); 198*cdf0e10cSrcweir virtual css::uno::Any SAL_CALL getLeft() throw (css::uno::RuntimeException); 199*cdf0e10cSrcweir 200*cdf0e10cSrcweir virtual css::uno::Reference< ov::excel::XWorksheet > SAL_CALL getWorksheet() throw (css::uno::RuntimeException); 201*cdf0e10cSrcweir virtual css::uno::Any SAL_CALL getPageBreak() throw (css::uno::RuntimeException); 202*cdf0e10cSrcweir virtual void SAL_CALL setPageBreak( const css::uno::Any& _pagebreak ) throw (css::uno::RuntimeException); 203*cdf0e10cSrcweir virtual css::uno::Reference< ov::excel::XValidation > SAL_CALL getValidation() throw (css::uno::RuntimeException); 204*cdf0e10cSrcweir virtual css::uno::Any SAL_CALL getPrefixCharacter() throw (css::uno::RuntimeException); 205*cdf0e10cSrcweir virtual css::uno::Any SAL_CALL getShowDetail() throw (css::uno::RuntimeException); 206*cdf0e10cSrcweir virtual void SAL_CALL setShowDetail(const css::uno::Any& aShowDetail) throw (css::uno::RuntimeException); 207*cdf0e10cSrcweir // Methods 208*cdf0e10cSrcweir sal_Bool IsRows() { return mbIsRows; } 209*cdf0e10cSrcweir sal_Bool IsColumns() { return mbIsColumns; } 210*cdf0e10cSrcweir virtual css::uno::Reference< ov::excel::XComment > SAL_CALL AddComment( const css::uno::Any& Text ) throw (css::uno::RuntimeException); 211*cdf0e10cSrcweir virtual void SAL_CALL Clear() throw (css::uno::RuntimeException); 212*cdf0e10cSrcweir virtual void SAL_CALL ClearComments() throw (css::uno::RuntimeException); 213*cdf0e10cSrcweir virtual void SAL_CALL ClearContents() throw (css::uno::RuntimeException); 214*cdf0e10cSrcweir virtual void SAL_CALL ClearFormats() throw (css::uno::RuntimeException); 215*cdf0e10cSrcweir virtual css::uno::Any SAL_CALL HasFormula() throw (css::uno::RuntimeException); 216*cdf0e10cSrcweir virtual void SAL_CALL FillLeft() throw (css::uno::RuntimeException); 217*cdf0e10cSrcweir virtual void SAL_CALL FillRight() throw (css::uno::RuntimeException); 218*cdf0e10cSrcweir virtual void SAL_CALL FillUp() throw (css::uno::RuntimeException); 219*cdf0e10cSrcweir virtual void SAL_CALL FillDown() throw (css::uno::RuntimeException); 220*cdf0e10cSrcweir virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Offset( const css::uno::Any &nRowOffset, const css::uno::Any &nColOffset ) 221*cdf0e10cSrcweir throw (css::uno::RuntimeException); 222*cdf0e10cSrcweir virtual css::uno::Reference< ov::excel::XRange > SAL_CALL CurrentRegion() throw (css::uno::RuntimeException); 223*cdf0e10cSrcweir virtual css::uno::Reference< ov::excel::XRange > SAL_CALL CurrentArray() throw (css::uno::RuntimeException); 224*cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL Characters( const css::uno::Any& nIndex, const css::uno::Any& nCount ) 225*cdf0e10cSrcweir throw (css::uno::RuntimeException); 226*cdf0e10cSrcweir 227*cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL Address( const css::uno::Any& RowAbsolute, const css::uno::Any& ColumnAbsolute, const css::uno::Any& ReferenceStyle, const css::uno::Any& External, const css::uno::Any& RelativeTo ) throw (css::uno::RuntimeException); 228*cdf0e10cSrcweir 229*cdf0e10cSrcweir virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Cells( const css::uno::Any &nRow, const css::uno::Any &nCol ) 230*cdf0e10cSrcweir throw (css::uno::RuntimeException); 231*cdf0e10cSrcweir virtual void SAL_CALL Select() throw (css::uno::RuntimeException); 232*cdf0e10cSrcweir virtual void SAL_CALL Activate() throw (css::uno::RuntimeException); 233*cdf0e10cSrcweir virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Rows( const css::uno::Any& nIndex ) throw (css::uno::RuntimeException); 234*cdf0e10cSrcweir virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Columns( const css::uno::Any &nIndex ) throw (css::uno::RuntimeException); 235*cdf0e10cSrcweir virtual void SAL_CALL Copy( const css::uno::Any& Destination ) throw (css::uno::RuntimeException); 236*cdf0e10cSrcweir virtual void SAL_CALL Cut( const css::uno::Any& Destination ) throw (css::uno::RuntimeException); 237*cdf0e10cSrcweir virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Resize( const css::uno::Any& RowSize, const css::uno::Any& ColumnSize ) 238*cdf0e10cSrcweir throw (css::uno::RuntimeException); 239*cdf0e10cSrcweir virtual css::uno::Reference< ov::excel::XFont > SAL_CALL Font() throw ( css::script::BasicErrorException, css::uno::RuntimeException); 240*cdf0e10cSrcweir virtual css::uno::Reference< ov::excel::XInterior > SAL_CALL Interior( ) throw ( css::script::BasicErrorException, css::uno::RuntimeException) ; 241*cdf0e10cSrcweir virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Range( const css::uno::Any &Cell1, const css::uno::Any &Cell2 ) throw (css::uno::RuntimeException); 242*cdf0e10cSrcweir virtual css::uno::Reference< ov::excel::XRange > Range( const css::uno::Any &Cell1, const css::uno::Any &Cell2, bool bForceUseInpuRangeTab ) throw (css::uno::RuntimeException); 243*cdf0e10cSrcweir virtual css::uno::Any SAL_CALL getCellRange( ) throw (css::uno::RuntimeException); 244*cdf0e10cSrcweir static css::uno::Any getCellRange( const css::uno::Reference< ov::excel::XRange >& rxRange ) throw (css::uno::RuntimeException); 245*cdf0e10cSrcweir virtual void SAL_CALL PasteSpecial( const css::uno::Any& Paste, const css::uno::Any& Operation, const css::uno::Any& SkipBlanks, const css::uno::Any& Transpose ) throw (css::uno::RuntimeException); 246*cdf0e10cSrcweir virtual ::sal_Bool SAL_CALL Replace( const ::rtl::OUString& What, const ::rtl::OUString& Replacement, const css::uno::Any& LookAt, const css::uno::Any& SearchOrder, const css::uno::Any& MatchCase, const css::uno::Any& MatchByte, const css::uno::Any& SearchFormat, const css::uno::Any& ReplaceFormat ) throw (css::uno::RuntimeException); 247*cdf0e10cSrcweir virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Find( const css::uno::Any& What, const css::uno::Any& After, const css::uno::Any& LookIn, const css::uno::Any& LookAt, const css::uno::Any& SearchOrder, const css::uno::Any& SearchDirection, const css::uno::Any& MatchCase, const css::uno::Any& MatchByte, const css::uno::Any& SearchFormat ) throw (css::uno::RuntimeException); 248*cdf0e10cSrcweir virtual void SAL_CALL Sort( const css::uno::Any& Key1, const css::uno::Any& Order1, const css::uno::Any& Key2, const css::uno::Any& Type, const css::uno::Any& Order2, const css::uno::Any& Key3, const css::uno::Any& Order3, const css::uno::Any& Header, const css::uno::Any& OrderCustom, const css::uno::Any& MatchCase, const css::uno::Any& Orientation, const css::uno::Any& SortMethod, const css::uno::Any& DataOption1, const css::uno::Any& DataOption2, const css::uno::Any& DataOption3 ) throw (css::uno::RuntimeException); 249*cdf0e10cSrcweir virtual css::uno::Reference< ov::excel::XRange > SAL_CALL End( ::sal_Int32 Direction ) throw (css::uno::RuntimeException); 250*cdf0e10cSrcweir virtual css::uno::Reference< ov::excel::XCharacters > SAL_CALL characters( const css::uno::Any& Start, const css::uno::Any& Length ) throw (css::uno::RuntimeException); 251*cdf0e10cSrcweir virtual void SAL_CALL Delete( const css::uno::Any& Shift ) throw (css::uno::RuntimeException); 252*cdf0e10cSrcweir virtual css::uno::Any SAL_CALL Areas( const css::uno::Any& ) throw (css::uno::RuntimeException); 253*cdf0e10cSrcweir virtual css::uno::Any SAL_CALL Borders( const css::uno::Any& ) throw ( css::script::BasicErrorException, css::uno::RuntimeException); 254*cdf0e10cSrcweir virtual css::uno::Any SAL_CALL BorderAround( const css::uno::Any& LineStyle, 255*cdf0e10cSrcweir const css::uno::Any& Weight, const css::uno::Any& ColorIndex, const css::uno::Any& Color ) throw (css::uno::RuntimeException); 256*cdf0e10cSrcweir virtual void SAL_CALL TextToColumns( const css::uno::Any& Destination, const css::uno::Any& DataType, const css::uno::Any& TextQualifier, 257*cdf0e10cSrcweir const css::uno::Any& ConsecutinveDelimiter, const css::uno::Any& Tab, const css::uno::Any& Semicolon, const css::uno::Any& Comma, 258*cdf0e10cSrcweir const css::uno::Any& Space, const css::uno::Any& Other, const css::uno::Any& OtherChar, const css::uno::Any& FieldInfo, 259*cdf0e10cSrcweir const css::uno::Any& DecimalSeparator, const css::uno::Any& ThousandsSeparator, const css::uno::Any& TrailingMinusNumbers ) throw (css::uno::RuntimeException); 260*cdf0e10cSrcweir virtual css::uno::Any SAL_CALL Hyperlinks( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException); 261*cdf0e10cSrcweir 262*cdf0e10cSrcweir virtual void SAL_CALL AutoFilter( const css::uno::Any& Field, const css::uno::Any& Criteria1, const css::uno::Any& Operator, const css::uno::Any& Criteria2, const css::uno::Any& VisibleDropDown ) throw (css::uno::RuntimeException); 263*cdf0e10cSrcweir virtual void SAL_CALL Insert( const css::uno::Any& Shift, const css::uno::Any& CopyOrigin ) throw (css::uno::RuntimeException); 264*cdf0e10cSrcweir virtual void SAL_CALL Autofit() throw (css::uno::RuntimeException); 265*cdf0e10cSrcweir virtual void SAL_CALL PrintOut( const css::uno::Any& From, const css::uno::Any& To, const css::uno::Any& Copies, const css::uno::Any& Preview, const css::uno::Any& ActivePrinter, const css::uno::Any& PrintToFile, const css::uno::Any& Collate, const css::uno::Any& PrToFileName ) throw (css::uno::RuntimeException); 266*cdf0e10cSrcweir virtual void SAL_CALL AutoFill( const css::uno::Reference< ov::excel::XRange >& Destination, const css::uno::Any& Type ) throw (css::uno::RuntimeException) ; 267*cdf0e10cSrcweir void SAL_CALL Calculate( ) throw (css::script::BasicErrorException, css::uno::RuntimeException); 268*cdf0e10cSrcweir virtual void SAL_CALL AutoOutline( ) throw (css::script::BasicErrorException, css::uno::RuntimeException); 269*cdf0e10cSrcweir virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Item( const ::css::uno::Any& row, const css::uno::Any& column ) throw (css::script::BasicErrorException, css::uno::RuntimeException); 270*cdf0e10cSrcweir virtual void SAL_CALL ClearOutline( ) throw (css::script::BasicErrorException, css::uno::RuntimeException); 271*cdf0e10cSrcweir virtual void SAL_CALL Ungroup( ) throw (css::script::BasicErrorException, css::uno::RuntimeException); 272*cdf0e10cSrcweir virtual void SAL_CALL Group( ) throw (css::script::BasicErrorException, css::uno::RuntimeException); 273*cdf0e10cSrcweir virtual void SAL_CALL Merge( const css::uno::Any& Across ) throw (css::script::BasicErrorException, css::uno::RuntimeException); 274*cdf0e10cSrcweir virtual void SAL_CALL UnMerge( ) throw (css::script::BasicErrorException, css::uno::RuntimeException); 275*cdf0e10cSrcweir virtual css::uno::Any SAL_CALL getStyle() throw (css::uno::RuntimeException); 276*cdf0e10cSrcweir virtual void SAL_CALL setStyle( const css::uno::Any& _style ) throw (css::uno::RuntimeException); 277*cdf0e10cSrcweir virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Next() throw (css::script::BasicErrorException, css::uno::RuntimeException); 278*cdf0e10cSrcweir virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Previous() throw (css::script::BasicErrorException, css::uno::RuntimeException); 279*cdf0e10cSrcweir virtual void SAL_CALL RemoveSubtotal( ) throw (css::script::BasicErrorException, css::uno::RuntimeException); 280*cdf0e10cSrcweir virtual css::uno::Reference< ov::excel::XRange > SAL_CALL MergeArea() throw (css::script::BasicErrorException, css::uno::RuntimeException); 281*cdf0e10cSrcweir virtual void SAL_CALL Subtotal( ::sal_Int32 GroupBy, ::sal_Int32 Function, const css::uno::Sequence< ::sal_Int32 >& TotalList, const css::uno::Any& Replace, const css::uno::Any& PageBreaks, const css::uno::Any& SummaryBelowData ) throw (css::script::BasicErrorException, css::uno::RuntimeException); 282*cdf0e10cSrcweir // XEnumerationAccess 283*cdf0e10cSrcweir virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException); 284*cdf0e10cSrcweir // XElementAccess 285*cdf0e10cSrcweir virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException) 286*cdf0e10cSrcweir { 287*cdf0e10cSrcweir return ov::excel::XRange::static_type(0); 288*cdf0e10cSrcweir 289*cdf0e10cSrcweir } 290*cdf0e10cSrcweir virtual sal_Bool SAL_CALL hasElements() throw (css::uno::RuntimeException); 291*cdf0e10cSrcweir // XDefaultMethod 292*cdf0e10cSrcweir ::rtl::OUString SAL_CALL getDefaultMethodName( ) throw (css::uno::RuntimeException); 293*cdf0e10cSrcweir // XDefaultProperty 294*cdf0e10cSrcweir ::rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return ::rtl::OUString::createFromAscii("Value"); } 295*cdf0e10cSrcweir 296*cdf0e10cSrcweir 297*cdf0e10cSrcweir // #TODO completely rewrite ScVbaRange, its become a hackfest 298*cdf0e10cSrcweir // it needs to be closer to ScCellRangeBase in that the underlying 299*cdf0e10cSrcweir // object model should probably be a ScRangelst. 300*cdf0e10cSrcweir // * would be nice to be able to construct a range from an addres only 301*cdf0e10cSrcweir // * or a list of address ( multi-area ) 302*cdf0e10cSrcweir // * object should be a lightweight as possible 303*cdf0e10cSrcweir // * we shouldn't need hacks like this below 304*cdf0e10cSrcweir static css::uno::Reference< ov::excel::XRange > ApplicationRange( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Any &Cell1, const css::uno::Any &Cell2 ) throw (css::uno::RuntimeException); 305*cdf0e10cSrcweir virtual sal_Bool SAL_CALL GoalSeek( const css::uno::Any& Goal, const css::uno::Reference< ov::excel::XRange >& ChangingCell ) throw (css::uno::RuntimeException); 306*cdf0e10cSrcweir virtual css::uno::Reference< ov::excel::XRange > SAL_CALL SpecialCells( const css::uno::Any& _oType, const css::uno::Any& _oValue) throw ( css::script::BasicErrorException ); 307*cdf0e10cSrcweir // XHelperInterface 308*cdf0e10cSrcweir virtual rtl::OUString& getServiceImplName(); 309*cdf0e10cSrcweir virtual css::uno::Sequence<rtl::OUString> getServiceNames(); 310*cdf0e10cSrcweir }; 311*cdf0e10cSrcweir #endif /* SC_VBA_RANGE_HXX */ 312*cdf0e10cSrcweir 313