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