LibreOffice Module sc (master)  1
vbarange.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 #pragma once
20 
21 #include <ooo/vba/excel/XRange.hpp>
22 
23 #include <com/sun/star/awt/Point.hpp>
24 #include <com/sun/star/sheet/FillDateMode.hpp>
25 #include <com/sun/star/sheet/FillMode.hpp>
26 #include <com/sun/star/sheet/FillDirection.hpp>
27 
28 #include "vbaformat.hxx"
29 #include <address.hxx>
30 #include <formula/grammar.hxx>
31 
32 namespace com::sun::star::sheet { class XSheetCellRangeContainer; }
33 namespace com::sun::star::table { class XCell; }
34 namespace com::sun::star::table { class XCellRange; }
35 namespace com::sun::star::table { struct CellRangeAddress; }
36 namespace com::sun::star::lang { class XServiceInfo; }
37 namespace ooo::vba { class XCollection; }
38 namespace ooo::vba::excel { class XComment; }
39 namespace ooo::vba::excel { class XFont; }
40 
41 class SfxItemSet;
42 class ScCellRangesBase;
43 class ScCellRangeObj;
44 class ScDocShell;
45 class ScDocument;
46 class ScRangeList;
47 
49 {
50 public:
51  virtual void visitNode( sal_Int32 x, sal_Int32 y, const css::uno::Reference< css::table::XCell >& xCell ) = 0;
52  virtual ~ArrayVisitor(){}
53 };
54 
55 class ValueSetter : public ArrayVisitor
56 {
57 public:
58  virtual bool processValue( const css::uno::Any& aValue, const css::uno::Reference< css::table::XCell >& xCell ) = 0;
59 
60 };
61 
62 class ValueGetter : public ArrayVisitor
63 {
64 
65 public:
66  virtual void processValue( const css::uno::Any& aValue ) = 0;
67  virtual const css::uno::Any& getValue() const = 0;
68 };
69 
71 
73 {
74  css::uno::Reference< ov::XCollection > m_Areas;
75  css::uno::Reference< ov::XCollection > m_Borders;
76  css::uno::Reference< css::table::XCellRange > mxRange;
77  css::uno::Reference< css::sheet::XSheetCellRangeContainer > mxRanges;
78  bool mbIsRows;
80  css::uno::Reference< ov::excel::XValidation > m_xValidation;
82  double getCalcColWidth(const css::table::CellRangeAddress&);
84  double getCalcRowHeight(const css::table::CellRangeAddress&);
85  void visitArray( ArrayVisitor& visitor );
86 
88  css::uno::Reference< ov::excel::XRange > getEntireColumnOrRow( bool bColumn );
89 
91  void fillSeries( css::sheet::FillDirection nFillDirection, css::sheet::FillMode nFillMode, css::sheet::FillDateMode nFillDateMode, double fStep, double fEndValue );
92 
94  void ClearContents( sal_Int32 nFlags, bool bFireEvent );
95 
97  css::uno::Any getValue( ValueGetter& rValueGetter );
99  void setValue( const css::uno::Any& aValue, ValueSetter& setter );
100 
104  void setFormulaValue( const css::uno::Any& aValue, formula::FormulaGrammar::Grammar );
105 
107  css::uno::Reference< ov::excel::XRange > getArea( sal_Int32 nIndex );
110  css::uno::Reference< ov::XCollection >& getBorders();
112  void groupUnGroup( bool bUnGroup );
113  css::uno::Reference< ov::excel::XRange > PreviousNext( bool bIsPrevious );
115  css::uno::Reference< ov::excel::XRange > SpecialCellsImpl( sal_Int32 nType, const css::uno::Any& _oValue);
117  css::awt::Point getPosition() const;
118 
120  void fireChangeEvent();
121 
122 protected:
123  virtual ScCellRangesBase* getCellRangesBase() override;
126 public:
128  ScVbaRange( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::table::XCellRange >& xRange, bool bIsRows = false, bool bIsColumns = false );
131  ScVbaRange( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::sheet::XSheetCellRangeContainer >& xRanges, bool bIsRows = false, bool bIsColumns = false );
134  ScVbaRange( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext >const& xContext );
135 
140 
142  static ScVbaRange* getImplementation( const css::uno::Reference< ov::excel::XRange >& rxRange );
143 
145  css::uno::Reference< css::frame::XModel > getUnoModel();
147  static css::uno::Reference< css::frame::XModel > getUnoModel( const css::uno::Reference< ov::excel::XRange >& rxRange );
148 
150  const ScRangeList& getScRangeList();
152  static const ScRangeList& getScRangeList( const css::uno::Reference< ov::excel::XRange >& rxRange );
153 
154  virtual ~ScVbaRange() override;
155  virtual css::uno::Reference< ov::XHelperInterface > thisHelperIface() override { return this; }
156  bool isSingleCellRange() const;
157 
159  static css::uno::Reference< ov::excel::XRange > getRangeObjectForName(
160  const css::uno::Reference< css::uno::XComponentContext >& xContext,
161  const OUString& sRangeName, ScDocShell* pDocSh,
163 
165  static css::uno::Reference< ov::excel::XRange > CellsHelper(
166  const ScDocument& rDoc,
167  const css::uno::Reference< ov::XHelperInterface >& xParent,
168  const css::uno::Reference< css::uno::XComponentContext >& xContext,
169  const css::uno::Reference< css::table::XCellRange >& xRange,
170  const css::uno::Any &nRowIndex, const css::uno::Any &nColumnIndex );
171 
172  // Attributes
173  virtual css::uno::Any SAL_CALL getValue() override;
174  virtual void SAL_CALL setValue( const css::uno::Any& aValue ) override;
175  virtual css::uno::Any SAL_CALL getFormula() override;
176  virtual void SAL_CALL setFormula( const css::uno::Any& rFormula ) override;
177  virtual css::uno::Any SAL_CALL getFormulaArray() override;
178  virtual void SAL_CALL setFormulaArray(const css::uno::Any& rFormula) override;
179  virtual css::uno::Any SAL_CALL getFormulaR1C1() override;
180  virtual void SAL_CALL setFormulaR1C1( const css::uno::Any &rFormula ) override;
181  virtual css::uno::Any SAL_CALL getFormulaLocal() override;
182  virtual void SAL_CALL setFormulaLocal( const css::uno::Any &rFormula ) override;
183  virtual css::uno::Any SAL_CALL getFormulaR1C1Local() override;
184  virtual void SAL_CALL setFormulaR1C1Local( const css::uno::Any &rFormula ) override;
185  virtual ::sal_Int32 SAL_CALL getCount() override;
186  virtual ::sal_Int32 SAL_CALL getRow() override;
187  virtual ::sal_Int32 SAL_CALL getColumn() override;
188  virtual OUString SAL_CALL getText() override;
190  virtual void SAL_CALL setNumberFormat( const css::uno::Any& rNumberFormat ) override;
191  virtual css::uno::Any SAL_CALL getNumberFormat() override;
192  virtual void SAL_CALL setMergeCells( const css::uno::Any& bMerge ) override;
193  virtual css::uno::Any SAL_CALL getMergeCells() override;
194  virtual void SAL_CALL setWrapText( const css::uno::Any& bIsWrapped ) override;
195  virtual css::uno::Any SAL_CALL getWrapText() override;
196  virtual css::uno::Reference< ov::excel::XRange > SAL_CALL getEntireRow() override;
197  virtual css::uno::Reference< ov::excel::XRange > SAL_CALL getEntireColumn() override;
198  virtual css::uno::Reference< ov::excel::XComment > SAL_CALL getComment() override;
199  virtual css::uno::Any SAL_CALL getHidden() override;
200  virtual void SAL_CALL setHidden( const css::uno::Any& _hidden ) override;
201  virtual css::uno::Any SAL_CALL getColumnWidth() override;
202  virtual void SAL_CALL setColumnWidth( const css::uno::Any& _columnwidth ) override;
203  virtual css::uno::Any SAL_CALL getRowHeight() override;
204  virtual void SAL_CALL setRowHeight( const css::uno::Any& _rowheight ) override;
205  virtual css::uno::Any SAL_CALL getWidth() override;
206  virtual css::uno::Any SAL_CALL getHeight() override;
207  virtual css::uno::Any SAL_CALL getTop() override;
208  virtual css::uno::Any SAL_CALL getLeft() override;
209 
210  virtual css::uno::Reference< ov::excel::XName > SAL_CALL getName() override;
211  virtual css::uno::Reference< ov::excel::XWorksheet > SAL_CALL getWorksheet() override;
212  virtual css::uno::Any SAL_CALL getPageBreak() override;
213  virtual void SAL_CALL setPageBreak( const css::uno::Any& _pagebreak ) override;
214  virtual css::uno::Reference< ov::excel::XValidation > SAL_CALL getValidation() override;
215  virtual css::uno::Any SAL_CALL getPrefixCharacter() override;
216  virtual css::uno::Any SAL_CALL getShowDetail() override;
217  virtual void SAL_CALL setShowDetail(const css::uno::Any& aShowDetail) override;
218  // Methods
219  virtual css::uno::Reference< ov::excel::XComment > SAL_CALL AddComment( const css::uno::Any& Text ) override;
220  virtual void SAL_CALL Clear() override;
221  virtual void SAL_CALL ClearComments() override;
222  virtual void SAL_CALL ClearContents() override;
223  virtual void SAL_CALL ClearFormats() override;
224  virtual css::uno::Any SAL_CALL HasFormula() override;
225  virtual void SAL_CALL FillLeft() override;
226  virtual void SAL_CALL FillRight() override;
227  virtual void SAL_CALL FillUp() override;
228  virtual void SAL_CALL FillDown() override;
229  virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Offset( const css::uno::Any &nRowOffset, const css::uno::Any &nColOffset ) override;
230  virtual css::uno::Reference< ov::excel::XRange > SAL_CALL CurrentRegion() override;
231  virtual css::uno::Reference< ov::excel::XRange > SAL_CALL CurrentArray() override;
232  virtual OUString SAL_CALL Characters( const css::uno::Any& nIndex, const css::uno::Any& nCount ) override;
233 
234  virtual 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 ) override;
235 
236  virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Cells( const css::uno::Any &nRow, const css::uno::Any &nCol ) override;
237  virtual void SAL_CALL Select() override;
238  virtual void SAL_CALL Activate() override;
239  virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Rows( const css::uno::Any& nIndex ) override;
240  virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Columns( const css::uno::Any &nIndex ) override;
241  virtual void SAL_CALL Copy( const css::uno::Any& Destination ) override;
242  virtual void SAL_CALL Cut( const css::uno::Any& Destination ) override;
243  virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Resize( const css::uno::Any& RowSize, const css::uno::Any& ColumnSize ) override;
244  virtual css::uno::Reference< ov::excel::XFont > SAL_CALL Font() override;
245  virtual css::uno::Reference< ov::excel::XInterior > SAL_CALL Interior( ) override ;
246  virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Range( const css::uno::Any &Cell1, const css::uno::Any &Cell2 ) override;
248  css::uno::Reference< ov::excel::XRange > Range( const css::uno::Any &Cell1, const css::uno::Any &Cell2, bool bForceUseInpuRangeTab );
249  virtual css::uno::Any SAL_CALL getCellRange( ) override;
251  static css::uno::Any getCellRange( const css::uno::Reference< ov::excel::XRange >& rxRange );
252  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 ) override;
253  virtual sal_Bool SAL_CALL Replace( const OUString& What, const 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 ) override;
254  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 ) override;
255  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 ) override;
256  virtual css::uno::Reference< ov::excel::XRange > SAL_CALL End( ::sal_Int32 Direction ) override;
257  virtual css::uno::Reference< ov::excel::XCharacters > SAL_CALL characters( const css::uno::Any& Start, const css::uno::Any& Length ) override;
258  virtual void SAL_CALL Delete( const css::uno::Any& Shift ) override;
259  virtual css::uno::Any SAL_CALL Areas( const css::uno::Any& ) override;
260  virtual css::uno::Any SAL_CALL Borders( const css::uno::Any& ) override;
261  virtual css::uno::Any SAL_CALL BorderAround( const css::uno::Any& LineStyle,
262  const css::uno::Any& Weight, const css::uno::Any& ColorIndex, const css::uno::Any& Color ) override;
263  virtual css::uno::Any SAL_CALL Hyperlinks( const css::uno::Any& aIndex ) override;
264 
265  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 ) override;
266  virtual void SAL_CALL Insert( const css::uno::Any& Shift, const css::uno::Any& CopyOrigin ) override;
267  virtual void SAL_CALL Autofit() override;
268  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 ) override;
269  virtual void SAL_CALL AutoFill( const css::uno::Reference< ov::excel::XRange >& Destination, const css::uno::Any& Type ) override ;
270  void SAL_CALL Calculate( ) override;
271  virtual void SAL_CALL AutoOutline( ) override;
272  virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Item( const css::uno::Any& row, const css::uno::Any& column ) override;
273  virtual void SAL_CALL ClearOutline( ) override;
274  virtual void SAL_CALL Ungroup( ) override;
275  virtual void SAL_CALL Group( ) override;
276  virtual void SAL_CALL Merge( const css::uno::Any& Across ) override;
277  virtual void SAL_CALL UnMerge( ) override;
278  virtual css::uno::Any SAL_CALL getStyle() override;
279  virtual void SAL_CALL setStyle( const css::uno::Any& _style ) override;
280  virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Next() override;
281  virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Previous() override;
282  virtual void SAL_CALL RemoveSubtotal( ) override;
283  virtual css::uno::Reference< ov::excel::XRange > SAL_CALL MergeArea() override;
284  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 ) override;
285 
286  // XEnumerationAccess
287  virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override;
288  // XElementAccess
289  virtual css::uno::Type SAL_CALL getElementType() override
290  {
292 
293  }
294  virtual sal_Bool SAL_CALL hasElements() override;
295  // XDefaultMethod
296  OUString SAL_CALL getDefaultMethodName( ) override;
297  // XDefaultProperty
298  OUString SAL_CALL getDefaultPropertyName( ) override { return "Value"; }
299 
300 // #TODO completely rewrite ScVbaRange, it's become a hackfest
301 // it needs to be closer to ScCellRangeBase in that the underlying
302 // object model should probably be a ScRangelst.
303 // * would be nice to be able to construct a range from an address only
304 // * or a list of address ( multi-area )
305 // * object should be a lightweight as possible
306 // * we shouldn't need hacks like this below
308  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 );
309  static bool getCellRangesForAddress(ScRefFlags &rResFlags, std::u16string_view sAddress, ScDocShell* pDocSh, ScRangeList& rCellRanges, formula::FormulaGrammar::AddressConvention eConv, char cDelimiter );
310  virtual sal_Bool SAL_CALL GoalSeek( const css::uno::Any& Goal, const css::uno::Reference< ov::excel::XRange >& ChangingCell ) override;
311  virtual css::uno::Reference< ov::excel::XRange > SAL_CALL SpecialCells( const css::uno::Any& _oType, const css::uno::Any& _oValue) override;
312  // XErrorQuery
313  virtual sal_Bool SAL_CALL hasError( ) override;
314  // XHelperInterface
315  virtual OUString getServiceImplName() override;
316  virtual css::uno::Sequence<OUString> getServiceNames() override;
317 };
318 
320 bool getScRangeListForAddress( const OUString& sName, ScDocShell* pDocSh, const ScRange& refRange,
321  ScRangeList& aCellRanges,
323 
324 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual OUString SAL_CALL Characters(const css::uno::Any &nIndex, const css::uno::Any &nCount) override
Definition: vbarange.cxx:2045
virtual css::uno::Reference< ov::excel::XRange > SAL_CALL getEntireRow() override
Definition: vbarange.cxx:2942
virtual void visitNode(sal_Int32 x, sal_Int32 y, const css::uno::Reference< css::table::XCell > &xCell)=0
Type
virtual void SAL_CALL setFormula(const css::uno::Any &rFormula) override
Definition: vbarange.cxx:1688
virtual OUString getServiceImplName() override
Definition: vbarange.cxx:5651
void fillSeries(css::sheet::FillDirection nFillDirection, css::sheet::FillMode nFillMode, css::sheet::FillDateMode nFillDateMode, double fStep, double fEndValue)
Definition: vbarange.cxx:1828
virtual void SAL_CALL FillRight() override
Definition: vbarange.cxx:1857
virtual css::uno::Any SAL_CALL getTop() override
Definition: vbarange.cxx:4127
virtual void SAL_CALL Merge(const css::uno::Any &Across) override
Definition: vbarange.cxx:5283
virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Rows(const css::uno::Any &nIndex) override
Definition: vbarange.cxx:2377
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)
Definition: vbarange.cxx:4212
virtual css::uno::Any SAL_CALL Hyperlinks(const css::uno::Any &aIndex) override
Definition: vbarange.cxx:4788
virtual css::uno::Any SAL_CALL getStyle() override
Definition: vbarange.cxx:5327
virtual void SAL_CALL setFormulaR1C1(const css::uno::Any &rFormula) override
Definition: vbarange.cxx:1700
bool mbIsRows
Definition: vbarange.hxx:78
virtual ::sal_Int32 SAL_CALL getRow() override
Definition: vbarange.cxx:1754
virtual void SAL_CALL FillLeft() override
Definition: vbarange.cxx:1850
virtual css::uno::Reference< ov::excel::XFont > SAL_CALL Font() override
Definition: vbarange.cxx:2146
virtual void SAL_CALL ClearFormats() override
Definition: vbarange.cxx:1641
virtual ::sal_Int32 SAL_CALL getColumn() override
Definition: vbarange.cxx:1770
virtual void SAL_CALL ClearOutline() override
Definition: vbarange.cxx:5231
virtual css::uno::Any SAL_CALL getFormulaR1C1() override
Definition: vbarange.cxx:1694
css::uno::Reference< css::table::XCellRange > mxRange
Definition: vbarange.hxx:76
css::uno::Reference< ov::XCollection > & getBorders()
Definition: vbarange.cxx:1468
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) override
Definition: vbarange.cxx:3392
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) override
Definition: vbarange.cxx:3158
virtual ::sal_Int32 SAL_CALL getCount() override
Definition: vbarange.cxx:1730
virtual void SAL_CALL FillUp() override
Definition: vbarange.cxx:1864
virtual css::uno::Reference< ov::excel::XComment > SAL_CALL getComment() override
Definition: vbarange.cxx:2978
css::uno::Any getFormulaValue(formula::FormulaGrammar::Grammar)
Definition: vbarange.cxx:1665
ScVbaFormat< ov::excel::XRange > ScVbaRange_BASE
Definition: vbarange.hxx:70
virtual sal_Bool SAL_CALL GoalSeek(const css::uno::Any &Goal, const css::uno::Reference< ov::excel::XRange > &ChangingCell) override
Definition: vbarange.cxx:5154
virtual css::uno::Reference< ov::excel::XInterior > SAL_CALL Interior() override
Definition: vbarange.cxx:2697
const sal_Unicode cDelimiter
Definition: tpusrlst.cxx:45
css::uno::Reference< css::sheet::XSheetCellRangeContainer > mxRanges
Definition: vbarange.hxx:77
virtual void SAL_CALL Copy(const css::uno::Any &Destination) override
Definition: vbarange.cxx:2522
virtual OUString SAL_CALL getText() override
Definition: vbarange.cxx:1878
void groupUnGroup(bool bUnGroup)
Definition: vbarange.cxx:5249
float x
virtual css::uno::Any SAL_CALL getColumnWidth() override
Definition: vbarange.cxx:3790
void visitArray(ArrayVisitor &visitor)
Definition: vbarange.cxx:1479
Length
virtual void SAL_CALL AutoFill(const css::uno::Reference< ov::excel::XRange > &Destination, const css::uno::Any &Type) override
Definition: vbarange.cxx:5040
OUString SAL_CALL getDefaultPropertyName() override
Definition: vbarange.hxx:298
virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Next() override
Definition: vbarange.cxx:5388
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
Definition: vbarange.cxx:3732
virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Cells(const css::uno::Any &nRow, const css::uno::Any &nCol) override
Definition: vbarange.cxx:2168
virtual css::uno::Any SAL_CALL getFormulaR1C1Local() override
Definition: vbarange.cxx:1718
ScDocShell * getScDocShell()
Definition: vbarange.cxx:428
virtual void SAL_CALL Autofit() override
Definition: vbarange.cxx:4751
virtual void SAL_CALL Delete(const css::uno::Any &Shift) override
Definition: vbarange.cxx:3671
virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Item(const css::uno::Any &row, const css::uno::Any &column) override
Definition: vbarange.cxx:5190
virtual css::uno::Any SAL_CALL getHidden() override
Definition: vbarange.cxx:3003
virtual void SAL_CALL Insert(const css::uno::Any &Shift, const css::uno::Any &CopyOrigin) override
Definition: vbarange.cxx:4699
virtual void SAL_CALL setHidden(const css::uno::Any &_hidden) override
Definition: vbarange.cxx:3029
css::uno::Reference< css::frame::XModel > getUnoModel()
Definition: vbarange.cxx:445
virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Offset(const css::uno::Any &nRowOffset, const css::uno::Any &nColOffset) override
Definition: vbarange.cxx:1894
virtual 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) override
Definition: vbarange.cxx:2071
virtual css::uno::Reference< ov::excel::XValidation > SAL_CALL getValidation() override
Definition: vbarange.cxx:4809
Destination
LineStyle
virtual void SAL_CALL setPageBreak(const css::uno::Any &_pagebreak) override
Definition: vbarange.cxx:4053
virtual css::uno::Reference< ov::excel::XRange > SAL_CALL CurrentRegion() override
Definition: vbarange.cxx:1930
virtual css::uno::Any SAL_CALL getWrapText() override
Definition: vbarange.cxx:2669
void fireChangeEvent()
Fires a Worksheet_Change event for this range or range list.
Definition: vbarange.cxx:249
SQLUSMALLINT SQLSMALLINT SQLSMALLINT SQLSMALLINT SQLULEN ColumnSize
virtual void SAL_CALL setNumberFormat(const css::uno::Any &rNumberFormat) override
Definition: vbarange.cxx:2578
virtual void SAL_CALL setColumnWidth(const css::uno::Any &_columnwidth) override
Definition: vbarange.cxx:3827
virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Range(const css::uno::Any &Cell1, const css::uno::Any &Cell2) override
virtual css::uno::Reference< ov::excel::XRange > SAL_CALL SpecialCells(const css::uno::Any &_oType, const css::uno::Any &_oValue) override
Definition: vbarange.cxx:5410
float y
virtual css::uno::Any SAL_CALL getLeft() override
Definition: vbarange.cxx:4117
virtual css::uno::Any SAL_CALL getMergeCells() override
Definition: vbarange.cxx:2493
virtual css::uno::Any SAL_CALL getRowHeight() override
Definition: vbarange.cxx:3952
ScCellRangeObj * getCellRangeObj()
Definition: vbarange.cxx:236
OUString SAL_CALL getDefaultMethodName() override
Definition: vbarange.cxx:3750
virtual css::uno::Reference< ov::excel::XRange > SAL_CALL End(::sal_Int32 Direction) override
Definition: vbarange.cxx:3568
Orientation
virtual void SAL_CALL ClearContents() override
Definition: vbarange.cxx:1633
virtual css::uno::Reference< ov::excel::XComment > SAL_CALL AddComment(const css::uno::Any &Text) override
Definition: vbarange.cxx:2954
virtual const css::uno::Any & getValue() const =0
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) override
Definition: vbarange.cxx:4422
virtual void SAL_CALL setStyle(const css::uno::Any &_style) override
Definition: vbarange.cxx:5343
virtual css::uno::Reference< ov::excel::XName > SAL_CALL getName() override
Definition: vbarange.cxx:4160
virtual css::uno::Any SAL_CALL Areas(const css::uno::Any &) override
Definition: vbarange.cxx:3880
virtual ~ArrayVisitor()
Definition: vbarange.hxx:52
css::awt::Point getPosition() const
Definition: vbarange.cxx:4105
void SAL_CALL Calculate() override
Definition: vbarange.cxx:5184
css::uno::Reference< ov::excel::XRange > SpecialCellsImpl(sal_Int32 nType, const css::uno::Any &_oValue)
Definition: vbarange.cxx:5517
bool isSingleCellRange() const
Definition: vbarange.cxx:3647
virtual void SAL_CALL setMergeCells(const css::uno::Any &bMerge) override
Definition: vbarange.cxx:2458
unsigned char sal_Bool
virtual css::uno::Any SAL_CALL getFormulaLocal() override
Definition: vbarange.cxx:1706
css::uno::Reference< ov::excel::XRange > getArea(sal_Int32 nIndex)
Definition: vbarange.cxx:3888
virtual void SAL_CALL setWrapText(const css::uno::Any &bIsWrapped) override
Definition: vbarange.cxx:2650
css::uno::Type const & get()
virtual css::uno::Any SAL_CALL getValue() override
Definition: vbarange.cxx:1521
virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Resize(const css::uno::Any &RowSize, const css::uno::Any &ColumnSize) override
Definition: vbarange.cxx:2626
static css::uno::Reference< ov::excel::XRange > getRangeObjectForName(const css::uno::Reference< css::uno::XComponentContext > &xContext, const OUString &sRangeName, ScDocShell *pDocSh, formula::FormulaGrammar::AddressConvention eConv)
Definition: vbarange.cxx:1365
virtual css::uno::Any SAL_CALL getPageBreak() override
Definition: vbarange.cxx:4017
css::uno::Reference< ov::excel::XRange > PreviousNext(bool bIsPrevious)
Definition: vbarange.cxx:5359
virtual sal_Bool SAL_CALL hasElements() override
Definition: vbarange.cxx:3720
virtual void SAL_CALL RemoveSubtotal() override
Definition: vbarange.cxx:5572
virtual void SAL_CALL FillDown() override
Definition: vbarange.cxx:1871
virtual css::uno::Any SAL_CALL getFormulaArray() override
Definition: vbarange.cxx:1971
virtual void SAL_CALL setFormulaR1C1Local(const css::uno::Any &rFormula) override
Definition: vbarange.cxx:1724
virtual css::uno::Any SAL_CALL getFormula() override
Definition: vbarange.cxx:1682
virtual void SAL_CALL setNumberFormat(const css::uno::Any &NumberFormat)
Definition: vbaformat.cxx:442
virtual css::uno::Any SAL_CALL Borders(const css::uno::Any &) override
Definition: vbarange.cxx:3897
virtual css::uno::Reference< ov::excel::XCharacters > SAL_CALL characters(const css::uno::Any &Start, const css::uno::Any &Length) override
Definition: vbarange.cxx:3659
virtual void SAL_CALL Clear() override
Definition: vbarange.cxx:1591
virtual css::uno::Any SAL_CALL getNumberFormat() override
Definition: vbarange.cxx:2597
bool getScRangeListForAddress(const OUString &sName, ScDocShell *pDocSh, const ScRange &refRange, ScRangeList &aCellRanges, formula::FormulaGrammar::AddressConvention aConv=formula::FormulaGrammar::CONV_XL_A1)
Definition: vbarange.cxx:1164
void setFormulaValue(const css::uno::Any &aValue, formula::FormulaGrammar::Grammar)
Definition: vbarange.cxx:1650
virtual void SAL_CALL Cut(const css::uno::Any &Destination) override
Definition: vbarange.cxx:2552
virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Columns(const css::uno::Any &nIndex) override
Definition: vbarange.cxx:2419
virtual void SAL_CALL setShowDetail(const css::uno::Any &aShowDetail) override
Definition: vbarange.cxx:4947
virtual void SAL_CALL setFormulaArray(const css::uno::Any &rFormula) override
Definition: vbarange.cxx:2009
static bool getCellRangesForAddress(ScRefFlags &rResFlags, std::u16string_view sAddress, ScDocShell *pDocSh, ScRangeList &rCellRanges, formula::FormulaGrammar::AddressConvention eConv, char cDelimiter)
Definition: vbarange.cxx:1149
Direction
virtual void SAL_CALL Ungroup() override
Definition: vbarange.cxx:5271
virtual css::uno::Any SAL_CALL getCellRange() override
Definition: vbarange.cxx:2809
virtual css::uno::Any SAL_CALL getHeight() override
Definition: vbarange.cxx:4084
const ScRangeList & getScRangeList()
Definition: vbarange.cxx:459
virtual css::uno::Any SAL_CALL getPrefixCharacter() override
Definition: vbarange.cxx:4885
virtual void SAL_CALL Activate() override
Definition: vbarange.cxx:2317
virtual sal_Bool SAL_CALL Replace(const OUString &What, const 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) override
Definition: vbarange.cxx:3057
virtual void SAL_CALL AutoOutline() override
Definition: vbarange.cxx:5207
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) override
Definition: vbarange.cxx:2875
virtual css::uno::Reference< ov::excel::XWorksheet > SAL_CALL getWorksheet() override
Definition: vbarange.cxx:4187
virtual css::uno::Any SAL_CALL BorderAround(const css::uno::Any &LineStyle, const css::uno::Any &Weight, const css::uno::Any &ColorIndex, const css::uno::Any &Color) override
Definition: vbarange.cxx:3905
virtual void SAL_CALL setFormulaLocal(const css::uno::Any &rFormula) override
Definition: vbarange.cxx:1712
virtual ScCellRangesBase * getCellRangesBase() override
Definition: vbarange.cxx:227
QPRO_FUNC_TYPE nType
Definition: qproform.cxx:398
ScVbaRange(const css::uno::Reference< ov::XHelperInterface > &xParent, const css::uno::Reference< css::uno::XComponentContext > &xContext, const css::uno::Reference< css::table::XCellRange > &xRange, bool bIsRows=false, bool bIsColumns=false)
double getCalcRowHeight(const css::table::CellRangeAddress &)
Definition: vbarange.cxx:3767
virtual css::uno::Sequence< OUString > getServiceNames() override
Definition: vbarange.cxx:5657
virtual sal_Bool SAL_CALL hasError() override
Definition: vbarange.cxx:5663
virtual css::uno::Reference< ov::excel::XRange > SAL_CALL getEntireColumn() override
Definition: vbarange.cxx:2948
double getCalcColWidth(const css::table::CellRangeAddress &)
Definition: vbarange.cxx:3757
virtual css::uno::Any SAL_CALL getWidth() override
Definition: vbarange.cxx:3859
ScDocument & getScDocument()
Definition: vbarange.cxx:416
virtual void SAL_CALL UnMerge() override
Definition: vbarange.cxx:5311
css::uno::Reference< ov::excel::XValidation > m_xValidation
Definition: vbarange.hxx:80
virtual void SAL_CALL Select() override
Definition: vbarange.cxx:2269
css::uno::Reference< ov::XCollection > m_Borders
Definition: vbarange.hxx:75
virtual css::uno::Any SAL_CALL HasFormula() override
Definition: vbarange.cxx:1786
css::uno::Reference< ov::excel::XRange > getEntireColumnOrRow(bool bColumn)
Definition: vbarange.cxx:2910
virtual css::uno::Reference< ov::excel::XRange > SAL_CALL CurrentArray() override
Definition: vbarange.cxx:1951
virtual css::uno::Reference< ov::excel::XRange > SAL_CALL MergeArea() override
Definition: vbarange.cxx:4982
virtual ~ScVbaRange() override
Definition: vbarange.cxx:1464
virtual css::uno::Type SAL_CALL getElementType() override
Definition: vbarange.hxx:289
bool mbIsColumns
Definition: vbarange.hxx:79
ScRefFlags
Definition: address.hxx:157
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) override
Definition: vbarange.cxx:5579
virtual void processValue(const css::uno::Any &aValue)=0
void setValue(const css::uno::Any &aValue, ValueSetter &setter)
static ScVbaRange * getImplementation(const css::uno::Reference< ov::excel::XRange > &rxRange)
Returns the ScVbaRange implementation object for the passed VBA Range object.
Definition: vbarange.cxx:439
virtual css::uno::Any SAL_CALL getShowDetail() override
Definition: vbarange.cxx:4910
virtual bool processValue(const css::uno::Any &aValue, const css::uno::Reference< css::table::XCell > &xCell)=0
virtual void SAL_CALL ClearComments() override
Definition: vbarange.cxx:1627
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) override
Definition: vbarange.cxx:5008
virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Previous() override
Definition: vbarange.cxx:5399
virtual void SAL_CALL Group() override
Definition: vbarange.cxx:5266
virtual css::uno::Reference< ov::XHelperInterface > thisHelperIface() override
Definition: vbarange.hxx:155
SfxItemSet * getCurrentDataSet()
Definition: vbarange.cxx:241
css::uno::Reference< ov::XCollection > m_Areas
Definition: vbarange.hxx:74
static css::uno::Reference< ov::excel::XRange > CellsHelper(const ScDocument &rDoc, const css::uno::Reference< ov::XHelperInterface > &xParent, const css::uno::Reference< css::uno::XComponentContext > &xContext, const css::uno::Reference< css::table::XCellRange > &xRange, const css::uno::Any &nRowIndex, const css::uno::Any &nColumnIndex)
Definition: vbarange.cxx:2187
virtual void SAL_CALL setRowHeight(const css::uno::Any &_rowheight) override
Definition: vbarange.cxx:3991