LibreOffice Module sc (master)  1
tokenuno.cxx
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 #include <memory>
21 #include <tokenuno.hxx>
22 
23 #include <sal/macros.h>
24 #include <sal/log.hxx>
25 
26 #include <com/sun/star/sheet/ComplexReference.hpp>
27 #include <com/sun/star/sheet/ExternalReference.hpp>
28 #include <com/sun/star/sheet/ReferenceFlags.hpp>
29 #include <com/sun/star/sheet/AddressConvention.hpp>
30 #include <com/sun/star/sheet/NameToken.hpp>
31 #include <com/sun/star/table/CellAddress.hpp>
32 
33 #include <svl/itemprop.hxx>
34 #include <vcl/svapp.hxx>
35 #include <comphelper/string.hxx>
36 
37 #include <miscuno.hxx>
38 #include <convuno.hxx>
39 #include <unonames.hxx>
40 #include <compiler.hxx>
41 #include <tokenarray.hxx>
42 #include <docsh.hxx>
43 #include <rangeseq.hxx>
44 #include <externalrefmgr.hxx>
45 
46 using namespace ::formula;
47 using namespace ::com::sun::star;
48 
50 {
51  static const SfxItemPropertyMapEntry aFormulaParserMap_Impl[] =
52  {
58  { u"", 0, css::uno::Type(), 0, 0 }
59  };
60  return aFormulaParserMap_Impl;
61 }
62 
64  formula::FormulaGrammar::CONV_OOO, // <- AddressConvention::OOO
65  formula::FormulaGrammar::CONV_XL_A1, // <- AddressConvention::XL_A1
66  formula::FormulaGrammar::CONV_XL_R1C1, // <- AddressConvention::XL_R1C1
67  formula::FormulaGrammar::CONV_XL_OOX, // <- AddressConvention::XL_OOX
68  formula::FormulaGrammar::CONV_LOTUS_A1 // <- AddressConvention::LOTUS_A1
69 };
70 // sal_Int16 because of comparison of integer expressions below.
71 constexpr sal_Int16 nConvMapCount = SAL_N_ELEMENTS(aConvMap);
72 
73 
75 
77  mpDocShell( pDocSh ),
78  mnConv( sheet::AddressConvention::UNSPECIFIED ),
79  mbEnglish( false ),
80  mbIgnoreSpaces( true ),
81  mbCompileFAP( false )
82 {
83  mpDocShell->GetDocument().AddUnoObject(*this);
84 }
85 
87 {
89 
90  if (mpDocShell)
92 }
93 
95 {
96  if ( rHint.GetId() == SfxHintId::Dying )
97  mpDocShell = nullptr;
98 }
99 
100 // XFormulaParser
101 
103 {
105  if (mnConv >= 0 && mnConv < nConvMapCount)
106  eConv = aConvMap[mnConv];
107 
108  // If mxOpCodeMap is not empty it overrides mbEnglish, and vice versa. We
109  // don't need to initialize things twice.
110  if (mxOpCodeMap)
111  rCompiler.SetFormulaLanguage( mxOpCodeMap );
112  else
113  {
114  const sal_Int32 nFormulaLanguage = (eConv == formula::FormulaGrammar::CONV_XL_OOX ?
115  sheet::FormulaLanguage::OOXML :
116  (mbEnglish ? sheet::FormulaLanguage::ENGLISH : sheet::FormulaLanguage::NATIVE));
117  ScCompiler::OpCodeMapPtr xMap = rCompiler.GetOpCodeMap( nFormulaLanguage);
118  rCompiler.SetFormulaLanguage( xMap);
119  }
120 
121  rCompiler.SetRefConvention( eConv );
123  rCompiler.EnableStopOnError(!mbCompileFAP);
124 
125  rCompiler.SetExternalLinks( maExternalLinks);
126 }
127 
128 uno::Sequence<sheet::FormulaToken> SAL_CALL ScFormulaParserObj::parseFormula(
129  const OUString& aFormula, const table::CellAddress& rReferencePos )
130 {
131  SolarMutexGuard aGuard;
132  uno::Sequence<sheet::FormulaToken> aRet;
133 
134  if (mpDocShell)
135  {
136  ScDocument& rDoc = mpDocShell->GetDocument();
137  ScExternalRefManager::ApiGuard aExtRefGuard(rDoc);
138 
140  ScUnoConversion::FillScAddress( aRefPos, rReferencePos );
141  ScCompiler aCompiler( rDoc, aRefPos, rDoc.GetGrammar());
142  SetCompilerFlags( aCompiler );
143 
144  std::unique_ptr<ScTokenArray> pCode = aCompiler.CompileString( aFormula );
145  ScTokenConversion::ConvertToTokenSequence( rDoc, aRet, *pCode );
146  }
147 
148  return aRet;
149 }
150 
152  const uno::Sequence<sheet::FormulaToken>& aTokens, const table::CellAddress& rReferencePos )
153 {
154  SolarMutexGuard aGuard;
155  OUString aRet;
156 
157  if (mpDocShell)
158  {
159  ScDocument& rDoc = mpDocShell->GetDocument();
160  ScTokenArray aCode(rDoc);
161  (void)ScTokenConversion::ConvertToTokenArray( rDoc, aCode, aTokens );
163  ScUnoConversion::FillScAddress( aRefPos, rReferencePos );
164  ScCompiler aCompiler(rDoc, aRefPos, aCode, rDoc.GetGrammar());
165  SetCompilerFlags( aCompiler );
166 
167  OUStringBuffer aBuffer;
168  aCompiler.CreateStringFromTokenArray( aBuffer );
169  aRet = aBuffer.makeStringAndClear();
170  }
171 
172  return aRet;
173 }
174 
175 // XPropertySet
176 
177 uno::Reference<beans::XPropertySetInfo> SAL_CALL ScFormulaParserObj::getPropertySetInfo()
178 {
179  SolarMutexGuard aGuard;
180  static uno::Reference< beans::XPropertySetInfo > aRef(new SfxItemPropertySetInfo( lcl_GetFormulaParserMap() ));
181  return aRef;
182 }
183 
185  const OUString& aPropertyName, const uno::Any& aValue )
186 {
187  SolarMutexGuard aGuard;
188  if ( aPropertyName == SC_UNO_COMPILEFAP )
189  {
190  aValue >>= mbCompileFAP;
191  }
192  else if ( aPropertyName == SC_UNO_COMPILEENGLISH )
193  {
194  bool bOldEnglish = mbEnglish;
195  if (!(aValue >>= mbEnglish))
196  throw lang::IllegalArgumentException();
197 
198  // Need to recreate the symbol map to change English property
199  // because the map is const. So for performance reasons set
200  // CompileEnglish _before_ OpCodeMap!
201  if (mxOpCodeMap && mbEnglish != bOldEnglish)
202  {
203  ScDocument& rDoc = mpDocShell->GetDocument();
204  ScCompiler aCompiler( rDoc, ScAddress(), rDoc.GetGrammar());
206  }
207 
208  }
209  else if ( aPropertyName == SC_UNO_FORMULACONVENTION )
210  {
211  aValue >>= mnConv;
212 
213  bool bOldEnglish = mbEnglish;
214  if (mnConv >= 0 && mnConv < nConvMapCount
216  mbEnglish = true;
217 
218  // Same as for SC_UNO_COMPILEENGLISH, though an OpCodeMap should not
219  // had been set for CONV_XL_OOX.
220  if (mxOpCodeMap && mbEnglish != bOldEnglish)
221  {
222  ScDocument& rDoc = mpDocShell->GetDocument();
223  ScCompiler aCompiler( rDoc, ScAddress(), rDoc.GetGrammar());
225  }
226  }
227  else if ( aPropertyName == SC_UNO_IGNORELEADING )
228  {
229  aValue >>= mbIgnoreSpaces;
230  }
231  else if ( aPropertyName == SC_UNO_OPCODEMAP )
232  {
233  if (!(aValue >>= maOpCodeMapping))
234  throw lang::IllegalArgumentException();
235 
236  ScDocument& rDoc = mpDocShell->GetDocument();
237  ScCompiler aCompiler(rDoc, ScAddress(), rDoc.GetGrammar());
239 
240  }
241  else if ( aPropertyName == SC_UNO_EXTERNALLINKS )
242  {
243  if (!(aValue >>= maExternalLinks))
244  throw lang::IllegalArgumentException();
245  }
246  else
247  throw beans::UnknownPropertyException(aPropertyName);
248 }
249 
250 uno::Any SAL_CALL ScFormulaParserObj::getPropertyValue( const OUString& aPropertyName )
251 {
252  SolarMutexGuard aGuard;
253  uno::Any aRet;
254  if ( aPropertyName == SC_UNO_COMPILEFAP )
255  {
256  aRet <<= mbCompileFAP;
257  }
258  else if ( aPropertyName == SC_UNO_COMPILEENGLISH )
259  {
260  aRet <<= mbEnglish;
261  }
262  else if ( aPropertyName == SC_UNO_FORMULACONVENTION )
263  {
264  aRet <<= mnConv;
265  }
266  else if ( aPropertyName == SC_UNO_IGNORELEADING )
267  {
268  aRet <<= mbIgnoreSpaces;
269  }
270  else if ( aPropertyName == SC_UNO_OPCODEMAP )
271  {
272  aRet <<= maOpCodeMapping;
273  }
274  else if ( aPropertyName == SC_UNO_EXTERNALLINKS )
275  {
276  aRet <<= maExternalLinks;
277  }
278  else
279  throw beans::UnknownPropertyException(aPropertyName);
280  return aRet;
281 }
282 
284 
285 static void lcl_ExternalRefToApi( sheet::SingleReference& rAPI, const ScSingleRefData& rRef )
286 {
287  rAPI.Column = 0;
288  rAPI.Row = 0;
289  rAPI.Sheet = 0;
290  rAPI.RelativeColumn = 0;
291  rAPI.RelativeRow = 0;
292  rAPI.RelativeSheet = 0;
293 
294  sal_Int32 nFlags = 0;
295  if ( rRef.IsColRel() )
296  {
297  nFlags |= sheet::ReferenceFlags::COLUMN_RELATIVE;
298  rAPI.RelativeColumn = rRef.Col();
299  }
300  else
301  rAPI.Column = rRef.Col();
302 
303  if ( rRef.IsRowRel() )
304  {
305  nFlags |= sheet::ReferenceFlags::ROW_RELATIVE;
306  rAPI.RelativeRow = rRef.Row();
307  }
308  else
309  rAPI.Row = rRef.Row();
310 
311  if ( rRef.IsColDeleted() ) nFlags |= sheet::ReferenceFlags::COLUMN_DELETED;
312  if ( rRef.IsRowDeleted() ) nFlags |= sheet::ReferenceFlags::ROW_DELETED;
313  if ( rRef.IsFlag3D() ) nFlags |= sheet::ReferenceFlags::SHEET_3D;
314  if ( rRef.IsRelName() ) nFlags |= sheet::ReferenceFlags::RELATIVE_NAME;
315  rAPI.Flags = nFlags;
316 }
317 
318 static void lcl_SingleRefToApi( sheet::SingleReference& rAPI, const ScSingleRefData& rRef )
319 {
320  sal_Int32 nFlags = 0;
321  if ( rRef.IsColRel() )
322  {
323  nFlags |= sheet::ReferenceFlags::COLUMN_RELATIVE;
324  rAPI.RelativeColumn = rRef.Col();
325  rAPI.Column = 0;
326  }
327  else
328  {
329  rAPI.RelativeColumn = 0;
330  rAPI.Column = rRef.Col();
331  }
332 
333  if ( rRef.IsRowRel() )
334  {
335  nFlags |= sheet::ReferenceFlags::ROW_RELATIVE;
336  rAPI.RelativeRow = rRef.Row();
337  rAPI.Row = 0;
338  }
339  else
340  {
341  rAPI.RelativeRow = 0;
342  rAPI.Row = rRef.Row();
343  }
344 
345  if ( rRef.IsTabRel() )
346  {
347  nFlags |= sheet::ReferenceFlags::SHEET_RELATIVE;
348  rAPI.RelativeSheet = rRef.Tab();
349  rAPI.Sheet = 0;
350  }
351  else
352  {
353  rAPI.RelativeSheet = 0;
354  rAPI.Sheet = rRef.Tab();
355  }
356 
357  if ( rRef.IsColDeleted() ) nFlags |= sheet::ReferenceFlags::COLUMN_DELETED;
358  if ( rRef.IsRowDeleted() ) nFlags |= sheet::ReferenceFlags::ROW_DELETED;
359  if ( rRef.IsTabDeleted() ) nFlags |= sheet::ReferenceFlags::SHEET_DELETED;
360  if ( rRef.IsFlag3D() ) nFlags |= sheet::ReferenceFlags::SHEET_3D;
361  if ( rRef.IsRelName() ) nFlags |= sheet::ReferenceFlags::RELATIVE_NAME;
362  rAPI.Flags = nFlags;
363 }
364 
366  ScTokenArray& rTokenArray, const uno::Sequence<sheet::FormulaToken>& rSequence )
367 {
368  return !rTokenArray.Fill(rSequence, rDoc.GetSharedStringPool(), rDoc.GetExternalRefManager());
369 }
370 
372  uno::Sequence<sheet::FormulaToken>& rSequence, const ScTokenArray& rTokenArray )
373 {
374  sal_Int32 nLen = static_cast<sal_Int32>(rTokenArray.GetLen());
375  formula::FormulaToken** pTokens = rTokenArray.GetArray();
376  if ( pTokens )
377  {
378  rSequence.realloc(nLen);
379  for (sal_Int32 nPos=0; nPos<nLen; nPos++)
380  {
381  const formula::FormulaToken& rToken = *pTokens[nPos];
382  sheet::FormulaToken& rAPI = rSequence[nPos];
383 
384  OpCode eOpCode = rToken.GetOpCode();
385  // eOpCode may be changed in the following switch/case
386  switch ( rToken.GetType() )
387  {
388  case svByte:
389  // Only the count of spaces is stored as "long". Parameter count is ignored.
390  if ( eOpCode == ocSpaces )
391  rAPI.Data <<= static_cast<sal_Int32>(rToken.GetByte());
392  else if (eOpCode == ocWhitespace)
393  {
394  // Convention is one character repeated.
395  if (rToken.GetByte() == 1)
396  rAPI.Data <<= OUString( rToken.GetChar());
397  else
398  {
399  OUStringBuffer aBuf( rToken.GetByte());
400  comphelper::string::padToLength( aBuf, rToken.GetByte(), rToken.GetChar());
401  rAPI.Data <<= aBuf.makeStringAndClear();
402  }
403  }
404  else
405  rAPI.Data.clear(); // no data
406  break;
407  case formula::svDouble:
408  rAPI.Data <<= rToken.GetDouble();
409  break;
410  case formula::svString:
411  rAPI.Data <<= rToken.GetString().getString();
412  break;
413  case svExternal:
414  // Function name is stored as string.
415  // Byte (parameter count) is ignored.
416  rAPI.Data <<= rToken.GetExternal();
417  break;
418  case svSingleRef:
419  {
420  sheet::SingleReference aSingleRef;
421  lcl_SingleRefToApi( aSingleRef, *rToken.GetSingleRef() );
422  rAPI.Data <<= aSingleRef;
423  }
424  break;
426  {
427  sheet::ComplexReference aCompRef;
428  lcl_SingleRefToApi( aCompRef.Reference1, *rToken.GetSingleRef() );
429  lcl_SingleRefToApi( aCompRef.Reference2, *rToken.GetSingleRef2() );
430  rAPI.Data <<= aCompRef;
431  }
432  break;
433  case svIndex:
434  {
435  sheet::NameToken aNameToken;
436  aNameToken.Index = static_cast<sal_Int32>( rToken.GetIndex() );
437  aNameToken.Sheet = rToken.GetSheet();
438  rAPI.Data <<= aNameToken;
439  }
440  break;
441  case svMatrix:
442  if (!ScRangeToSequence::FillMixedArray( rAPI.Data, rToken.GetMatrix(), true))
443  rAPI.Data.clear();
444  break;
445  case svExternalSingleRef:
446  {
447  sheet::SingleReference aSingleRef;
448  lcl_ExternalRefToApi( aSingleRef, *rToken.GetSingleRef() );
449  size_t nCacheId;
451  rToken.GetIndex(), rToken.GetString().getString(), false, &nCacheId);
452  aSingleRef.Sheet = static_cast< sal_Int32 >( nCacheId );
453  sheet::ExternalReference aExtRef;
454  aExtRef.Index = rToken.GetIndex();
455  aExtRef.Reference <<= aSingleRef;
456  rAPI.Data <<= aExtRef;
457  eOpCode = ocPush;
458  }
459  break;
460  case svExternalDoubleRef:
461  {
462  sheet::ComplexReference aComplRef;
463  lcl_ExternalRefToApi( aComplRef.Reference1, *rToken.GetSingleRef() );
464  lcl_ExternalRefToApi( aComplRef.Reference2, *rToken.GetSingleRef2() );
465  size_t nCacheId;
467  rToken.GetIndex(), rToken.GetString().getString(), false, &nCacheId);
468  aComplRef.Reference1.Sheet = static_cast< sal_Int32 >( nCacheId );
469  // NOTE: This assumes that cached sheets are in consecutive order!
470  aComplRef.Reference2.Sheet =
471  aComplRef.Reference1.Sheet +
472  (rToken.GetSingleRef2()->Tab() - rToken.GetSingleRef()->Tab());
473  sheet::ExternalReference aExtRef;
474  aExtRef.Index = rToken.GetIndex();
475  aExtRef.Reference <<= aComplRef;
476  rAPI.Data <<= aExtRef;
477  eOpCode = ocPush;
478  }
479  break;
480  case svExternalName:
481  {
482  sheet::ExternalReference aExtRef;
483  aExtRef.Index = rToken.GetIndex();
484  aExtRef.Reference <<= rToken.GetString().getString();
485  rAPI.Data <<= aExtRef;
486  eOpCode = ocPush;
487  }
488  break;
489  default:
490  SAL_WARN("sc", "ScTokenConversion::ConvertToTokenSequence: unhandled token type " << StackVarEnumToString(rToken.GetType()));
491  [[fallthrough]];
492  case svJump: // occurs with ocIf, ocChoose
493  case svError: // seems to be fairly common, and probably not exceptional and not worth a warning?
494  case svMissing: // occurs with ocMissing
495  case svSep: // occurs with ocSep, ocOpen, ocClose, ocArray*
496  rAPI.Data.clear(); // no data
497  }
498  rAPI.OpCode = static_cast<sal_Int32>(eOpCode);
499  }
500  }
501  else
502  rSequence.realloc(0);
503 }
504 
505 ScFormulaOpCodeMapperObj::ScFormulaOpCodeMapperObj(::std::unique_ptr<formula::FormulaCompiler> && _pCompiler)
506 : formula::FormulaOpCodeMapperObj(std::move(_pCompiler))
507 {
508 }
509 
510 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool IsTabRel() const
Definition: refdata.hxx:69
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
Definition: tokenuno.cxx:184
SCCOL Col() const
Definition: refdata.cxx:247
bool IsTabDeleted() const
Definition: refdata.hxx:86
OUString getString() const
SC_DLLPUBLIC svl::SharedStringPool & GetSharedStringPool()
Definition: documen2.cxx:565
#define SC_UNO_EXTERNALLINKS
Definition: unonames.hxx:675
#define SC_SERVICENAME_FORMULAPARS
Definition: unonames.hxx:29
svSep
Single reference (one address) into the sheet.
Definition: refdata.hxx:29
void SetCompilerFlags(ScCompiler &rCompiler) const
Definition: tokenuno.cxx:102
bool Fill(const css::uno::Sequence< css::sheet::FormulaToken > &rSequence, svl::SharedStringPool &rSPool, ExternalReferenceHelper *pExtRef)
aBuf
constexpr sal_Int16 nConvMapCount
Definition: tokenuno.cxx:71
#define SC_UNO_COMPILEFAP
Definition: unonames.hxx:676
#define SC_UNO_FORMULACONVENTION
Definition: unonames.hxx:672
virtual double GetDouble() const
void SetExternalLinks(const css::uno::Sequence< css::sheet::ExternalLinkInfo > &rLinks)
Set external link info for ScAddress::CONV_XL_OOX.
Definition: compiler.hxx:457
OpCode GetOpCode() const
SC_DLLPUBLIC formula::FormulaGrammar::Grammar GetGrammar() const
Definition: document.hxx:984
ocSpaces
#define SC_UNO_IGNORELEADING
Definition: unonames.hxx:673
svExternalName
SfxHintId GetId() const
virtual css::uno::Sequence< css::sheet::FormulaToken > SAL_CALL parseFormula(const OUString &aFormula, const css::table::CellAddress &rReferencePos) override
Definition: tokenuno.cxx:128
virtual sal_Int16 GetSheet() const
static void lcl_SingleRefToApi(sheet::SingleReference &rAPI, const ScSingleRefData &rRef)
Definition: tokenuno.cxx:318
svError
virtual const ScMatrix * GetMatrix() const
ScDocShell * mpDocShell
Definition: tokenuno.hxx:60
virtual const OUString & GetExternal() const
OpCode
virtual const ScSingleRefData * GetSingleRef() const
SC_DLLPUBLIC ScExternalRefManager * GetExternalRefManager() const
Definition: documen3.cxx:623
sal_Int16 mnConv
Definition: tokenuno.hxx:61
bool IsColRel() const
Definition: refdata.hxx:65
virtual sal_uInt8 GetByte() const
static bool FillMixedArray(css::uno::Any &rAny, ScDocument &rDoc, const ScRange &rRange, bool bAllowNV=false)
std::string StackVarEnumToString(StackVar const e)
OpCodeMapPtr GetOpCodeMap(const sal_Int32 nLanguage) const
sal_uInt16 GetLen() const
#define SAL_N_ELEMENTS(arr)
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
Definition: tokenuno.cxx:250
ocWhitespace
virtual sal_Unicode GetChar() const
#define SC_UNO_OPCODEMAP
Definition: unonames.hxx:674
css::uno::Sequence< css::sheet::ExternalLinkInfo > maExternalLinks
Definition: tokenuno.hxx:58
static void lcl_ExternalRefToApi(sheet::SingleReference &rAPI, const ScSingleRefData &rRef)
Definition: tokenuno.cxx:285
ocPush
svIndex
void EnableJumpCommandReorder(bool bEnable)
static SC_DLLPUBLIC void ConvertToTokenSequence(const ScDocument &rDoc, css::uno::Sequence< css::sheet::FormulaToken > &rSequence, const ScTokenArray &rTokenArray)
Definition: tokenuno.cxx:371
float u
svByte
svExternalDoubleRef
static SC_DLLPUBLIC bool ConvertToTokenArray(ScDocument &rDoc, ScTokenArray &rTokenArray, const css::uno::Sequence< css::sheet::FormulaToken > &rSequence)
Definition: tokenuno.cxx:365
FormulaToken ** GetArray() const
svExternalSingleRef
ScExternalRefCache::TableTypeRef getCacheTable(sal_uInt16 nFileId, size_t nTabIndex) const
Get a cache table instance for specified table and table index.
bool IsRowRel() const
Definition: refdata.hxx:67
css::uno::Type const & get()
#define SC_SIMPLE_SERVICE_INFO(ClassName, ClassNameAscii, ServiceAscii)
Definition: miscuno.hxx:63
static void FillScAddress(ScAddress &rScAddress, const css::table::CellAddress &rApiAddress)
Definition: convuno.hxx:63
SCTAB Tab() const
Definition: refdata.cxx:254
ScFormulaOpCodeMapperObj(::std::unique_ptr< formula::FormulaCompiler > &&_pCompiler)
Definition: tokenuno.cxx:505
void EnableStopOnError(bool bEnable)
virtual sal_uInt16 GetIndex() const
svSingleRef
bool IsFlag3D() const
Definition: refdata.hxx:90
#define SC_IMPL_DUMMY_PROPERTY_LISTENER(ClassName)
Definition: miscuno.hxx:72
svJump
void SetFormulaLanguage(const OpCodeMapPtr &xMap)
Set symbol map if not empty.
Definition: compiler.cxx:283
void SetRefConvention(const Convention *pConvP)
Definition: compiler.cxx:2021
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
Definition: tokenuno.cxx:177
#define SC_UNO_COMPILEENGLISH
Definition: unonames.hxx:671
virtual ~ScFormulaParserObj() override
Definition: tokenuno.cxx:86
std::unique_ptr< char[]> aBuffer
ScCompiler::OpCodeMapPtr mxOpCodeMap
Definition: tokenuno.hxx:59
virtual const ScSingleRefData * GetSingleRef2() const
virtual const svl::SharedString & GetString() const
static OpCodeMapPtr CreateOpCodeMap(const css::uno::Sequence< const css::sheet::FormulaOpCodeMapEntry > &rMapping, bool bEnglish)
svMatrix
svExternal
void RemoveUnoObject(SfxListener &rObject)
Definition: documen3.cxx:906
SCROW Row() const
Definition: refdata.cxx:240
const ScDocument & GetDocument() const
Definition: docsh.hxx:216
bool IsRelName() const
Definition: refdata.hxx:92
virtual OUString SAL_CALL printFormula(const css::uno::Sequence< css::sheet::FormulaToken > &aTokens, const css::table::CellAddress &rReferencePos) override
Definition: tokenuno.cxx:151
static const SfxItemPropertyMapEntry * lcl_GetFormulaParserMap()
Definition: tokenuno.cxx:49
#define SAL_WARN(area, stream)
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
Definition: tokenuno.cxx:94
std::shared_ptr< const OpCodeMap > OpCodeMapPtr
bool IsRowDeleted() const
Definition: refdata.hxx:84
svMissing
StackVar GetType() const
css::uno::Sequence< const css::sheet::FormulaOpCodeMapEntry > maOpCodeMapping
Definition: tokenuno.hxx:57
const formula::FormulaGrammar::AddressConvention aConvMap[]
Definition: tokenuno.cxx:63
sal_uInt16 nPos
bool IsColDeleted() const
Definition: refdata.hxx:82
Use this guard when performing something from the API that might query values from external reference...
OStringBuffer & padToLength(OStringBuffer &rBuffer, sal_Int32 nLength, char cFill= '\0')
typedef void(CALLTYPE *GetFuncDataPtr)(sal_uInt16 &nNo