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 #pragma once
21 
22 #include <memory>
23 #include <vector>
24 
25 #include <formula/opcode.hxx>
26 #include "refdata.hxx"
27 #include "scdllapi.h"
28 #include <formula/token.hxx>
29 #include "calcmacros.hxx"
30 #include "types.hxx"
31 
32 // Matrix token constants.
33 #define MATRIX_TOKEN_HAS_RANGE 1
34 
35 class ScJumpMatrix;
36 class ScMatrix;
38 
39 typedef ::std::vector< ScComplexRefData > ScRefList;
40 
41 #if DEBUG_FORMULA_COMPILER
42 void DumpToken(formula::FormulaToken const & rToken);
43 #endif
44 
57 formula::FormulaTokenRef extendRangeReference( ScSheetLimits& rLimits, formula::FormulaToken & rTok1, formula::FormulaToken & rTok2, const ScAddress & rPos, bool bReuseDoubleRef );
58 
60 {
61 private:
62  ScSheetLimits& mrSheetLimits; // don't use rtl::Reference to avoid ref-counting traffic
64 public:
65  ScSingleRefToken( ScSheetLimits& rLimits, const ScSingleRefData& r, OpCode e = ocPush ) :
66  FormulaToken( formula::svSingleRef, e ), mrSheetLimits(rLimits), aSingleRef( r ) {}
67  virtual const ScSingleRefData* GetSingleRef() const override;
68  virtual ScSingleRefData* GetSingleRef() override;
69  virtual bool TextEqual( const formula::FormulaToken& rToken ) const override;
70  virtual bool operator==( const formula::FormulaToken& rToken ) const override;
71  virtual FormulaToken* Clone() const override { return new ScSingleRefToken(*this); }
72 };
73 
75 {
76 private:
77  ScSheetLimits& mrSheetLimits; // don't use rtl::Reference to avoid ref-counting traffic
79 public:
80  ScDoubleRefToken( ScSheetLimits& rLimits, const ScComplexRefData& r, OpCode e = ocPush ) :
81  FormulaToken( formula::svDoubleRef, e ), mrSheetLimits(rLimits), aDoubleRef( r ) {}
82  virtual const ScSingleRefData* GetSingleRef() const override;
83  virtual ScSingleRefData* GetSingleRef() override;
84  virtual const ScComplexRefData* GetDoubleRef() const override;
85  virtual ScComplexRefData* GetDoubleRef() override;
86  virtual const ScSingleRefData* GetSingleRef2() const override;
87  virtual ScSingleRefData* GetSingleRef2() override;
88  virtual bool TextEqual( const formula::FormulaToken& rToken ) const override;
89  virtual bool operator==( const formula::FormulaToken& rToken ) const override;
90  virtual FormulaToken* Clone() const override { return new ScDoubleRefToken(*this); }
91 };
92 
94 {
95 private:
97 public:
98  ScMatrixToken( const ScMatrixRef& p );
99  ScMatrixToken( const ScMatrixToken& );
100 
101  virtual const ScMatrix* GetMatrix() const override;
102  virtual ScMatrix* GetMatrix() override;
103  virtual bool operator==( const formula::FormulaToken& rToken ) const override;
104  virtual FormulaToken* Clone() const override { return new ScMatrixToken(*this); }
105 };
106 
113 {
116 public:
117  ScMatrixRangeToken( const sc::RangeMatrix& rMat );
119 
120  virtual sal_uInt8 GetByte() const override;
121  virtual const ScMatrix* GetMatrix() const override;
122  virtual ScMatrix* GetMatrix() override;
123  virtual const ScComplexRefData* GetDoubleRef() const override;
124  virtual ScComplexRefData* GetDoubleRef() override;
125  virtual bool operator==( const formula::FormulaToken& rToken ) const override;
126  virtual FormulaToken* Clone() const override;
127 };
128 
130 {
131  sal_uInt16 mnFileId;
134 
135 public:
136  ScExternalSingleRefToken( sal_uInt16 nFileId, const svl::SharedString& rTabName, const ScSingleRefData& r );
137  ScExternalSingleRefToken() = delete;
138  virtual ~ScExternalSingleRefToken() override;
139 
142  ScExternalSingleRefToken & operator =(ScExternalSingleRefToken const &) = delete; // due to FormulaToken
143  ScExternalSingleRefToken & operator =(ScExternalSingleRefToken &&) = delete; // due to FormulaToken
144 
145  virtual sal_uInt16 GetIndex() const override;
146  virtual const svl::SharedString & GetString() const override;
147  virtual const ScSingleRefData* GetSingleRef() const override;
148  virtual ScSingleRefData* GetSingleRef() override;
149  virtual bool operator==( const formula::FormulaToken& rToken ) const override;
150  virtual FormulaToken* Clone() const override { return new ScExternalSingleRefToken(*this); }
151 };
152 
154 {
155  sal_uInt16 mnFileId;
156  svl::SharedString maTabName; // name of the first sheet
158 
159 public:
160  ScExternalDoubleRefToken() = delete;
161  ScExternalDoubleRefToken( sal_uInt16 nFileId, const svl::SharedString& rTabName, const ScComplexRefData& r );
162  virtual ~ScExternalDoubleRefToken() override;
163 
166  ScExternalDoubleRefToken & operator =(ScExternalDoubleRefToken const &) = delete; // due to FormulaToken
167  ScExternalDoubleRefToken & operator =(ScExternalDoubleRefToken &&) = delete; // due to FormulaToken
168 
169  virtual sal_uInt16 GetIndex() const override;
170  virtual const svl::SharedString & GetString() const override;
171  virtual const ScSingleRefData* GetSingleRef() const override;
172  virtual ScSingleRefData* GetSingleRef() override;
173  virtual const ScSingleRefData* GetSingleRef2() const override;
174  virtual ScSingleRefData* GetSingleRef2() override;
175  virtual const ScComplexRefData* GetDoubleRef() const override;
176  virtual ScComplexRefData* GetDoubleRef() override;
177  virtual bool operator==( const formula::FormulaToken& rToken ) const override;
178  virtual FormulaToken* Clone() const override { return new ScExternalDoubleRefToken(*this); }
179 };
180 
182 {
183  sal_uInt16 mnFileId;
185 
186 public:
187  ScExternalNameToken() = delete;
188  ScExternalNameToken( sal_uInt16 nFileId, const svl::SharedString& rName );
189  virtual ~ScExternalNameToken() override;
190 
191  ScExternalNameToken(ScExternalNameToken const &) = default;
193  ScExternalNameToken & operator =(ScExternalNameToken const &) = delete; // due to FormulaToken
194  ScExternalNameToken & operator =(ScExternalNameToken &&) = delete; // due to FormulaToken
195 
196  virtual sal_uInt16 GetIndex() const override;
197  virtual const svl::SharedString & GetString() const override;
198  virtual bool operator==( const formula::FormulaToken& rToken ) const override;
199  virtual FormulaToken* Clone() const override { return new ScExternalNameToken(*this); }
200 };
201 
204 {
205 public:
206 
207  enum Item
208  {
209  TABLE = 0,
210  ALL = 1,
211  HEADERS = 2,
212  DATA = 4,
213  TOTALS = 8,
214  THIS_ROW = 16,
217  };
218 
219  ScTableRefToken() = delete;
220  ScTableRefToken( sal_uInt16 nIndex, Item eItem );
221  ScTableRefToken( const ScTableRefToken& r );
222  virtual ~ScTableRefToken() override;
223 
224  virtual sal_uInt16 GetIndex() const override;
225  virtual void SetIndex( sal_uInt16 n ) override;
226  virtual sal_Int16 GetSheet() const override;
227  virtual bool operator==( const formula::FormulaToken& rToken ) const override;
228  virtual FormulaToken* Clone() const override { return new ScTableRefToken(*this); }
229 
230  Item GetItem() const;
231  void AddItem( Item );
232  void SetAreaRefRPN( formula::FormulaToken* pToken );
234 
235 private:
236 
238  sal_uInt16 mnIndex;
240 };
241 
242 // Only created from within the interpreter, no conversion from ScRawToken,
243 // never added to ScTokenArray!
245 {
246 private:
247  std::shared_ptr<ScJumpMatrix> mpJumpMatrix;
248 public:
249  ScJumpMatrixToken( std::shared_ptr<ScJumpMatrix> p );
251  virtual ~ScJumpMatrixToken() override;
252  virtual ScJumpMatrix* GetJumpMatrix() const override;
253  virtual bool operator==( const formula::FormulaToken& rToken ) const override;
254  virtual FormulaToken* Clone() const override { return new ScJumpMatrixToken(*this); }
255 };
256 
257 // Only created from within the interpreter, no conversion from ScRawToken,
258 // never added to ScTokenArray!
260 {
261 private:
263  bool mbArrayResult; // whether RefList is an array result
264 public:
266  FormulaToken( formula::svRefList ), mbArrayResult(false) {}
267  explicit ScRefListToken( bool bArrayResult ) :
268  FormulaToken( formula::svRefList ), mbArrayResult( bArrayResult ) {}
269  bool IsArrayResult() const;
270  virtual const ScRefList* GetRefList() const override;
271  virtual ScRefList* GetRefList() override;
272  virtual bool operator==( const formula::FormulaToken& rToken ) const override;
273  virtual FormulaToken* Clone() const override { return new ScRefListToken(*this); }
274 };
275 
277 {
278  bool bInherited :1;
280 public:
281  explicit ScEmptyCellToken( bool bInheritedP, bool bDisplayAsString ) :
283  bInherited( bInheritedP ),
284  bDisplayedAsString( bDisplayAsString ) {}
285  bool IsInherited() const { return bInherited; }
286  bool IsDisplayedAsString() const { return bDisplayedAsString; }
287  virtual double GetDouble() const override;
288  virtual const svl::SharedString & GetString() const override;
289  virtual bool operator==( const formula::FormulaToken& rToken ) const override;
290  virtual FormulaToken* Clone() const override { return new ScEmptyCellToken(*this); }
291 };
292 
295 {
296  // No non-const access implemented, silence down unxsols4 complaining about
297  // the public GetMatrix() hiding the one from FormulaToken.
298  virtual ScMatrix* GetMatrix() override;
299 
300 protected:
303 public:
306  virtual ~ScMatrixCellResultToken() override;
307  virtual double GetDouble() const override;
308  virtual const svl::SharedString & GetString() const override;
309  virtual const ScMatrix* GetMatrix() const override;
310  virtual bool operator==( const formula::FormulaToken& rToken ) const override;
311  virtual FormulaToken* Clone() const override;
313  {
314  return xUpperLeft ?
315  xUpperLeft->GetType() :
317  }
319  void Assign( const ScMatrixCellResultToken & r );
320 };
321 
325 {
326 private:
329 public:
333  virtual ~ScMatrixFormulaCellToken() override;
334 
335  virtual bool operator==( const formula::FormulaToken& rToken ) const override;
336  virtual FormulaToken* Clone() const override { return new ScMatrixFormulaCellToken(*this); }
337  void SetMatColsRows( SCCOL nC, SCROW nR )
338  {
339  nRows = nR;
340  nCols = nC;
341  }
342  void GetMatColsRows( SCCOL & nC, SCROW & nR ) const
343  {
344  nR = nRows;
345  nC = nCols;
346  }
347  SCCOL GetMatCols() const { return nCols; }
348  SCROW GetMatRows() const { return nRows; }
349 
352  void Assign( const ScMatrixCellResultToken & r );
353 
360  void Assign( const formula::FormulaToken & r );
361 
365  void SetUpperLeftDouble( double f);
366 
369  void ResetResult();
370 
371 private:
372 
376 };
377 
379 {
380 private:
381  double mfDouble;
383  OUString maFormula;
385 public:
387  double f, const svl::SharedString & rStr, const OUString & rFormula, bool bEmptyDisplayedAsString );
388 
389  const OUString& GetFormula() const { return maFormula; }
391  virtual double GetDouble() const override;
392 
393  virtual const svl::SharedString & GetString() const override;
394  virtual bool operator==( const formula::FormulaToken& rToken ) const override;
395  virtual FormulaToken* Clone() const override { return new ScHybridCellToken(*this); }
396 };
397 
398 // Simplify argument passing to RefUpdate methods with ScSingleRefToken or
399 // ScDoubleRefToken
401 {
405 
408 
409 public:
411  {
413  if ( eType == formula::svSingleRef || eType == formula::svExternalSingleRef )
414  {
415  pS = rT.GetSingleRef();
416  aDub.Ref1 = aDub.Ref2 = *pS;
417  pD = &aDub;
418  }
419  else
420  {
421  pS = nullptr;
422  pD = rT.GetDoubleRef();
423  // coverity[uninit_member] - aDub intentionally not initialized, unnecessary because unused.
424  }
425  }
427  {
428  pS = &rS;
429  aDub.Ref1 = aDub.Ref2 = *pS;
430  pD = &aDub;
431  }
433  {
434  if ( pS )
435  *pS = (*pD).Ref1;
436  }
437  ScComplexRefData& Ref() { return *pD; }
438 };
439 
441 {
442 public:
443 
446 
448  : Ref1( *r.GetSingleRef() ),
449  Ref2( (r.GetType() == formula::svDoubleRef ||
450  r.GetType() == formula::svExternalDoubleRef) ?
451  r.GetDoubleRef()->Ref2 : Ref1 )
452  {}
453 };
454 
455 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sal_uInt16 mnIndex
index into table / database range collection
Definition: token.hxx:238
const ScSingleRefData & Ref2
Definition: token.hxx:445
Matrix data type that can store values of mixed types.
Definition: scmatrix.hxx:112
void SetAreaRefRPN(formula::FormulaToken *pToken)
Definition: token.cxx:901
ScSheetLimits & mrSheetLimits
Definition: token.hxx:77
::boost::intrusive_ptr< const FormulaToken > FormulaConstTokenRef
svRefList
formula::StackVar GetUpperLeftType() const
Definition: token.hxx:312
virtual const ScComplexRefData * GetDoubleRef() const override
Definition: token.cxx:693
virtual ~ScMatrixCellResultToken() override
Definition: token.cxx:978
virtual bool operator==(const formula::FormulaToken &rToken) const override
Definition: token.cxx:1121
virtual const svl::SharedString & GetString() const override
Definition: token.cxx:959
virtual double GetDouble() const override
Definition: token.cxx:957
SingleDoubleRefProvider(const formula::FormulaToken &r)
Definition: token.hxx:447
std::shared_ptr< ScJumpMatrix > mpJumpMatrix
Definition: token.hxx:247
virtual bool operator==(const formula::FormulaToken &rToken) const override
Definition: token.cxx:642
ScComplexRefData * pD
Definition: token.hxx:404
svl::SharedString maName
Definition: token.hxx:184
OUString maFormula
Definition: token.hxx:383
svl::SharedString maTabName
Definition: token.hxx:156
virtual bool operator==(const formula::FormulaToken &rToken) const override
Definition: token.cxx:1029
virtual const svl::SharedString & GetString() const override
Definition: token.cxx:1116
Single reference (one address) into the sheet.
Definition: refdata.hxx:29
ScTableRefToken()=delete
virtual const ScSingleRefData * GetSingleRef() const override
Definition: token.cxx:735
virtual FormulaToken * Clone() const override
Definition: token.hxx:71
virtual ~ScExternalSingleRefToken() override
Definition: token.cxx:721
virtual const ScSingleRefData * GetSingleRef2() const override
Definition: token.cxx:791
ScExternalDoubleRefToken & operator=(ScExternalDoubleRefToken const &)=delete
virtual sal_uInt16 GetIndex() const override
Definition: token.cxx:771
virtual const ScSingleRefData * GetSingleRef() const override
Definition: token.cxx:632
formula::FormulaTokenRef mxAreaRefRPN
resulting RPN area
Definition: token.hxx:237
FormulaToken(StackVar eTypeP, OpCode e=ocPush)
ScSingleRefToken(ScSheetLimits &rLimits, const ScSingleRefData &r, OpCode e=ocPush)
Definition: token.hxx:65
virtual const svl::SharedString & GetString() const override
Definition: token.cxx:776
const ScSingleRefData & Ref1
Definition: token.hxx:444
void Assign(const ScMatrixCellResultToken &r)
Assign matrix result, keep matrix formula dimension.
Definition: token.cxx:1042
ScComplexRefData aDoubleRef
Definition: token.hxx:78
ScRefListToken(bool bArrayResult)
Definition: token.hxx:267
virtual const svl::SharedString & GetString() const override
Definition: token.cxx:839
virtual const ScSingleRefData * GetSingleRef() const override
Definition: token.cxx:781
ScComplexRefData aDub
Definition: token.hxx:402
Stores the matrix result at the formula cell, additionally the range the matrix formula occupies...
Definition: token.hxx:324
virtual sal_uInt16 GetIndex() const override
Definition: token.cxx:834
ScMatrixRef mpMatrix
Definition: token.hxx:114
bool mbArrayResult
Definition: token.hxx:263
virtual ~ScMatrixFormulaCellToken() override
Definition: token.cxx:1027
virtual FormulaToken * Clone() const override
Definition: token.hxx:290
Token storing matrix that represents values in sheet range.
Definition: token.hxx:112
virtual FormulaToken * Clone() const override
Definition: token.hxx:150
virtual const ScComplexRefData * GetDoubleRef() const override
Definition: token.cxx:634
svl::SharedString maString
Definition: token.hxx:382
Transports the result from the interpreter to the formula cell.
Definition: token.hxx:294
ScEmptyCellToken(bool bInheritedP, bool bDisplayAsString)
Definition: token.hxx:281
Item GetItem() const
Definition: token.cxx:891
virtual bool operator==(const formula::FormulaToken &rToken) const override
Definition: token.cxx:811
virtual double GetDouble() const override
Definition: token.cxx:1114
virtual ScMatrix * GetMatrix() override
Definition: token.cxx:988
virtual sal_Int16 GetSheet() const override
Definition: token.cxx:882
OpCode
virtual const ScSingleRefData * GetSingleRef() const
ScExternalNameToken()=delete
::boost::intrusive_ptr< ScMatrix > ScMatrixRef
Definition: types.hxx:25
Special token to remember details of ocTableRef "structured references".
Definition: token.hxx:203
virtual FormulaToken * Clone() const override
Definition: token.hxx:273
virtual FormulaToken * Clone() const override
Definition: token.hxx:228
ScMatrixRangeToken(const sc::RangeMatrix &rMat)
Definition: token.cxx:670
ScDoubleRefToken(ScSheetLimits &rLimits, const ScComplexRefData &r, OpCode e=ocPush)
Definition: token.hxx:80
void SetMatColsRows(SCCOL nC, SCROW nR)
Definition: token.hxx:337
DocumentType eType
virtual ~ScExternalNameToken() override
Definition: token.cxx:832
ScJumpMatrixToken(std::shared_ptr< ScJumpMatrix > p)
Definition: token.cxx:936
void AddItem(Item)
Definition: token.cxx:896
SCROW GetMatRows() const
Definition: token.hxx:348
ScConstMatrixRef xMatrix
Definition: token.hxx:301
SingleDoubleRefModifier(ScSingleRefData &rS)
Definition: token.hxx:426
virtual void SetIndex(sal_uInt16 n) override
Definition: token.cxx:877
virtual bool operator==(const formula::FormulaToken &rToken) const override
Definition: token.cxx:627
virtual sal_uInt16 GetIndex() const override
Definition: token.cxx:872
ScMatrixFormulaCellToken(SCCOL nC, SCROW nR, const ScConstMatrixRef &pMat, const formula::FormulaToken *pUL)
Definition: token.cxx:1011
virtual bool operator==(const formula::FormulaToken &rToken) const override
Definition: token.cxx:993
virtual const ScSingleRefData * GetSingleRef() const override
Definition: token.cxx:621
virtual const ScComplexRefData * GetDoubleRef() const
SingleDoubleRefModifier(formula::FormulaToken &rT)
Definition: token.hxx:410
virtual bool operator==(const formula::FormulaToken &rToken) const override
Definition: token.cxx:948
const formula::FormulaConstTokenRef & GetUpperLeftToken() const
Definition: token.hxx:318
ScExternalNameToken & operator=(ScExternalNameToken const &)=delete
ScComplexRefData maDoubleRef
Definition: token.hxx:157
sal_Int16 SCCOL
Definition: types.hxx:21
virtual FormulaToken * Clone() const override
Definition: token.hxx:254
virtual bool operator==(const formula::FormulaToken &rToken) const override
Definition: token.cxx:650
formula::FormulaToken * GetAreaRefRPN() const
Definition: token.cxx:906
virtual double GetDouble() const override
Definition: token.cxx:976
virtual FormulaToken * Clone() const override
Definition: token.cxx:1000
virtual const ScRefList * GetRefList() const override
Definition: token.cxx:647
ScSingleRefData Ref1
Definition: refdata.hxx:124
virtual bool operator==(const formula::FormulaToken &rToken) const override
Definition: token.cxx:665
::boost::intrusive_ptr< FormulaToken > FormulaTokenRef
ScSingleRefData Ref2
Definition: refdata.hxx:125
svExternalDoubleRef
svExternalSingleRef
ScExternalSingleRefToken & operator=(ScExternalSingleRefToken const &)=delete
virtual bool operator==(const formula::FormulaToken &rToken) const override
Definition: token.cxx:844
ScMatrixCellResultToken(const ScConstMatrixRef &pMat, const formula::FormulaToken *pUL)
Definition: token.cxx:971
virtual FormulaToken * Clone() const override
Definition: token.hxx:90
ScMatrixRef pMatrix
Definition: token.hxx:96
sal_uInt16 mnFileId
Definition: token.hxx:183
virtual bool operator==(const formula::FormulaToken &rToken) const override
Definition: token.cxx:964
virtual const ScMatrix * GetMatrix() const override
Definition: token.cxx:683
ScComplexRefData & Ref()
Definition: token.hxx:437
svSingleRef
virtual FormulaToken * Clone() const override
Definition: token.hxx:178
virtual bool operator==(const formula::FormulaToken &rToken) const override
Definition: token.cxx:745
svl::SharedString maTabName
Definition: token.hxx:132
virtual ~ScExternalDoubleRefToken() override
Definition: token.cxx:767
svDoubleRef
ScSingleRefData * pS
Definition: token.hxx:403
void ResetResult()
Reset matrix and upper left, keep matrix formula dimension.
Definition: token.cxx:1097
virtual const ScSingleRefData * GetSingleRef2() const override
Definition: token.cxx:636
ScMatrixToken(const ScMatrixRef &p)
Definition: token.cxx:658
sal_Int32 SCROW
Definition: types.hxx:17
virtual ~ScTableRefToken() override
Definition: token.cxx:870
virtual bool operator==(const formula::FormulaToken &rToken) const override
Definition: token.cxx:911
SCCOL GetMatCols() const
Definition: token.hxx:347
SingleDoubleRefModifier(const SingleDoubleRefModifier &)=delete
virtual sal_uInt8 GetByte() const override
Definition: token.cxx:678
virtual bool TextEqual(const formula::FormulaToken &rToken) const override
Definition: token.cxx:638
ScRefList aRefList
Definition: token.hxx:262
unsigned char sal_uInt8
virtual FormulaToken * Clone() const override
Definition: token.hxx:395
void GetMatColsRows(SCCOL &nC, SCROW &nR) const
Definition: token.hxx:342
void Assign(const ScMatrixCellResultToken &r)
Definition: token.cxx:1005
virtual sal_uInt16 GetIndex() const override
Definition: token.cxx:725
::boost::intrusive_ptr< const ScMatrix > ScConstMatrixRef
Definition: types.hxx:26
bool IsInherited() const
Definition: token.hxx:285
virtual const ScMatrix * GetMatrix() const override
Definition: token.cxx:663
virtual FormulaToken * Clone() const override
Definition: token.hxx:199
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:1073
bool IsDisplayedAsString() const
Definition: token.hxx:286
void CloneUpperLeftIfNecessary()
xUpperLeft is modifiable through SetUpperLeftDouble(), so clone it whenever an svDouble token is assi...
Definition: token.cxx:1036
virtual const svl::SharedString & GetString() const override
Definition: token.cxx:980
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:495
double mfDouble
Definition: token.hxx:381
virtual FormulaToken * Clone() const override
Definition: token.hxx:336
Complex reference (a range) into the sheet.
Definition: refdata.hxx:122
virtual FormulaToken * Clone() const override
Definition: token.cxx:708
bool bDisplayedAsString
Definition: token.hxx:279
virtual bool TextEqual(const formula::FormulaToken &rToken) const override
Definition: token.cxx:623
virtual FormulaToken * Clone() const override
Definition: token.hxx:104
virtual ScJumpMatrix * GetJumpMatrix() const override
Definition: token.cxx:943
ScComplexRefData maRef
Definition: token.hxx:115
ScHybridCellToken(double f, const svl::SharedString &rStr, const OUString &rFormula, bool bEmptyDisplayedAsString)
Definition: token.cxx:1103
svEmptyCell
virtual const ScComplexRefData * GetDoubleRef() const override
Definition: token.cxx:801
formula::FormulaConstTokenRef xUpperLeft
Definition: token.hxx:302
virtual bool operator==(const formula::FormulaToken &rToken) const override
Definition: token.cxx:703
::std::vector< ScComplexRefData > ScRefList
Definition: token.hxx:37
bool IsArrayResult() const
Definition: token.cxx:649
StackVar GetType() const
ScSingleRefData maSingleRef
Definition: token.hxx:133
virtual ~ScJumpMatrixToken() override
Definition: token.cxx:953
ScSingleRefData aSingleRef
Definition: token.hxx:63
ScSheetLimits & mrSheetLimits
Definition: token.hxx:62
const OUString & GetFormula() const
Definition: token.hxx:389
bool IsEmptyDisplayedAsString() const
Definition: token.hxx:390
virtual const svl::SharedString & GetString() const override
Definition: token.cxx:730
bool mbEmptyDisplayedAsString
Definition: token.hxx:384