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