LibreOffice Module sc (master)  1
token.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 
20 #ifndef INCLUDED_SC_INC_TOKEN_HXX
21 #define INCLUDED_SC_INC_TOKEN_HXX
22 
23 #include <memory>
24 #include <vector>
25 
26 #include <formula/opcode.hxx>
27 #include "refdata.hxx"
28 #include "scdllapi.h"
29 #include <formula/token.hxx>
30 #include "calcmacros.hxx"
31 #include "types.hxx"
32 
33 // Matrix token constants.
34 #define MATRIX_TOKEN_HAS_RANGE 1
35 
36 class ScJumpMatrix;
37 class ScMatrix;
39 
40 typedef ::std::vector< ScComplexRefData > ScRefList;
41 
42 #if DEBUG_FORMULA_COMPILER
43 void DumpToken(formula::FormulaToken const & rToken);
44 #endif
45 
58 formula::FormulaTokenRef extendRangeReference( ScSheetLimits& rLimits, formula::FormulaToken & rTok1, formula::FormulaToken & rTok2, const ScAddress & rPos, bool bReuseDoubleRef );
59 
61 {
62 private:
63  ScSheetLimits& mrSheetLimits; // don't use rtl::Reference to avoid ref-counting traffic
65 public:
66  ScSingleRefToken( ScSheetLimits& rLimits, const ScSingleRefData& r, OpCode e = ocPush ) :
67  FormulaToken( formula::svSingleRef, e ), mrSheetLimits(rLimits), aSingleRef( r ) {}
68  virtual const ScSingleRefData* GetSingleRef() const override;
69  virtual ScSingleRefData* GetSingleRef() override;
70  virtual bool TextEqual( const formula::FormulaToken& rToken ) const override;
71  virtual bool operator==( const formula::FormulaToken& rToken ) const override;
72  virtual FormulaToken* Clone() const override { return new ScSingleRefToken(*this); }
73 };
74 
76 {
77 private:
78  ScSheetLimits& mrSheetLimits; // don't use rtl::Reference to avoid ref-counting traffic
80 public:
81  ScDoubleRefToken( ScSheetLimits& rLimits, const ScComplexRefData& r, OpCode e = ocPush ) :
82  FormulaToken( formula::svDoubleRef, e ), mrSheetLimits(rLimits), aDoubleRef( r ) {}
83  virtual const ScSingleRefData* GetSingleRef() const override;
84  virtual ScSingleRefData* GetSingleRef() override;
85  virtual const ScComplexRefData* GetDoubleRef() const override;
86  virtual ScComplexRefData* GetDoubleRef() override;
87  virtual const ScSingleRefData* GetSingleRef2() const override;
88  virtual ScSingleRefData* GetSingleRef2() override;
89  virtual bool TextEqual( const formula::FormulaToken& rToken ) const override;
90  virtual bool operator==( const formula::FormulaToken& rToken ) const override;
91  virtual FormulaToken* Clone() const override { return new ScDoubleRefToken(*this); }
92 };
93 
95 {
96 private:
98 public:
99  ScMatrixToken( const ScMatrixRef& p );
100  ScMatrixToken( const ScMatrixToken& );
101 
102  virtual const ScMatrix* GetMatrix() const override;
103  virtual ScMatrix* GetMatrix() override;
104  virtual bool operator==( const formula::FormulaToken& rToken ) const override;
105  virtual FormulaToken* Clone() const override { return new ScMatrixToken(*this); }
106 };
107 
114 {
117 public:
118  ScMatrixRangeToken( const sc::RangeMatrix& rMat );
120 
121  virtual sal_uInt8 GetByte() const override;
122  virtual const ScMatrix* GetMatrix() const override;
123  virtual ScMatrix* GetMatrix() override;
124  virtual const ScComplexRefData* GetDoubleRef() const override;
125  virtual ScComplexRefData* GetDoubleRef() override;
126  virtual bool operator==( const formula::FormulaToken& rToken ) const override;
127  virtual FormulaToken* Clone() const override;
128 };
129 
131 {
132  sal_uInt16 mnFileId;
135 
136 public:
137  ScExternalSingleRefToken( sal_uInt16 nFileId, const svl::SharedString& rTabName, const ScSingleRefData& r );
138  ScExternalSingleRefToken() = delete;
139  virtual ~ScExternalSingleRefToken() override;
140 
143  ScExternalSingleRefToken & operator =(ScExternalSingleRefToken const &) = delete; // due to FormulaToken
144  ScExternalSingleRefToken & operator =(ScExternalSingleRefToken &&) = delete; // due to FormulaToken
145 
146  virtual sal_uInt16 GetIndex() const override;
147  virtual svl::SharedString GetString() const override;
148  virtual const ScSingleRefData* GetSingleRef() const override;
149  virtual ScSingleRefData* GetSingleRef() override;
150  virtual bool operator==( const formula::FormulaToken& rToken ) const override;
151  virtual FormulaToken* Clone() const override { return new ScExternalSingleRefToken(*this); }
152 };
153 
155 {
156  sal_uInt16 mnFileId;
157  svl::SharedString maTabName; // name of the first sheet
159 
160 public:
161  ScExternalDoubleRefToken() = delete;
162  ScExternalDoubleRefToken( sal_uInt16 nFileId, const svl::SharedString& rTabName, const ScComplexRefData& r );
163  virtual ~ScExternalDoubleRefToken() override;
164 
167  ScExternalDoubleRefToken & operator =(ScExternalDoubleRefToken const &) = delete; // due to FormulaToken
168  ScExternalDoubleRefToken & operator =(ScExternalDoubleRefToken &&) = delete; // due to FormulaToken
169 
170  virtual sal_uInt16 GetIndex() const override;
171  virtual svl::SharedString GetString() const override;
172  virtual const ScSingleRefData* GetSingleRef() const override;
173  virtual ScSingleRefData* GetSingleRef() override;
174  virtual const ScSingleRefData* GetSingleRef2() const override;
175  virtual ScSingleRefData* GetSingleRef2() override;
176  virtual const ScComplexRefData* GetDoubleRef() const override;
177  virtual ScComplexRefData* GetDoubleRef() override;
178  virtual bool operator==( const formula::FormulaToken& rToken ) const override;
179  virtual FormulaToken* Clone() const override { return new ScExternalDoubleRefToken(*this); }
180 };
181 
183 {
184  sal_uInt16 mnFileId;
186 
187 public:
188  ScExternalNameToken() = delete;
189  ScExternalNameToken( sal_uInt16 nFileId, const svl::SharedString& rName );
190  virtual ~ScExternalNameToken() override;
191 
192  ScExternalNameToken(ScExternalNameToken const &) = default;
194  ScExternalNameToken & operator =(ScExternalNameToken const &) = delete; // due to FormulaToken
195  ScExternalNameToken & operator =(ScExternalNameToken &&) = delete; // due to FormulaToken
196 
197  virtual sal_uInt16 GetIndex() const override;
198  virtual svl::SharedString GetString() const override;
199  virtual bool operator==( const formula::FormulaToken& rToken ) const override;
200  virtual FormulaToken* Clone() const override { return new ScExternalNameToken(*this); }
201 };
202 
205 {
206 public:
207 
208  enum Item
209  {
210  TABLE = 0,
211  ALL = 1,
212  HEADERS = 2,
213  DATA = 4,
214  TOTALS = 8,
215  THIS_ROW = 16,
218  };
219 
220  ScTableRefToken() = delete;
221  ScTableRefToken( sal_uInt16 nIndex, Item eItem );
222  ScTableRefToken( const ScTableRefToken& r );
223  virtual ~ScTableRefToken() override;
224 
225  virtual sal_uInt16 GetIndex() const override;
226  virtual void SetIndex( sal_uInt16 n ) override;
227  virtual sal_Int16 GetSheet() const override;
228  virtual bool operator==( const formula::FormulaToken& rToken ) const override;
229  virtual FormulaToken* Clone() const override { return new ScTableRefToken(*this); }
230 
231  Item GetItem() const;
232  void AddItem( Item );
233  void SetAreaRefRPN( formula::FormulaToken* pToken );
235 
236 private:
237 
239  sal_uInt16 mnIndex;
241 };
242 
243 // Only created from within the interpreter, no conversion from ScRawToken,
244 // never added to ScTokenArray!
246 {
247 private:
248  std::shared_ptr<ScJumpMatrix> mpJumpMatrix;
249 public:
250  ScJumpMatrixToken( std::shared_ptr<ScJumpMatrix> p );
252  virtual ~ScJumpMatrixToken() override;
253  virtual ScJumpMatrix* GetJumpMatrix() const override;
254  virtual bool operator==( const formula::FormulaToken& rToken ) const override;
255  virtual FormulaToken* Clone() const override { return new ScJumpMatrixToken(*this); }
256 };
257 
258 // Only created from within the interpreter, no conversion from ScRawToken,
259 // never added to ScTokenArray!
261 {
262 private:
264  bool mbArrayResult; // whether RefList is an array result
265 public:
267  FormulaToken( formula::svRefList ), mbArrayResult(false) {}
268  explicit ScRefListToken( bool bArrayResult ) :
269  FormulaToken( formula::svRefList ), mbArrayResult( bArrayResult ) {}
270  bool IsArrayResult() const;
271  virtual const ScRefList* GetRefList() const override;
272  virtual ScRefList* GetRefList() override;
273  virtual bool operator==( const formula::FormulaToken& rToken ) const override;
274  virtual FormulaToken* Clone() const override { return new ScRefListToken(*this); }
275 };
276 
278 {
279  bool bInherited :1;
281 public:
282  explicit ScEmptyCellToken( bool bInheritedP, bool bDisplayAsString ) :
284  bInherited( bInheritedP ),
285  bDisplayedAsString( bDisplayAsString ) {}
286  bool IsInherited() const { return bInherited; }
287  bool IsDisplayedAsString() const { return bDisplayedAsString; }
288  virtual double GetDouble() const override;
289  virtual svl::SharedString GetString() const override;
290  virtual bool operator==( const formula::FormulaToken& rToken ) const override;
291  virtual FormulaToken* Clone() const override { return new ScEmptyCellToken(*this); }
292 };
293 
296 {
297  // No non-const access implemented, silence down unxsols4 complaining about
298  // the public GetMatrix() hiding the one from FormulaToken.
299  virtual ScMatrix* GetMatrix() override;
300 
301 protected:
304 public:
307  virtual ~ScMatrixCellResultToken() override;
308  virtual double GetDouble() const override;
309  virtual svl::SharedString GetString() const override;
310  virtual const ScMatrix* GetMatrix() const override;
311  virtual bool operator==( const formula::FormulaToken& rToken ) const override;
312  virtual FormulaToken* Clone() const override;
314  {
315  return xUpperLeft ?
316  xUpperLeft->GetType() :
318  }
320  void Assign( const ScMatrixCellResultToken & r );
321 };
322 
326 {
327 private:
330 public:
334  virtual ~ScMatrixFormulaCellToken() override;
335 
336  virtual bool operator==( const formula::FormulaToken& rToken ) const override;
337  virtual FormulaToken* Clone() const override { return new ScMatrixFormulaCellToken(*this); }
338  void SetMatColsRows( SCCOL nC, SCROW nR )
339  {
340  nRows = nR;
341  nCols = nC;
342  }
343  void GetMatColsRows( SCCOL & nC, SCROW & nR ) const
344  {
345  nR = nRows;
346  nC = nCols;
347  }
348  SCCOL GetMatCols() const { return nCols; }
349  SCROW GetMatRows() const { return nRows; }
350 
353  void Assign( const ScMatrixCellResultToken & r );
354 
361  void Assign( const formula::FormulaToken & r );
362 
366  void SetUpperLeftDouble( double f);
367 
370  void ResetResult();
371 
372 private:
373 
377 };
378 
380 {
381 private:
382  double mfDouble;
384  OUString maFormula;
386 public:
388  double f, const svl::SharedString & rStr, const OUString & rFormula, bool bEmptyDisplayedAsString );
389 
390  const OUString& GetFormula() const { return maFormula; }
392  virtual double GetDouble() const override;
393 
394  virtual svl::SharedString GetString() const override;
395  virtual bool operator==( const formula::FormulaToken& rToken ) const override;
396  virtual FormulaToken* Clone() const override { return new ScHybridCellToken(*this); }
397 };
398 
399 // Simplify argument passing to RefUpdate methods with ScSingleRefToken or
400 // ScDoubleRefToken
402 {
406 
409 
410 public:
412  {
414  if ( eType == formula::svSingleRef || eType == formula::svExternalSingleRef )
415  {
416  pS = rT.GetSingleRef();
417  aDub.Ref1 = aDub.Ref2 = *pS;
418  pD = &aDub;
419  }
420  else
421  {
422  pS = nullptr;
423  pD = rT.GetDoubleRef();
424  // coverity[uninit_member] - aDub intentionally not initialized, unnecessary because unused.
425  }
426  }
428  {
429  pS = &rS;
430  aDub.Ref1 = aDub.Ref2 = *pS;
431  pD = &aDub;
432  }
434  {
435  if ( pS )
436  *pS = (*pD).Ref1;
437  }
438  ScComplexRefData& Ref() { return *pD; }
439 };
440 
442 {
443 public:
444 
447 
449  : Ref1( *r.GetSingleRef() ),
450  Ref2( (r.GetType() == formula::svDoubleRef ||
451  r.GetType() == formula::svExternalDoubleRef) ?
452  r.GetDoubleRef()->Ref2 : Ref1 )
453  {}
454 };
455 
456 #endif
457 
458 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sal_uInt16 mnIndex
index into table / database range collection
Definition: token.hxx:239
const ScSingleRefData & Ref2
Definition: token.hxx:446
Matrix data type that can store values of mixed types.
Definition: scmatrix.hxx:113
void SetAreaRefRPN(formula::FormulaToken *pToken)
Definition: token.cxx:909
ScSheetLimits & mrSheetLimits
Definition: token.hxx:78
::boost::intrusive_ptr< const FormulaToken > FormulaConstTokenRef
svRefList
formula::StackVar GetUpperLeftType() const
Definition: token.hxx:313
virtual const ScComplexRefData * GetDoubleRef() const override
Definition: token.cxx:701
virtual ~ScMatrixCellResultToken() override
Definition: token.cxx:986
virtual bool operator==(const formula::FormulaToken &rToken) const override
Definition: token.cxx:1129
virtual double GetDouble() const override
Definition: token.cxx:965
SingleDoubleRefProvider(const formula::FormulaToken &r)
Definition: token.hxx:448
std::shared_ptr< ScJumpMatrix > mpJumpMatrix
Definition: token.hxx:248
virtual bool operator==(const formula::FormulaToken &rToken) const override
Definition: token.cxx:650
ScComplexRefData * pD
Definition: token.hxx:405
svl::SharedString maName
Definition: token.hxx:185
OUString maFormula
Definition: token.hxx:384
svl::SharedString maTabName
Definition: token.hxx:157
virtual bool operator==(const formula::FormulaToken &rToken) const override
Definition: token.cxx:1037
Single reference (one address) into the sheet.
Definition: refdata.hxx:30
ScTableRefToken()=delete
virtual const ScSingleRefData * GetSingleRef() const override
Definition: token.cxx:743
virtual FormulaToken * Clone() const override
Definition: token.hxx:72
virtual ~ScExternalSingleRefToken() override
Definition: token.cxx:729
virtual const ScSingleRefData * GetSingleRef2() const override
Definition: token.cxx:799
virtual svl::SharedString GetString() const override
Definition: token.cxx:1124
ScExternalDoubleRefToken & operator=(ScExternalDoubleRefToken const &)=delete
virtual sal_uInt16 GetIndex() const override
Definition: token.cxx:779
virtual const ScSingleRefData * GetSingleRef() const override
Definition: token.cxx:640
formula::FormulaTokenRef mxAreaRefRPN
resulting RPN area
Definition: token.hxx:238
FormulaToken(StackVar eTypeP, OpCode e=ocPush)
ScSingleRefToken(ScSheetLimits &rLimits, const ScSingleRefData &r, OpCode e=ocPush)
Definition: token.hxx:66
const ScSingleRefData & Ref1
Definition: token.hxx:445
void Assign(const ScMatrixCellResultToken &r)
Assign matrix result, keep matrix formula dimension.
Definition: token.cxx:1050
ScComplexRefData aDoubleRef
Definition: token.hxx:79
ScRefListToken(bool bArrayResult)
Definition: token.hxx:268
virtual const ScSingleRefData * GetSingleRef() const override
Definition: token.cxx:789
ScComplexRefData aDub
Definition: token.hxx:403
Stores the matrix result at the formula cell, additionally the range the matrix formula occupies...
Definition: token.hxx:325
virtual sal_uInt16 GetIndex() const override
Definition: token.cxx:842
ScMatrixRef mpMatrix
Definition: token.hxx:115
bool mbArrayResult
Definition: token.hxx:264
virtual ~ScMatrixFormulaCellToken() override
Definition: token.cxx:1035
virtual FormulaToken * Clone() const override
Definition: token.hxx:291
Token storing matrix that represents values in sheet range.
Definition: token.hxx:113
virtual FormulaToken * Clone() const override
Definition: token.hxx:151
virtual const ScComplexRefData * GetDoubleRef() const override
Definition: token.cxx:642
svl::SharedString maString
Definition: token.hxx:383
Transports the result from the interpreter to the formula cell.
Definition: token.hxx:295
ScEmptyCellToken(bool bInheritedP, bool bDisplayAsString)
Definition: token.hxx:282
Item GetItem() const
Definition: token.cxx:899
virtual bool operator==(const formula::FormulaToken &rToken) const override
Definition: token.cxx:819
virtual double GetDouble() const override
Definition: token.cxx:1122
virtual ScMatrix * GetMatrix() override
Definition: token.cxx:996
virtual sal_Int16 GetSheet() const override
Definition: token.cxx:890
OpCode
virtual const ScSingleRefData * GetSingleRef() const
ScExternalNameToken()=delete
::boost::intrusive_ptr< ScMatrix > ScMatrixRef
Definition: types.hxx:26
Special token to remember details of ocTableRef "structured references".
Definition: token.hxx:204
virtual svl::SharedString GetString() const override
Definition: token.cxx:847
virtual FormulaToken * Clone() const override
Definition: token.hxx:274
virtual FormulaToken * Clone() const override
Definition: token.hxx:229
ScMatrixRangeToken(const sc::RangeMatrix &rMat)
Definition: token.cxx:678
ScDoubleRefToken(ScSheetLimits &rLimits, const ScComplexRefData &r, OpCode e=ocPush)
Definition: token.hxx:81
void SetMatColsRows(SCCOL nC, SCROW nR)
Definition: token.hxx:338
DocumentType eType
virtual ~ScExternalNameToken() override
Definition: token.cxx:840
ScJumpMatrixToken(std::shared_ptr< ScJumpMatrix > p)
Definition: token.cxx:944
virtual svl::SharedString GetString() const override
Definition: token.cxx:988
void AddItem(Item)
Definition: token.cxx:904
SCROW GetMatRows() const
Definition: token.hxx:349
ScConstMatrixRef xMatrix
Definition: token.hxx:302
SingleDoubleRefModifier(ScSingleRefData &rS)
Definition: token.hxx:427
virtual void SetIndex(sal_uInt16 n) override
Definition: token.cxx:885
virtual bool operator==(const formula::FormulaToken &rToken) const override
Definition: token.cxx:635
virtual sal_uInt16 GetIndex() const override
Definition: token.cxx:880
ScMatrixFormulaCellToken(SCCOL nC, SCROW nR, const ScConstMatrixRef &pMat, const formula::FormulaToken *pUL)
Definition: token.cxx:1019
virtual bool operator==(const formula::FormulaToken &rToken) const override
Definition: token.cxx:1001
virtual const ScSingleRefData * GetSingleRef() const override
Definition: token.cxx:629
virtual const ScComplexRefData * GetDoubleRef() const
SingleDoubleRefModifier(formula::FormulaToken &rT)
Definition: token.hxx:411
virtual bool operator==(const formula::FormulaToken &rToken) const override
Definition: token.cxx:956
const formula::FormulaConstTokenRef & GetUpperLeftToken() const
Definition: token.hxx:319
ScExternalNameToken & operator=(ScExternalNameToken const &)=delete
ScComplexRefData maDoubleRef
Definition: token.hxx:158
sal_Int16 SCCOL
Definition: types.hxx:22
virtual FormulaToken * Clone() const override
Definition: token.hxx:255
virtual bool operator==(const formula::FormulaToken &rToken) const override
Definition: token.cxx:658
formula::FormulaToken * GetAreaRefRPN() const
Definition: token.cxx:914
virtual double GetDouble() const override
Definition: token.cxx:984
virtual FormulaToken * Clone() const override
Definition: token.cxx:1008
virtual const ScRefList * GetRefList() const override
Definition: token.cxx:655
ScSingleRefData Ref1
Definition: refdata.hxx:125
virtual bool operator==(const formula::FormulaToken &rToken) const override
Definition: token.cxx:673
::boost::intrusive_ptr< FormulaToken > FormulaTokenRef
ScSingleRefData Ref2
Definition: refdata.hxx:126
svExternalDoubleRef
svExternalSingleRef
ScExternalSingleRefToken & operator=(ScExternalSingleRefToken const &)=delete
virtual bool operator==(const formula::FormulaToken &rToken) const override
Definition: token.cxx:852
ScMatrixCellResultToken(const ScConstMatrixRef &pMat, const formula::FormulaToken *pUL)
Definition: token.cxx:979
virtual FormulaToken * Clone() const override
Definition: token.hxx:91
ScMatrixRef pMatrix
Definition: token.hxx:97
sal_uInt16 mnFileId
Definition: token.hxx:184
virtual bool operator==(const formula::FormulaToken &rToken) const override
Definition: token.cxx:972
virtual const ScMatrix * GetMatrix() const override
Definition: token.cxx:691
ScComplexRefData & Ref()
Definition: token.hxx:438
svSingleRef
virtual FormulaToken * Clone() const override
Definition: token.hxx:179
virtual bool operator==(const formula::FormulaToken &rToken) const override
Definition: token.cxx:753
svl::SharedString maTabName
Definition: token.hxx:133
virtual ~ScExternalDoubleRefToken() override
Definition: token.cxx:775
svDoubleRef
ScSingleRefData * pS
Definition: token.hxx:404
void ResetResult()
Reset matrix and upper left, keep matrix formula dimension.
Definition: token.cxx:1105
virtual const ScSingleRefData * GetSingleRef2() const override
Definition: token.cxx:644
ScMatrixToken(const ScMatrixRef &p)
Definition: token.cxx:666
sal_Int32 SCROW
Definition: types.hxx:18
virtual ~ScTableRefToken() override
Definition: token.cxx:878
virtual bool operator==(const formula::FormulaToken &rToken) const override
Definition: token.cxx:919
SCCOL GetMatCols() const
Definition: token.hxx:348
SingleDoubleRefModifier(const SingleDoubleRefModifier &)=delete
virtual sal_uInt8 GetByte() const override
Definition: token.cxx:686
virtual bool TextEqual(const formula::FormulaToken &rToken) const override
Definition: token.cxx:646
ScRefList aRefList
Definition: token.hxx:263
unsigned char sal_uInt8
virtual FormulaToken * Clone() const override
Definition: token.hxx:396
void GetMatColsRows(SCCOL &nC, SCROW &nR) const
Definition: token.hxx:343
void Assign(const ScMatrixCellResultToken &r)
Definition: token.cxx:1013
virtual sal_uInt16 GetIndex() const override
Definition: token.cxx:733
::boost::intrusive_ptr< const ScMatrix > ScConstMatrixRef
Definition: types.hxx:27
bool IsInherited() const
Definition: token.hxx:286
virtual svl::SharedString GetString() const override
Definition: token.cxx:738
virtual const ScMatrix * GetMatrix() const override
Definition: token.cxx:671
virtual FormulaToken * Clone() const override
Definition: token.hxx:200
SingleDoubleRefModifier & operator=(const SingleDoubleRefModifier &)=delete
void SetUpperLeftDouble(double f)
Modify xUpperLeft if formula::svDouble, or create new formula::FormulaDoubleToken if not set yet...
Definition: token.cxx:1081
bool IsDisplayedAsString() const
Definition: token.hxx:287
void CloneUpperLeftIfNecessary()
xUpperLeft is modifiable through SetUpperLeftDouble(), so clone it whenever an svDouble token is assi...
Definition: token.cxx:1044
formula::FormulaTokenRef extendRangeReference(ScSheetLimits &rLimits, formula::FormulaToken &rTok1, formula::FormulaToken &rTok2, const ScAddress &rPos, bool bReuseDoubleRef)
If rTok1 and rTok2 both are SingleRef or DoubleRef tokens, extend/merge ranges as needed for ocRange...
Definition: token.cxx:503
double mfDouble
Definition: token.hxx:382
virtual FormulaToken * Clone() const override
Definition: token.hxx:337
Complex reference (a range) into the sheet.
Definition: refdata.hxx:123
virtual FormulaToken * Clone() const override
Definition: token.cxx:716
bool bDisplayedAsString
Definition: token.hxx:280
virtual bool TextEqual(const formula::FormulaToken &rToken) const override
Definition: token.cxx:631
virtual FormulaToken * Clone() const override
Definition: token.hxx:105
virtual ScJumpMatrix * GetJumpMatrix() const override
Definition: token.cxx:951
ScComplexRefData maRef
Definition: token.hxx:116
ScHybridCellToken(double f, const svl::SharedString &rStr, const OUString &rFormula, bool bEmptyDisplayedAsString)
Definition: token.cxx:1111
virtual svl::SharedString GetString() const override
Definition: token.cxx:784
svEmptyCell
virtual const ScComplexRefData * GetDoubleRef() const override
Definition: token.cxx:809
formula::FormulaConstTokenRef xUpperLeft
Definition: token.hxx:303
virtual bool operator==(const formula::FormulaToken &rToken) const override
Definition: token.cxx:711
::std::vector< ScComplexRefData > ScRefList
Definition: token.hxx:38
bool IsArrayResult() const
Definition: token.cxx:657
virtual svl::SharedString GetString() const override
Definition: token.cxx:967
StackVar GetType() const
ScSingleRefData maSingleRef
Definition: token.hxx:134
virtual ~ScJumpMatrixToken() override
Definition: token.cxx:961
ScSingleRefData aSingleRef
Definition: token.hxx:64
ScSheetLimits & mrSheetLimits
Definition: token.hxx:63
const OUString & GetFormula() const
Definition: token.hxx:390
bool IsEmptyDisplayedAsString() const
Definition: token.hxx:391
bool mbEmptyDisplayedAsString
Definition: token.hxx:385