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
46using namespace ::formula;
47using namespace ::com::sun::star;
48
50{
51 static const SfxItemPropertyMapEntry aFormulaParserMap_Impl[] =
52 {
56 { SC_UNO_FORMULACONVENTION, 0, cppu::UnoType<decltype(sheet::AddressConvention::UNSPECIFIED)>::get(), 0, 0 },
58 };
59 return aFormulaParserMap_Impl;
60}
61
63 formula::FormulaGrammar::CONV_OOO, // <- AddressConvention::OOO
64 formula::FormulaGrammar::CONV_XL_A1, // <- AddressConvention::XL_A1
65 formula::FormulaGrammar::CONV_XL_R1C1, // <- AddressConvention::XL_R1C1
66 formula::FormulaGrammar::CONV_XL_OOX, // <- AddressConvention::XL_OOX
67 formula::FormulaGrammar::CONV_LOTUS_A1 // <- AddressConvention::LOTUS_A1
68};
69// sal_Int16 because of comparison of integer expressions below.
70constexpr sal_Int16 nConvMapCount = SAL_N_ELEMENTS(aConvMap);
71
72
74
76 mpDocShell( pDocSh ),
77 mnConv( sheet::AddressConvention::UNSPECIFIED ),
78 mbEnglish( false ),
79 mbIgnoreSpaces( true ),
80 mbCompileFAP( false ),
81 mbRefConventionChartOOXML( 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 );
124
127}
128
129uno::Sequence<sheet::FormulaToken> SAL_CALL ScFormulaParserObj::parseFormula(
130 const OUString& aFormula, const table::CellAddress& rReferencePos )
131{
132 SolarMutexGuard aGuard;
133 uno::Sequence<sheet::FormulaToken> aRet;
134
135 if (mpDocShell)
136 {
138 ScExternalRefManager::ApiGuard aExtRefGuard(rDoc);
139
141 ScUnoConversion::FillScAddress( aRefPos, rReferencePos );
142 ScCompiler aCompiler( rDoc, aRefPos, rDoc.GetGrammar());
143 SetCompilerFlags( aCompiler );
144
145 std::unique_ptr<ScTokenArray> pCode = aCompiler.CompileString( aFormula );
146 ScTokenConversion::ConvertToTokenSequence( rDoc, aRet, *pCode );
147 }
148
149 return aRet;
150}
151
153 const uno::Sequence<sheet::FormulaToken>& aTokens, const table::CellAddress& rReferencePos )
154{
155 SolarMutexGuard aGuard;
156 OUString aRet;
157
158 if (mpDocShell)
159 {
161 ScTokenArray aCode(rDoc);
162 (void)ScTokenConversion::ConvertToTokenArray( rDoc, aCode, aTokens );
164 ScUnoConversion::FillScAddress( aRefPos, rReferencePos );
165 ScCompiler aCompiler(rDoc, aRefPos, aCode, rDoc.GetGrammar());
166 SetCompilerFlags( aCompiler );
167
168 OUStringBuffer aBuffer;
170 aRet = aBuffer.makeStringAndClear();
171 }
172
173 return aRet;
174}
175
176// XPropertySet
177
178uno::Reference<beans::XPropertySetInfo> SAL_CALL ScFormulaParserObj::getPropertySetInfo()
179{
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 {
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 {
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
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 if ( aPropertyName == SC_UNO_REF_CONV_CHARTOOXML )
247 {
248 if (!(aValue >>= mbRefConventionChartOOXML))
249 throw lang::IllegalArgumentException();
250 }
251 else
252 throw beans::UnknownPropertyException(aPropertyName);
253}
254
255uno::Any SAL_CALL ScFormulaParserObj::getPropertyValue( const OUString& aPropertyName )
256{
257 SolarMutexGuard aGuard;
258 uno::Any aRet;
259 if ( aPropertyName == SC_UNO_COMPILEFAP )
260 {
261 aRet <<= mbCompileFAP;
262 }
263 else if ( aPropertyName == SC_UNO_COMPILEENGLISH )
264 {
265 aRet <<= mbEnglish;
266 }
267 else if ( aPropertyName == SC_UNO_FORMULACONVENTION )
268 {
269 aRet <<= mnConv;
270 }
271 else if ( aPropertyName == SC_UNO_IGNORELEADING )
272 {
273 aRet <<= mbIgnoreSpaces;
274 }
275 else if ( aPropertyName == SC_UNO_OPCODEMAP )
276 {
277 aRet <<= maOpCodeMapping;
278 }
279 else if ( aPropertyName == SC_UNO_EXTERNALLINKS )
280 {
281 aRet <<= maExternalLinks;
282 }
283 else if ( aPropertyName == SC_UNO_REF_CONV_CHARTOOXML )
284 {
286 }
287 else
288 throw beans::UnknownPropertyException(aPropertyName);
289 return aRet;
290}
291
293
294static void lcl_ExternalRefToApi( sheet::SingleReference& rAPI, const ScSingleRefData& rRef )
295{
296 rAPI.Column = 0;
297 rAPI.Row = 0;
298 rAPI.Sheet = 0;
299 rAPI.RelativeColumn = 0;
300 rAPI.RelativeRow = 0;
301 rAPI.RelativeSheet = 0;
302
303 sal_Int32 nFlags = 0;
304 if ( rRef.IsColRel() )
305 {
306 nFlags |= sheet::ReferenceFlags::COLUMN_RELATIVE;
307 rAPI.RelativeColumn = rRef.Col();
308 }
309 else
310 rAPI.Column = rRef.Col();
311
312 if ( rRef.IsRowRel() )
313 {
314 nFlags |= sheet::ReferenceFlags::ROW_RELATIVE;
315 rAPI.RelativeRow = rRef.Row();
316 }
317 else
318 rAPI.Row = rRef.Row();
319
320 if ( rRef.IsColDeleted() ) nFlags |= sheet::ReferenceFlags::COLUMN_DELETED;
321 if ( rRef.IsRowDeleted() ) nFlags |= sheet::ReferenceFlags::ROW_DELETED;
322 if ( rRef.IsFlag3D() ) nFlags |= sheet::ReferenceFlags::SHEET_3D;
323 if ( rRef.IsRelName() ) nFlags |= sheet::ReferenceFlags::RELATIVE_NAME;
324 rAPI.Flags = nFlags;
325}
326
327static void lcl_SingleRefToApi( sheet::SingleReference& rAPI, const ScSingleRefData& rRef )
328{
329 sal_Int32 nFlags = 0;
330 if ( rRef.IsColRel() )
331 {
332 nFlags |= sheet::ReferenceFlags::COLUMN_RELATIVE;
333 rAPI.RelativeColumn = rRef.Col();
334 rAPI.Column = 0;
335 }
336 else
337 {
338 rAPI.RelativeColumn = 0;
339 rAPI.Column = rRef.Col();
340 }
341
342 if ( rRef.IsRowRel() )
343 {
344 nFlags |= sheet::ReferenceFlags::ROW_RELATIVE;
345 rAPI.RelativeRow = rRef.Row();
346 rAPI.Row = 0;
347 }
348 else
349 {
350 rAPI.RelativeRow = 0;
351 rAPI.Row = rRef.Row();
352 }
353
354 if ( rRef.IsTabRel() )
355 {
356 nFlags |= sheet::ReferenceFlags::SHEET_RELATIVE;
357 rAPI.RelativeSheet = rRef.Tab();
358 rAPI.Sheet = 0;
359 }
360 else
361 {
362 rAPI.RelativeSheet = 0;
363 rAPI.Sheet = rRef.Tab();
364 }
365
366 if ( rRef.IsColDeleted() ) nFlags |= sheet::ReferenceFlags::COLUMN_DELETED;
367 if ( rRef.IsRowDeleted() ) nFlags |= sheet::ReferenceFlags::ROW_DELETED;
368 if ( rRef.IsTabDeleted() ) nFlags |= sheet::ReferenceFlags::SHEET_DELETED;
369 if ( rRef.IsFlag3D() ) nFlags |= sheet::ReferenceFlags::SHEET_3D;
370 if ( rRef.IsRelName() ) nFlags |= sheet::ReferenceFlags::RELATIVE_NAME;
371 rAPI.Flags = nFlags;
372}
373
375 ScTokenArray& rTokenArray, const uno::Sequence<sheet::FormulaToken>& rSequence )
376{
377 return !rTokenArray.Fill(rSequence, rDoc.GetSharedStringPool(), rDoc.GetExternalRefManager());
378}
379
381 uno::Sequence<sheet::FormulaToken>& rSequence, const ScTokenArray& rTokenArray )
382{
383 sal_Int32 nLen = static_cast<sal_Int32>(rTokenArray.GetLen());
384 formula::FormulaToken** pTokens = rTokenArray.GetArray();
385 if ( pTokens )
386 {
387 rSequence.realloc(nLen);
388 auto pSequence = rSequence.getArray();
389 for (sal_Int32 nPos=0; nPos<nLen; nPos++)
390 {
391 const formula::FormulaToken& rToken = *pTokens[nPos];
392 sheet::FormulaToken& rAPI = pSequence[nPos];
393
394 OpCode eOpCode = rToken.GetOpCode();
395 // eOpCode may be changed in the following switch/case
396 switch ( rToken.GetType() )
397 {
398 case svByte:
399 // Only the count of spaces is stored as "long". Parameter count is ignored.
400 if ( eOpCode == ocSpaces )
401 rAPI.Data <<= static_cast<sal_Int32>(rToken.GetByte());
402 else if (eOpCode == ocWhitespace)
403 {
404 // Convention is one character repeated.
405 if (rToken.GetByte() == 1)
406 rAPI.Data <<= OUString( rToken.GetChar());
407 else
408 {
409 OUStringBuffer aBuf( rToken.GetByte());
411 rAPI.Data <<= aBuf.makeStringAndClear();
412 }
413 }
414 else
415 rAPI.Data.clear(); // no data
416 break;
418 rAPI.Data <<= rToken.GetDouble();
419 break;
421 rAPI.Data <<= rToken.GetString().getString();
422 break;
423 case svExternal:
424 // Function name is stored as string.
425 // Byte (parameter count) is ignored.
426 rAPI.Data <<= rToken.GetExternal();
427 break;
428 case svSingleRef:
429 {
430 sheet::SingleReference aSingleRef;
431 lcl_SingleRefToApi( aSingleRef, *rToken.GetSingleRef() );
432 rAPI.Data <<= aSingleRef;
433 }
434 break;
436 {
437 sheet::ComplexReference aCompRef;
438 lcl_SingleRefToApi( aCompRef.Reference1, *rToken.GetSingleRef() );
439 lcl_SingleRefToApi( aCompRef.Reference2, *rToken.GetSingleRef2() );
440 rAPI.Data <<= aCompRef;
441 }
442 break;
443 case svIndex:
444 {
445 sheet::NameToken aNameToken;
446 aNameToken.Index = static_cast<sal_Int32>( rToken.GetIndex() );
447 aNameToken.Sheet = rToken.GetSheet();
448 rAPI.Data <<= aNameToken;
449 }
450 break;
451 case svMatrix:
452 if (!ScRangeToSequence::FillMixedArray( rAPI.Data, rToken.GetMatrix(), true))
453 rAPI.Data.clear();
454 break;
456 {
457 sheet::SingleReference aSingleRef;
458 lcl_ExternalRefToApi( aSingleRef, *rToken.GetSingleRef() );
459 size_t nCacheId;
461 rToken.GetIndex(), rToken.GetString().getString(), false, &nCacheId);
462 aSingleRef.Sheet = static_cast< sal_Int32 >( nCacheId );
463 sheet::ExternalReference aExtRef;
464 aExtRef.Index = rToken.GetIndex();
465 aExtRef.Reference <<= aSingleRef;
466 rAPI.Data <<= aExtRef;
467 eOpCode = ocPush;
468 }
469 break;
471 {
472 sheet::ComplexReference aComplRef;
473 lcl_ExternalRefToApi( aComplRef.Reference1, *rToken.GetSingleRef() );
474 lcl_ExternalRefToApi( aComplRef.Reference2, *rToken.GetSingleRef2() );
475 size_t nCacheId;
477 rToken.GetIndex(), rToken.GetString().getString(), false, &nCacheId);
478 aComplRef.Reference1.Sheet = static_cast< sal_Int32 >( nCacheId );
479 // NOTE: This assumes that cached sheets are in consecutive order!
480 aComplRef.Reference2.Sheet =
481 aComplRef.Reference1.Sheet +
482 (rToken.GetSingleRef2()->Tab() - rToken.GetSingleRef()->Tab());
483 sheet::ExternalReference aExtRef;
484 aExtRef.Index = rToken.GetIndex();
485 aExtRef.Reference <<= aComplRef;
486 rAPI.Data <<= aExtRef;
487 eOpCode = ocPush;
488 }
489 break;
490 case svExternalName:
491 {
492 sheet::ExternalReference aExtRef;
493 aExtRef.Index = rToken.GetIndex();
494 aExtRef.Reference <<= rToken.GetString().getString();
495 rAPI.Data <<= aExtRef;
496 eOpCode = ocPush;
497 }
498 break;
499 default:
500 SAL_WARN("sc", "ScTokenConversion::ConvertToTokenSequence: unhandled token type " << StackVarEnumToString(rToken.GetType()));
501 [[fallthrough]];
502 case svJump: // occurs with ocIf, ocChoose
503 case svError: // seems to be fairly common, and probably not exceptional and not worth a warning?
504 case svMissing: // occurs with ocMissing
505 case svSep: // occurs with ocSep, ocOpen, ocClose, ocArray*
506 rAPI.Data.clear(); // no data
507 }
508 rAPI.OpCode = static_cast<sal_Int32>(eOpCode);
509 }
510 }
511 else
512 rSequence.realloc(0);
513}
514
515ScFormulaOpCodeMapperObj::ScFormulaOpCodeMapperObj(::std::unique_ptr<formula::FormulaCompiler> && _pCompiler)
516: formula::FormulaOpCodeMapperObj(std::move(_pCompiler))
517{
518}
519
520/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
@ UNINITIALIZED
Definition: address.hxx:220
void SetFormulaLanguage(const OpCodeMapPtr &xMap)
Set symbol map if not empty.
Definition: compiler.cxx:316
void SetExternalLinks(const css::uno::Sequence< css::sheet::ExternalLinkInfo > &rLinks)
Set external link info for ScAddress::CONV_XL_OOX.
Definition: compiler.hxx:468
void SetRefConventionChartOOXML(bool bVal)
Definition: compiler.hxx:434
void SetRefConvention(const Convention *pConvP)
Definition: compiler.cxx:2049
OpCodeMapPtr GetOpCodeMap(const sal_Int32 nLanguage) const
Overwrite FormulaCompiler::GetOpCodeMap() forwarding to GetFinalOpCodeMap().
Definition: compiler.hxx:443
std::unique_ptr< ScTokenArray > CompileString(const OUString &rFormula)
Tokenize formula expression string into an array of tokens.
Definition: compiler.cxx:4691
const ScDocument & GetDocument() const
Definition: docsh.hxx:219
SC_DLLPUBLIC ScExternalRefManager * GetExternalRefManager() const
Definition: documen3.cxx:625
SC_DLLPUBLIC formula::FormulaGrammar::Grammar GetGrammar() const
Definition: document.hxx:1010
SC_DLLPUBLIC svl::SharedStringPool & GetSharedStringPool()
Definition: documen2.cxx:601
void RemoveUnoObject(SfxListener &rObject)
Definition: documen3.cxx:909
Use this guard when performing something from the API that might query values from external reference...
ScExternalRefCache::TableTypeRef getCacheTable(sal_uInt16 nFileId, size_t nTabIndex) const
Get a cache table instance for specified table and table index.
ScFormulaOpCodeMapperObj(::std::unique_ptr< formula::FormulaCompiler > &&_pCompiler)
Definition: tokenuno.cxx:515
ScDocShell * mpDocShell
Definition: tokenuno.hxx:60
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
Definition: tokenuno.cxx:255
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
Definition: tokenuno.cxx:94
css::uno::Sequence< const css::sheet::FormulaOpCodeMapEntry > maOpCodeMapping
Definition: tokenuno.hxx:57
ScCompiler::OpCodeMapPtr mxOpCodeMap
Definition: tokenuno.hxx:59
virtual OUString SAL_CALL printFormula(const css::uno::Sequence< css::sheet::FormulaToken > &aTokens, const css::table::CellAddress &rReferencePos) override
Definition: tokenuno.cxx:152
css::uno::Sequence< css::sheet::ExternalLinkInfo > maExternalLinks
Definition: tokenuno.hxx:58
void SetCompilerFlags(ScCompiler &rCompiler) const
Definition: tokenuno.cxx:102
bool mbRefConventionChartOOXML
Definition: tokenuno.hxx:65
virtual ~ScFormulaParserObj() override
Definition: tokenuno.cxx:86
virtual css::uno::Sequence< css::sheet::FormulaToken > SAL_CALL parseFormula(const OUString &aFormula, const css::table::CellAddress &rReferencePos) override
Definition: tokenuno.cxx:129
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
Definition: tokenuno.cxx:178
sal_Int16 mnConv
Definition: tokenuno.hxx:61
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
Definition: tokenuno.cxx:184
static bool FillMixedArray(css::uno::Any &rAny, ScDocument &rDoc, const ScRange &rRange, bool bAllowNV=false)
static SC_DLLPUBLIC void ConvertToTokenSequence(const ScDocument &rDoc, css::uno::Sequence< css::sheet::FormulaToken > &rSequence, const ScTokenArray &rTokenArray)
Definition: tokenuno.cxx:380
static SC_DLLPUBLIC bool ConvertToTokenArray(ScDocument &rDoc, ScTokenArray &rTokenArray, const css::uno::Sequence< css::sheet::FormulaToken > &rSequence)
Definition: tokenuno.cxx:374
static void FillScAddress(ScAddress &rScAddress, const css::table::CellAddress &rApiAddress)
Definition: convuno.hxx:63
SfxHintId GetId() const
css::uno::Type const & get()
void EnableStopOnError(bool bEnable)
void EnableJumpCommandReorder(bool bEnable)
static OpCodeMapPtr CreateOpCodeMap(const css::uno::Sequence< const css::sheet::FormulaOpCodeMapEntry > &rMapping, bool bEnglish)
void CreateStringFromTokenArray(OUString &rFormula)
std::shared_ptr< const OpCodeMap > OpCodeMapPtr
sal_uInt16 GetLen() const
FormulaToken ** GetArray() const
bool Fill(const css::uno::Sequence< css::sheet::FormulaToken > &rSequence, svl::SharedStringPool &rSPool, ExternalReferenceHelper *pExtRef)
virtual const ScSingleRefData * GetSingleRef() const
virtual sal_uInt8 GetByte() const
virtual const ScSingleRefData * GetSingleRef2() const
virtual sal_uInt16 GetIndex() const
virtual sal_Int16 GetSheet() const
virtual const OUString & GetExternal() const
OpCode GetOpCode() const
virtual sal_Unicode GetChar() const
StackVar GetType() const
virtual const svl::SharedString & GetString() const
virtual const ScMatrix * GetMatrix() const
virtual double GetDouble() const
const OUString & getString() const
sal_uInt16 nPos
#define SAL_WARN(area, stream)
#define SAL_N_ELEMENTS(arr)
aBuf
#define SC_SIMPLE_SERVICE_INFO(ClassName, ClassNameAscii, ServiceAscii)
Definition: miscuno.hxx:63
#define SC_IMPL_DUMMY_PROPERTY_LISTENER(ClassName)
Definition: miscuno.hxx:72
OStringBuffer & padToLength(OStringBuffer &rBuffer, sal_Int32 nLength, char cFill='\0')
svMissing
svIndex
svExternalDoubleRef
svExternalName
svSep
svError
svExternal
svExternalSingleRef
svJump
svMatrix
svByte
svSingleRef
std::string StackVarEnumToString(StackVar const e)
OpCode
ocSpaces
ocPush
ocWhitespace
Single reference (one address) into the sheet.
Definition: refdata.hxx:30
SCCOL Col() const
Definition: refdata.cxx:247
bool IsRowDeleted() const
Definition: refdata.hxx:84
SCTAB Tab() const
Definition: refdata.cxx:254
bool IsTabRel() const
Definition: refdata.hxx:69
SCROW Row() const
Definition: refdata.cxx:240
bool IsRowRel() const
Definition: refdata.hxx:67
bool IsColRel() const
Definition: refdata.hxx:65
bool IsTabDeleted() const
Definition: refdata.hxx:86
bool IsFlag3D() const
Definition: refdata.hxx:90
bool IsColDeleted() const
Definition: refdata.hxx:82
bool IsRelName() const
Definition: refdata.hxx:92
static o3tl::span< const SfxItemPropertyMapEntry > lcl_GetFormulaParserMap()
Definition: tokenuno.cxx:49
static void lcl_SingleRefToApi(sheet::SingleReference &rAPI, const ScSingleRefData &rRef)
Definition: tokenuno.cxx:327
static void lcl_ExternalRefToApi(sheet::SingleReference &rAPI, const ScSingleRefData &rRef)
Definition: tokenuno.cxx:294
const formula::FormulaGrammar::AddressConvention aConvMap[]
Definition: tokenuno.cxx:62
constexpr sal_Int16 nConvMapCount
Definition: tokenuno.cxx:70
constexpr OUStringLiteral SC_SERVICENAME_FORMULAPARS
Definition: unonames.hxx:31
constexpr OUStringLiteral SC_UNO_REF_CONV_CHARTOOXML
Definition: unonames.hxx:691
constexpr OUStringLiteral SC_UNO_OPCODEMAP
Definition: unonames.hxx:688
constexpr OUStringLiteral SC_UNO_COMPILEENGLISH
Definition: unonames.hxx:685
constexpr OUStringLiteral SC_UNO_COMPILEFAP
Definition: unonames.hxx:690
constexpr OUStringLiteral SC_UNO_EXTERNALLINKS
Definition: unonames.hxx:689
constexpr OUStringLiteral SC_UNO_FORMULACONVENTION
Definition: unonames.hxx:686
constexpr OUStringLiteral SC_UNO_IGNORELEADING
Definition: unonames.hxx:687
std::unique_ptr< char[]> aBuffer