LibreOffice Module sc (master) 1
|
#include <compiler.hxx>
Classes | |
struct | AddInMap |
struct | Convention |
struct | PendingImplicitIntersectionOptimization |
"stack" of currently active ocTableRef tokens More... | |
struct | TableRefEntry |
get or setup tab names for the current grammar More... | |
struct | Whitespace |
Public Types | |
enum | ExtendedErrorDetection { EXTENDED_ERROR_DETECTION_NONE = 0 , EXTENDED_ERROR_DETECTION_NAME_BREAK , EXTENDED_ERROR_DETECTION_NAME_NO_BREAK } |
Public Types inherited from formula::FormulaCompiler | |
enum | SeparatorType { RESOURCE_BASE , SEMICOLON_BASE } |
enum | InitSymbols |
typedef std::shared_ptr< const OpCodeMap > | OpCodeMapPtr |
typedef std::shared_ptr< OpCodeMap > | NonConstOpCodeMapPtr |
Public Member Functions | |
ScCompiler (sc::CompileFormulaContext &rCxt, const ScAddress &rPos, bool bComputeII=false, bool bMatrixFlag=false, const ScInterpreterContext *pContext=nullptr) | |
ScCompiler (ScDocument &rDocument, const ScAddress &, formula::FormulaGrammar::Grammar eGrammar=formula::FormulaGrammar::GRAM_UNSPECIFIED, bool bComputeII=false, bool bMatrixFlag=false, const ScInterpreterContext *pContext=nullptr) | |
If eGrammar == GRAM_UNSPECIFIED then the grammar of rDocument is used,. More... | |
ScCompiler (sc::CompileFormulaContext &rCxt, const ScAddress &rPos, ScTokenArray &rArr, bool bComputeII=false, bool bMatrixFlag=false, const ScInterpreterContext *pContext=nullptr) | |
ScCompiler (ScDocument &rDocument, const ScAddress &, ScTokenArray &rArr, formula::FormulaGrammar::Grammar eGrammar=formula::FormulaGrammar::GRAM_UNSPECIFIED, bool bComputeII=false, bool bMatrixFlag=false, const ScInterpreterContext *pContext=nullptr) | |
If eGrammar == GRAM_UNSPECIFIED then the grammar of rDocument is used,. More... | |
virtual | ~ScCompiler () override |
bool | ParseErrorConstant (const OUString &) |
bool | ParseTableRefItem (const OUString &) |
bool | ParseTableRefColumn (const OUString &) |
bool | GetTokenIfOpCode (OpCode eOp) |
Calls GetToken() if PeekNextNoSpaces() is of given OpCode. More... | |
void | SetAutoCorrection (bool bVal) |
When auto correction is set, the jump command reorder must be enabled. More... | |
void | SetCloseBrackets (bool bVal) |
void | SetRefConventionChartOOXML (bool bVal) |
void | SetRefConvention (const Convention *pConvP) |
void | SetRefConvention (const formula::FormulaGrammar::AddressConvention eConv) |
OpCodeMapPtr | GetOpCodeMap (const sal_Int32 nLanguage) const |
Overwrite FormulaCompiler::GetOpCodeMap() forwarding to GetFinalOpCodeMap(). More... | |
void | SetFormulaLanguage (const OpCodeMapPtr &xMap) |
Set symbol map if not empty. More... | |
void | SetGrammar (const formula::FormulaGrammar::Grammar eGrammar) |
void | SetNumberFormatter (SvNumberFormatter *pFormatter) |
void | SetExternalLinks (const css::uno::Sequence< css::sheet::ExternalLinkInfo > &rLinks) |
Set external link info for ScAddress::CONV_XL_OOX. More... | |
void | CreateStringFromXMLTokenArray (OUString &rFormula, OUString &rFormulaNmsp) |
void | SetExtendedErrorDetection (ExtendedErrorDetection eVal) |
bool | IsCorrected () const |
const OUString & | GetCorrectedFormula () const |
std::unique_ptr< ScTokenArray > | CompileString (const OUString &rFormula) |
Tokenize formula expression string into an array of tokens. More... | |
std::unique_ptr< ScTokenArray > | CompileString (const OUString &rFormula, const OUString &rFormulaNmsp) |
const ScAddress & | GetPos () const |
void | MoveRelWrap () |
bool | HasUnhandledPossibleImplicitIntersections () const |
const std::set< OpCode > & | UnhandledPossibleImplicitIntersectionsOpCodes () |
Public Member Functions inherited from formula::FormulaCompiler | |
FormulaCompiler (bool bComputeII=false, bool bMatrixFlag=false) | |
FormulaCompiler (FormulaTokenArray &_rArr, bool bComputeII=false, bool bMatrixFlag=false) | |
virtual | ~FormulaCompiler () |
OpCodeMapPtr | GetOpCodeMap (const sal_Int32 nLanguage) const |
void | DestroyOpCodeMap (const sal_Int32 nLanguage) |
bool | HasOpCodeMap (const sal_Int32 nLanguage) const |
const OpCodeMapPtr & | GetCurrentOpCodeMap () const |
OpCode | GetEnglishOpCode (const OUString &rName) const |
FormulaError | GetErrorConstant (const OUString &rName) const |
void | AppendErrorConstant (OUStringBuffer &rBuffer, FormulaError nError) const |
void | EnableJumpCommandReorder (bool bEnable) |
void | EnableStopOnError (bool bEnable) |
SvNumFormatType | GetNumFormatType () const |
bool | CompileTokenArray () |
void | CreateStringFromTokenArray (OUString &rFormula) |
void | CreateStringFromTokenArray (OUStringBuffer &rBuffer) |
const FormulaToken * | CreateStringFromToken (OUString &rFormula, const FormulaToken *pToken) |
const FormulaToken * | CreateStringFromToken (OUStringBuffer &rBuffer, const FormulaToken *pToken, bool bAllowArrAdvance=false) |
void | AppendBoolean (OUStringBuffer &rBuffer, bool bVal) const |
void | AppendDouble (OUStringBuffer &rBuffer, double fVal) const |
FormulaGrammar::Grammar | GetGrammar () const |
bool | NeedsTableRefTransformation () const |
virtual formula::ParamClass | GetForceArrayParameter (const FormulaToken *pToken, sal_uInt16 nParam) const |
void | SetComputeIIFlag (bool bSet) |
void | SetMatrixFlag (bool bSet) |
Static Public Member Functions | |
static const CharClass * | GetCharClassLocalized () |
static const CharClass * | GetCharClassEnglish () |
static void | DeInit () |
static void | CheckTabQuotes (OUString &aTabName, const formula::FormulaGrammar::AddressConvention eConv=formula::FormulaGrammar::CONV_OOO) |
all More... | |
static sal_Int32 | GetDocTabPos (const OUString &rString) |
Analyzes a string for a 'Doc'Tab construct, or 'Do''c'Tab etc... More... | |
static bool | IsEnglishSymbol (const OUString &rName) |
static const Convention * | GetRefConvention (formula::FormulaGrammar::AddressConvention eConv) |
static void | MoveRelWrap (const ScTokenArray &rArr, const ScDocument &rDoc, const ScAddress &rPos, SCCOL nMaxCol, SCROW nMaxRow) |
static bool | IsCharFlagAllConventions (OUString const &rStr, sal_Int32 nPos, ScCharFlags nFlags) |
If the character is allowed as tested by nFlags (SC_COMPILER_C_... bits) for all known address conventions. More... | |
static bool | DoubleRefToPosSingleRefScalarCase (const ScRange &rRange, ScAddress &rAdr, const ScAddress &rFormulaPos) |
TODO : Move this to somewhere appropriate. More... | |
Static Public Member Functions inherited from formula::FormulaCompiler | |
static OpCodeMapPtr | CreateOpCodeMap (const css::uno::Sequence< const css::sheet::FormulaOpCodeMapEntry > &rMapping, bool bEnglish) |
static bool | IsOpCodeVolatile (OpCode eOp) |
static bool | IsOpCodeJumpCommand (OpCode eOp) |
static bool | DeQuote (OUString &rStr) |
static const OUString & | GetNativeSymbol (OpCode eOp) |
static sal_Unicode | GetNativeSymbolChar (OpCode eOp) |
static bool | IsMatrixFunction (OpCode _eOpCode) |
static void | AppendString (OUStringBuffer &rBuffer, const OUString &rStr) |
static void | UpdateSeparatorsNative (const OUString &rSep, const OUString &rArrayColSep, const OUString &rArrayRowSep) |
static void | ResetNativeSymbols () |
static void | SetNativeSymbols (const OpCodeMapPtr &xMap) |
Private Member Functions | |
std::vector< OUString > & | GetSetupTabNames () const |
sheet names mangled for the current grammar for output More... | |
bool | NextNewToken (bool bInArray) |
bool | ToUpperAsciiOrI18nIsAscii (OUString &rUpper, const OUString &rOrg) const |
virtual void | SetError (FormulaError nError) override |
std::vector< Whitespace > | NextSymbol (bool bInArray) |
bool | ParseValue (const OUString &) |
bool | ParseOpCode (const OUString &, bool bInArray) |
bool | ParseOpCode2 (std::u16string_view) |
bool | ParseString () |
bool | ParseReference (const OUString &rSymbol, const OUString *pErrRef=nullptr) |
bool | ParseSingleReference (const OUString &rSymbol, const OUString *pErrRef=nullptr) |
bool | ParseDoubleReference (const OUString &rSymbol, const OUString *pErrRef=nullptr) |
bool | ParsePredetectedReference (const OUString &rSymbol) |
bool | ParsePredetectedErrRefReference (const OUString &rName, const OUString *pErrRef) |
bool | ParseMacro (const OUString &) |
bool | ParseNamedRange (const OUString &, bool onlyCheck=false) |
bool | ParseExternalNamedRange (const OUString &rSymbol, bool &rbInvalidExternalNameRange) |
bool | ParseDBRange (const OUString &) |
bool | ParseColRowName (const OUString &) |
bool | ParseBoolean (const OUString &) |
void | AutoCorrectParsedSymbol () |
const ScRangeData * | GetRangeData (SCTAB &rSheet, const OUString &rUpperName) const |
void | AdjustSheetLocalNameRelReferences (SCTAB nDelta) |
void | SetRelNameReference () |
ScRangeData * | GetRangeData (const formula::FormulaToken &pToken) const |
Obtain range data for ocName token, global or sheet local. More... | |
bool | HasPossibleNamedRangeConflict (SCTAB nTab) const |
void | SetGrammarAndRefConvention (const formula::FormulaGrammar::Grammar eNewGrammar, const formula::FormulaGrammar::Grammar eOldGrammar) |
Set grammar and reference convention from within SetFormulaLanguage() or SetGrammar(). More... | |
virtual OUString | FindAddInFunction (const OUString &rUpperName, bool bLocalFirst) const override |
virtual void | fillFromAddInCollectionUpperName (const NonConstOpCodeMapPtr &xMap) const override |
virtual void | fillFromAddInCollectionEnglishName (const NonConstOpCodeMapPtr &xMap) const override |
virtual void | fillFromAddInMap (const NonConstOpCodeMapPtr &xMap, formula::FormulaGrammar::Grammar _eGrammar) const override |
virtual void | fillAddInToken (::std::vector< css::sheet::FormulaOpCodeMapEntry > &_rVec, bool _bIsEnglish) const override |
virtual bool | HandleExternalReference (const formula::FormulaToken &_aToken) override |
virtual bool | HandleRange () override |
virtual bool | HandleColRowName () override |
virtual bool | HandleDbData () override |
virtual bool | HandleTableRef () override |
virtual formula::FormulaTokenRef | ExtendRangeReference (formula::FormulaToken &rTok1, formula::FormulaToken &rTok2) override |
virtual void | CreateStringFromExternal (OUStringBuffer &rBuffer, const formula::FormulaToken *pToken) const override |
virtual void | CreateStringFromSingleRef (OUStringBuffer &rBuffer, const formula::FormulaToken *pToken) const override |
virtual void | CreateStringFromDoubleRef (OUStringBuffer &rBuffer, const formula::FormulaToken *pToken) const override |
virtual void | CreateStringFromMatrix (OUStringBuffer &rBuffer, const formula::FormulaToken *pToken) const override |
virtual void | CreateStringFromIndex (OUStringBuffer &rBuffer, const formula::FormulaToken *pToken) const override |
virtual void | LocalizeString (OUString &rName) const override |
virtual formula::ParamClass | GetForceArrayParameter (const formula::FormulaToken *pToken, sal_uInt16 nParam) const override |
ScCharFlags | GetCharTableFlags (sal_Unicode c, sal_Unicode cLast) |
Access the CharTable flags. More... | |
virtual void | HandleIIOpCode (formula::FormulaToken *token, formula::FormulaToken ***pppToken, sal_uInt8 nNumParams) override |
bool | HandleIIOpCodeInternal (formula::FormulaToken *token, formula::FormulaToken ***pppToken, sal_uInt8 nNumParams) |
bool | SkipImplicitIntersectionOptimization (const formula::FormulaToken *token) const |
virtual void | PostProcessCode () override |
virtual void | AnnotateOperands () override |
void | ReplaceDoubleRefII (formula::FormulaToken **ppDoubleRefTok) |
bool | AdjustSumRangeShape (const ScComplexRefData &rBaseRange, ScComplexRefData &rSumRange) |
void | CorrectSumRange (const ScComplexRefData &rBaseRange, ScComplexRefData &rSumRange, formula::FormulaToken **ppSumRangeToken) |
void | AnnotateTrimOnDoubleRefs () |
Static Private Member Functions | |
static size_t | GetAddInMapCount () |
static void | addWhitespace (std::vector< ScCompiler::Whitespace > &rvSpaces, ScCompiler::Whitespace &rSpace, sal_Unicode c, sal_Int32 n=1) |
static bool | ParameterMayBeImplicitIntersection (const formula::FormulaToken *token, int parameter) |
Static Private Attributes | |
static const CharClass * | pCharClassEnglish = nullptr |
static const CharClass * | pCharClassLocalized = nullptr |
static const Convention * | pConventions [formula::FormulaGrammar::CONV_LAST] = { nullptr, nullptr, nullptr, nullptr, nullptr, nullptr } |
static const struct ScCompiler::AddInMap | g_aAddInMap [] |
Friends | |
struct | Convention |
Definition at line 180 of file compiler.hxx.
Enumerator | |
---|---|
EXTENDED_ERROR_DETECTION_NONE | |
EXTENDED_ERROR_DETECTION_NAME_BREAK | |
EXTENDED_ERROR_DETECTION_NAME_NO_BREAK |
Definition at line 184 of file compiler.hxx.
ScCompiler::ScCompiler | ( | sc::CompileFormulaContext & | rCxt, |
const ScAddress & | rPos, | ||
bool | bComputeII = false , |
||
bool | bMatrixFlag = false , |
||
const ScInterpreterContext * | pContext = nullptr |
||
) |
Definition at line 1901 of file compiler.cxx.
References getCharClass(), sc::CompileFormulaContext::getGrammar(), and SetGrammar().
ScCompiler::ScCompiler | ( | ScDocument & | rDocument, |
const ScAddress & | rPos, | ||
formula::FormulaGrammar::Grammar | eGrammar = formula::FormulaGrammar::GRAM_UNSPECIFIED , |
||
bool | bComputeII = false , |
||
bool | bMatrixFlag = false , |
||
const ScInterpreterContext * | pContext = nullptr |
||
) |
If eGrammar == GRAM_UNSPECIFIED then the grammar of rDocument is used,.
Definition at line 1924 of file compiler.cxx.
References getCharClass(), ScDocument::GetGrammar(), formula::FormulaGrammar::GRAM_UNSPECIFIED, and SetGrammar().
ScCompiler::ScCompiler | ( | sc::CompileFormulaContext & | rCxt, |
const ScAddress & | rPos, | ||
ScTokenArray & | rArr, | ||
bool | bComputeII = false , |
||
bool | bMatrixFlag = false , |
||
const ScInterpreterContext * | pContext = nullptr |
||
) |
Definition at line 1852 of file compiler.cxx.
References getCharClass(), sc::CompileFormulaContext::getGrammar(), and SetGrammar().
ScCompiler::ScCompiler | ( | ScDocument & | rDocument, |
const ScAddress & | rPos, | ||
ScTokenArray & | rArr, | ||
formula::FormulaGrammar::Grammar | eGrammar = formula::FormulaGrammar::GRAM_UNSPECIFIED , |
||
bool | bComputeII = false , |
||
bool | bMatrixFlag = false , |
||
const ScInterpreterContext * | pContext = nullptr |
||
) |
If eGrammar == GRAM_UNSPECIFIED then the grammar of rDocument is used,.
Definition at line 1875 of file compiler.cxx.
References getCharClass(), ScDocument::GetGrammar(), formula::FormulaGrammar::GRAM_UNSPECIFIED, and SetGrammar().
|
overridevirtual |
Definition at line 1950 of file compiler.cxx.
|
staticprivate |
Definition at line 2096 of file compiler.cxx.
References ScCompiler::Whitespace::cChar, n, ScCompiler::Whitespace::nCount, and ScCompiler::Whitespace::reset().
Referenced by NextSymbol().
|
private |
Definition at line 5153 of file compiler.cxx.
References ScSingleRefData::IncTab(), ScSingleRefData::IsTabRel(), formula::FormulaCompiler::pArr, formula::FormulaTokenArray::References(), svDoubleRef, and t.
Referenced by HandleRange().
|
private |
Definition at line 6402 of file compiler.cxx.
References ScRange::aEnd, aPos, ScAddress::Col(), ScSingleRefData::IncCol(), ScSingleRefData::IncRow(), lcl_GetColRowDeltas(), ScDocument::MaxCol(), ScDocument::MaxRow(), rDoc, ScComplexRefData::Ref2, ScAddress::Row(), ScComplexRefData::toAbs(), ScDocument::ValidCol(), and ScDocument::ValidRow().
Referenced by CorrectSumRange().
|
overrideprivatevirtual |
Reimplemented from formula::FormulaCompiler.
Definition at line 6292 of file compiler.cxx.
References AnnotateTrimOnDoubleRefs().
|
private |
Definition at line 6468 of file compiler.cxx.
References formula::FormulaToken::GetDoubleRef(), formula::FormulaToken::GetJump(), formula::FormulaToken::GetOpCode(), formula::FormulaToken::GetType(), formula::FormulaToken::IsInForceArray(), ocClose, ocDiv, ocEqual, ocIf, ocMul, ocPush, ocSum, ocSumProduct, formula::FormulaCompiler::pCode, ScComplexRefData::SetTrimToData(), svDouble, svDoubleRef, and svSingleRef.
Referenced by AnnotateOperands().
|
private |
Definition at line 4154 of file compiler.cxx.
References formula::FormulaCompiler::aCorrectedSymbol, aPos, formula::FormulaCompiler::bCorrected, CharDontCare, CharValue, COL_VALID, GetCharTableFlags(), comphelper::string::getTokenCount(), CharClass::isAsciiAlpha(), CharClass::isAsciiNumeric(), MAXSTRLEN, ScCompiler::Convention::meConv, formula::FormulaCompiler::mxSymbols, nCount, nIndex, NONE, nPos, ocMul, p, ScAddress::Parse(), pConv, rDoc, ROW_VALID, VALID, and Word.
Referenced by NextNewToken().
|
static |
all
Definition at line 1954 of file compiler.cxx.
References ScGlobal::getCharClass(), CharClass::isAsciiNumeric(), and CharClass::parsePredefinedToken().
Referenced by ScRangeStringConverter::AppendTableName(), CreateStringFromIndex(), GetSetupTabNames(), IMPL_LINK(), lcl_Format(), lcl_Split_DocTab(), ScInterpreter::ScAddressFunc(), sc::TokenStringContext::TokenStringContext(), and sc::CompileFormulaContext::updateTabNames().
std::unique_ptr< ScTokenArray > ScCompiler::CompileString | ( | const OUString & | rFormula | ) |
Tokenize formula expression string into an array of tokens.
rFormula | formula expression to tokenize. |
Definition at line 4691 of file compiler.cxx.
References aArr, formula::FormulaCompiler::aCorrectedFormula, formula::FormulaCompiler::aCorrectedSymbol, Add, formula::FormulaTokenArray::AddToken(), aFormula, aPos, formula::FormulaCompiler::bAutoCorrect, formula::FormulaCompiler::bCorrected, ScRawToken::CreateToken(), formula::FormulaCompiler::eLastOp, ScDocument::GetExternalRefManager(), formula::FormulaToken::GetIndex(), formula::FormulaTokenArray::GetLen(), formula::FormulaToken::GetOpCode(), ScRawToken::GetOpCode(), ScDocument::GetSheetLimits(), formula::FormulaToken::GetType(), formula::FormulaCompiler::maArrIterator, maExternalFiles, o3tl::make_unsigned(), maRawToken, maTableRefs, mbCloseBrackets, formula::FormulaCompiler::meGrammar, formula::FormulaCompiler::MergeRangeReference(), formula::FormulaCompiler::mxSymbols, NextNewToken(), nSrcPos, ocAddress, ocArrayClose, ocArrayColSep, ocArrayOpen, ocArrayRowSep, ocClose, ocColRowName, ocColRowNameAuto, ocDBArea, ocNone, ocOpen, ocPush, ocRange, ocSep, ocSkip, ocTableRefClose, ocTableRefOpen, ocWeek, formula::FormulaTokenArray::OpCodeBefore(), formula::FormulaCompiler::pArr, formula::FormulaTokenArray::PeekPrev(), rDoc, SAL_WARN_IF, SetError(), SetGrammar(), formula::FormulaTokenArray::SetRecalcModeForced(), comphelper::string::strip(), svSep, svSingleRef, and ScTableRefToken::TABLE.
Referenced by ScVbaNames::Add(), ScOrcusFormula::commit(), ScConditionEntry::Compile(), ScFormulaCell::Compile(), ScRangeData::CompileRangeData(), CompileString(), ScFormulaCell::CompileXML(), XclExpChSourceLink::ConvertDataSequence(), ScViewFunc::DoRefConversion(), ScXMLConditionalFormatContext::endFastElement(), ScViewFunc::EnterData(), ScDocFunc::EnterMatrix(), ScOrcusFactory::finalize(), oox::xls::DefinedName::getScTokens(), IMPL_LINK(), oox::xls::ExternalName::importDefinedName(), ScNameDefDlg::IsFormulaValid(), ScNameDlg::IsFormulaValid(), ScTabViewShell::IsRefInputMode(), ScFormulaParserObj::parseFormula(), ScInterpreter::ScIndirect(), ScSimpleFormulaCalculator::ScSimpleFormulaCalculator(), ScVbaName::setContent(), ScConditionEntryObj::setPropertyValue(), and ScImportExport::Sylk2Doc().
std::unique_ptr< ScTokenArray > ScCompiler::CompileString | ( | const OUString & | rFormula, |
const OUString & | rFormulaNmsp | ||
) |
Definition at line 5006 of file compiler.cxx.
References aPos, CompileString(), ScTokenConversion::ConvertToTokenArray(), ScUnoConversion::FillApiAddress(), ScFormulaParserPool::getFormulaParser(), ScDocument::GetFormulaParserPool(), formula::FormulaCompiler::GetGrammar(), formula::FormulaCompiler::maArrIterator, formula::FormulaCompiler::pArr, and rDoc.
|
private |
Definition at line 6454 of file compiler.cxx.
References AdjustSumRangeShape(), ScDocument::GetSheetLimits(), formula::FormulaToken::IncRef(), and rDoc.
Referenced by HandleIIOpCodeInternal().
|
overrideprivatevirtual |
Reimplemented from formula::FormulaCompiler.
Definition at line 5407 of file compiler.cxx.
References aPos, formula::FormulaCompiler::GetCurrentOpCodeMap(), formula::FormulaToken::GetDoubleRef(), GetSetupTabNames(), ScDocument::GetSheetLimits(), formula::FormulaTokenArray::IsFromRangeName(), ScCompiler::Convention::makeRefStr(), formula::FormulaCompiler::meGrammar, ocErrRef, formula::FormulaCompiler::pArr, pConv, and rDoc.
Referenced by CreateStringFromIndex().
|
overrideprivatevirtual |
Reimplemented from formula::FormulaCompiler.
Definition at line 5235 of file compiler.cxx.
References ScExternalRefManager::convertFileIdToUsedFileId(), ScExternalRefManager::getAllCachedTableNames(), ScExternalRefManager::getExternalFileName(), ScDocument::GetExternalRefManager(), GetPos(), ScDocument::GetSheetLimits(), ScCompiler::Convention::makeExternalNameStr(), ScCompiler::Convention::makeExternalRefStr(), pConv, rDoc, SAL_WARN_IF, svExternalDoubleRef, svExternalName, svExternalSingleRef, and t.
|
overrideprivatevirtual |
Reimplemented from formula::FormulaCompiler.
Definition at line 5414 of file compiler.cxx.
References aBuffer, aName, aPos, formula::FormulaCompiler::AppendErrorConstant(), CheckTabQuotes(), CreateStringFromDoubleRef(), CreateStringFromSingleRef(), ScDBCollection::NamedDBs::findByIndex(), ScTableRefToken::GetAreaRefRPN(), ScDocument::GetDBCollection(), formula::FormulaToken::GetError(), formula::FormulaToken::GetIndex(), ScDBData::GetName(), ScDocument::GetName(), ScDBCollection::getNamedDBs(), formula::FormulaCompiler::GetNativeSymbol(), formula::FormulaToken::GetOpCode(), GetRangeData(), formula::FormulaToken::GetSheet(), ScCompiler::Convention::getSpecialSymbol(), formula::FormulaToken::GetType(), mbRefConventionChartOOXML, ScCompiler::Convention::meConv, formula::FormulaCompiler::NeedsTableRefTransformation(), ocDBArea, ocErrName, ocName, ocTableRef, pConv, pData, rDoc, ScCompiler::Convention::SHEET_SEPARATOR, svDoubleRef, svError, svSingleRef, and ScAddress::Tab().
|
overrideprivatevirtual |
Reimplemented from formula::FormulaCompiler.
Definition at line 5277 of file compiler.cxx.
References formula::FormulaCompiler::AppendBoolean(), formula::FormulaCompiler::AppendDouble(), formula::FormulaCompiler::AppendString(), ScMatrix::GetDimensions(), ScMatrix::GetDouble(), ScMatrix::GetError(), ScGlobal::GetErrorString(), formula::FormulaToken::GetMatrix(), svl::SharedString::getString(), ScMatrix::GetString(), ScMatrix::IsBoolean(), ScMatrix::IsEmpty(), ScMatrix::IsStringOrEmpty(), ScMatrix::IsValue(), formula::FormulaCompiler::mxSymbols, ocArrayClose, ocArrayColSep, ocArrayOpen, and ocArrayRowSep.
|
overrideprivatevirtual |
Reimplemented from formula::FormulaCompiler.
Definition at line 5348 of file compiler.cxx.
References aPos, AREA, aStr, ScAddress::Col(), ScAddress::Format(), formula::FormulaCompiler::GetCurrentOpCodeMap(), ScDocument::GetDBAtCursor(), formula::FormulaCompiler::GetNativeSymbol(), formula::FormulaToken::GetOpCode(), GetSetupTabNames(), ScDocument::GetSheetLimits(), formula::FormulaToken::GetSingleRef(), ScDocument::GetString(), ScDocument::HasStringData(), formula::FormulaTokenArray::IsFromRangeName(), formula::FormulaCompiler::maArrIterator, ScCompiler::Convention::makeRefStr(), formula::FormulaCompiler::meGrammar, mpInterpreterContext, ocColRowName, ocErrName, ocErrRef, ocTableRefOpen, p, formula::FormulaCompiler::pArr, pConv, pData, formula::FormulaTokenArrayPlainIterator::PeekPrevNoSpaces(), rDoc, ScComplexRefData::Ref1, ScComplexRefData::Ref2, ScAddress::Row(), SAL_WARN, SAL_WARN_IF, ScAddress::Tab(), TAB_3D, ScSingleRefData::toAbs(), u, and VALID.
Referenced by CreateStringFromIndex().
void ScCompiler::CreateStringFromXMLTokenArray | ( | OUString & | rFormula, |
OUString & | rFormulaNmsp | ||
) |
Definition at line 4658 of file compiler.cxx.
References formula::FormulaTokenArray::GetArray(), formula::FormulaCompiler::GetGrammar(), formula::FormulaTokenArray::GetLen(), formula::FormulaToken::GetString(), svl::SharedString::getString(), and formula::FormulaCompiler::pArr.
Referenced by ScFormulaCell::CompileXML().
|
static |
Definition at line 187 of file compiler.cxx.
References pCharClassEnglish, and pCharClassLocalized.
Referenced by ScGlobal::Clear().
|
static |
TODO : Move this to somewhere appropriate.
Definition at line 6337 of file compiler.cxx.
References ScRange::aEnd, ScRange::aStart, ScAddress::Col(), ScAddress::Row(), ScAddress::Set(), and ScAddress::Tab().
Referenced by ScInterpreter::DoubleRefToPosSingleRef(), and ReplaceDoubleRefII().
|
overrideprivatevirtual |
Reimplemented from formula::FormulaCompiler.
Definition at line 5509 of file compiler.cxx.
References aPos, extendRangeReference(), ScDocument::GetSheetLimits(), and rDoc.
|
overrideprivatevirtual |
Reimplemented from formula::FormulaCompiler.
Definition at line 5514 of file compiler.cxx.
References aName, ScGlobal::GetAddInCollection(), ScUnoAddInFuncData::GetExcelName(), ScUnoAddInCollection::GetFuncCount(), ScUnoAddInCollection::GetFuncData(), ScUnoAddInFuncData::GetOriginalName(), ScUnoAddInFuncData::GetUpperLocal(), ScUnoAddInFuncData::GetUpperName(), i, LANGUAGE_ENGLISH_US, nCount, and ocExternal.
|
overrideprivatevirtual |
Reimplemented from formula::FormulaCompiler.
Definition at line 168 of file compiler.cxx.
References aName, ScGlobal::GetAddInCollection(), ScUnoAddInCollection::GetFuncCount(), ScUnoAddInCollection::GetFuncData(), ScUnoAddInFuncData::GetOriginalName(), ScUnoAddInFuncData::GetUpperEnglish(), ScUnoAddInFuncData::GetUpperName(), i, and nCount.
|
overrideprivatevirtual |
Reimplemented from formula::FormulaCompiler.
Definition at line 155 of file compiler.cxx.
References ScGlobal::GetAddInCollection(), ScUnoAddInCollection::GetFuncCount(), ScUnoAddInCollection::GetFuncData(), ScUnoAddInFuncData::GetOriginalName(), ScUnoAddInFuncData::GetUpperName(), i, and nCount.
|
overrideprivatevirtual |
Reimplemented from formula::FormulaCompiler.
Definition at line 109 of file compiler.cxx.
References g_aAddInMap, and GetAddInMapCount().
|
overrideprivatevirtual |
Reimplemented from formula::FormulaCompiler.
Definition at line 350 of file compiler.cxx.
References ScUnoAddInCollection::FindFunction(), and ScGlobal::GetAddInCollection().
|
staticprivate |
Definition at line 137 of file odffmap.cxx.
References g_aAddInMap.
Referenced by fillFromAddInMap().
|
static |
Definition at line 230 of file compiler.cxx.
References getCharClassMutex(), LANGUAGE_ENGLISH_US, and pCharClassEnglish.
Referenced by ScGlobal::GetInputHandlerFunctionNames(), IsEnglishSymbol(), ScUnoAddInCollection::ReadConfiguration(), ScUnoAddInFuncData::SetEnglishName(), and SetFormulaLanguage().
|
static |
Definition at line 244 of file compiler.cxx.
References getCharClassMutex(), Application::GetSettings(), and pCharClassLocalized.
Referenced by ScGlobal::GetInputHandlerFunctionNames(), and SetFormulaLanguage().
|
inlineprivate |
Access the CharTable flags.
Definition at line 538 of file compiler.hxx.
References ScCompiler::Convention::getCharTableFlags(), and NONE.
Referenced by AutoCorrectParsedSymbol(), NextSymbol(), and ParseReference().
|
inline |
Definition at line 480 of file compiler.hxx.
References formula::FormulaCompiler::aCorrectedFormula.
Referenced by ScViewFunc::EnterData().
|
static |
Analyzes a string for a 'Doc'Tab construct, or 'Do''c'Tab etc...
Definition at line 1993 of file compiler.cxx.
References ScGlobal::FindUnquoted(), nPos, and SC_COMPILER_FILE_TAB_SEP.
Referenced by lcl_Format(), lcl_Split_DocTab(), and ScInterpreter::ScAddressFunc().
|
overrideprivatevirtual |
Reimplemented from formula::FormulaCompiler.
Definition at line 6096 of file compiler.cxx.
References ScParameterClassification::GetParameterType().
|
inline |
Overwrite FormulaCompiler::GetOpCodeMap() forwarding to GetFinalOpCodeMap().
Definition at line 443 of file compiler.hxx.
References formula::FormulaCompiler::GetFinalOpCodeMap().
Referenced by ScFormulaParserObj::SetCompilerFlags(), and ScDocShell::SetFormulaOptions().
|
inline |
Definition at line 492 of file compiler.hxx.
Referenced by CreateStringFromExternal().
|
private |
Obtain range data for ocName token, global or sheet local.
Prerequisite: rToken is a FormulaIndexToken so IsGlobal() and GetIndex() can be called on it. We don't check with RTTI.
Definition at line 5035 of file compiler.cxx.
References ScDocument::FindRangeNameBySheetAndIndex(), formula::FormulaToken::GetIndex(), formula::FormulaToken::GetSheet(), and rDoc.
|
private |
Definition at line 3599 of file compiler.cxx.
References aPos, ScRangeName::findByUpperName(), ScDocument::GetRangeName(), pData, rDoc, and ScAddress::Tab().
Referenced by CreateStringFromIndex(), HandleRange(), ParseNamedRange(), and ParseValue().
|
static |
Definition at line 2011 of file compiler.cxx.
Referenced by ScDocument::GetSheetSeparator(), and SetRefConvention().
|
private |
sheet names mangled for the current grammar for output
Definition at line 297 of file compiler.cxx.
References CheckTabQuotes(), formula::FormulaGrammar::extractRefConvention(), ScDocument::GetAllTableNames(), maTabNames, formula::FormulaCompiler::meGrammar, and rDoc.
Referenced by CreateStringFromDoubleRef(), and CreateStringFromSingleRef().
bool ScCompiler::GetTokenIfOpCode | ( | OpCode | eOp | ) |
Calls GetToken() if PeekNextNoSpaces() is of given OpCode.
Definition at line 5781 of file compiler.cxx.
References formula::FormulaCompiler::GetToken(), formula::FormulaCompiler::maArrIterator, p, and formula::FormulaTokenArrayPlainIterator::PeekNextNoSpaces().
Referenced by HandleTableRef().
|
overrideprivatevirtual |
Reimplemented from formula::FormulaCompiler.
Definition at line 5549 of file compiler.cxx.
References formula::FormulaTokenArray::Add(), ScTokenArray::AddDoubleReference(), ScTokenArray::AddSingleReference(), ScRange::aEnd, aPos, ScRange::aStart, ScAddress::Col(), ScRange::Contains(), ScDocument::GetColNameRanges(), ScDocument::GetDocOptions(), formula::FormulaToken::GetOpCode(), ScRangePair::GetRange(), ScDocument::GetRowNameRanges(), ScDocument::GetSheetLimits(), formula::FormulaCompiler::GetToken(), ScRefCellValue::hasString(), i, ScSingleRefData::InitAddress(), ScComplexRefData::InitRange(), ScSingleRefData::IsColRel(), ScRefCellValue::isEmpty(), ScDocOptions::IsLookUpColRowNames(), formula::FormulaCompiler::maArrIterator, ScDocument::MaxCol(), ScDocument::MaxRow(), formula::FormulaCompiler::mbJumpCommandReorder, formula::FormulaCompiler::mpToken, ocAdd, ocColRowName, ocColRowNameAuto, ocIntersect, formula::FormulaTokenArrayPlainIterator::PeekNextNoSpaces(), formula::FormulaTokenArrayPlainIterator::PeekPrevNoSpaces(), formula::FormulaCompiler::PushTokenArray(), rDoc, ScComplexRefData::Ref1, ScComplexRefData::Ref2, ScAddress::Row(), SC_OPCODE_START_BIN_OP, SC_OPCODE_STOP_BIN_OP, ScAddress::Set(), ScSingleRefData::SetAddress(), ScAddress::SetCol(), ScSingleRefData::SetColRel(), SetError(), ScComplexRefData::SetRange(), ScAddress::SetRow(), ScSingleRefData::SetRowRel(), ScRangePairList::size(), ScAddress::Tab(), ScSingleRefData::toAbs(), and ScDocument::ValidAddress().
|
overrideprivatevirtual |
Reimplemented from formula::FormulaCompiler.
Definition at line 5760 of file compiler.cxx.
References ScTokenArray::AddDoubleReference(), ScRange::aEnd, aPos, ScRange::aStart, ScDBCollection::NamedDBs::findByIndex(), ScDBData::GetArea(), ScDocument::GetDBCollection(), ScDBCollection::getNamedDBs(), ScDocument::GetSheetLimits(), formula::FormulaCompiler::GetToken(), ScComplexRefData::InitFlags(), formula::FormulaCompiler::mbJumpCommandReorder, formula::FormulaCompiler::mpToken, formula::FormulaCompiler::PushTokenArray(), rDoc, SetError(), ScComplexRefData::SetRange(), ScAddress::SetTab(), and ScAddress::Tab().
|
overrideprivatevirtual |
Reimplemented from formula::FormulaCompiler.
Definition at line 5108 of file compiler.cxx.
References aName, aPos, ScTokenArray::Clone(), ScExternalRefManager::getExternalFileName(), ScDocument::GetExternalRefManager(), formula::FormulaToken::GetIndex(), formula::FormulaTokenArrayPlainIterator::GetNextReference(), ScExternalRefManager::getRangeNameTokens(), formula::FormulaToken::GetString(), svl::SharedString::getString(), formula::FormulaCompiler::GetToken(), formula::FormulaToken::GetType(), formula::FormulaCompiler::maArrIterator, MoveRelWrap(), formula::FormulaCompiler::PushTokenArray(), rDoc, formula::FormulaTokenArrayPlainIterator::Reset(), SetError(), SetRelNameReference(), svExternalDoubleRef, svExternalName, and svExternalSingleRef.
|
overrideprivatevirtual |
Reimplemented from formula::FormulaCompiler.
Definition at line 6123 of file compiler.cxx.
References formula::FormulaToken::GetOpCode(), HandleIIOpCodeInternal(), formula::FormulaCompiler::mbComputeII, and mUnhandledPossibleImplicitIntersectionsOpCodes.
|
private |
Definition at line 6136 of file compiler.cxx.
References CorrectSumRange(), formula::FormulaToken::GetOpCode(), formula::FormulaToken::GetType(), i, mPendingImplicitIntersectionOptimizations, mUnhandledPossibleImplicitIntersections, ocAnd, ocAverageIf, ocOr, ocPercentSign, ocPush, ocRound, ocRoundDown, ocRoundUp, ocSumIf, ocVLookup, ParameterMayBeImplicitIntersection(), ScComplexRefData::Ref1, ScComplexRefData::Ref2, SC_OPCODE_START_1_PAR, SC_OPCODE_START_BIN_OP, SC_OPCODE_START_UN_OP, SC_OPCODE_STOP_1_PAR, SC_OPCODE_STOP_BIN_OP, SC_OPCODE_STOP_UN_OP, SkipImplicitIntersectionOptimization(), svDoubleRef, svMatrix, and svSingleRef.
Referenced by HandleIIOpCode().
|
overrideprivatevirtual |
Reimplemented from formula::FormulaCompiler.
Definition at line 5040 of file compiler.cxx.
References formula::FormulaTokenArray::Add(), ScTokenArray::AddOpCode(), AdjustSheetLocalNameRelReferences(), aPos, ScTokenArray::Clone(), ScRangeData::GetCode(), ScRangeData::GetErrCode(), formula::FormulaToken::GetOpCode(), GetRangeData(), formula::FormulaCompiler::GetToken(), ScRangeData::HasReferences(), formula::FormulaCompiler::maArrIterator, formula::FormulaCompiler::mbJumpCommandReorder, MoveRelWrap(), formula::FormulaCompiler::mpToken, ocClose, ocOpen, ocSep, formula::FormulaTokenArrayPlainIterator::PeekNextNoSpaces(), formula::FormulaTokenArrayPlainIterator::PeekPrevNoSpaces(), formula::FormulaCompiler::PushTokenArray(), rDoc, formula::FormulaTokenArrayPlainIterator::Reset(), SetError(), formula::FormulaTokenArray::SetFromRangeName(), SetRelNameReference(), and ScAddress::Tab().
|
overrideprivatevirtual |
Reimplemented from formula::FormulaCompiler.
Definition at line 5797 of file compiler.cxx.
References formula::FormulaTokenArray::Add(), ScTokenArray::AddDoubleReference(), ScTokenArray::AddSingleReference(), ScRange::aEnd, ScTableRefToken::ALL, aPos, ScRange::aStart, ScTableRefToken::DATA, ScTableRefToken::DATA_TOTALS, ScDBCollection::NamedDBs::findByIndex(), ScDBData::GetArea(), ScDocument::GetDBCollection(), ScTableRefToken::GetIndex(), ScTableRefToken::GetItem(), ScDBCollection::getNamedDBs(), ScDocument::GetSheetLimits(), formula::FormulaCompiler::GetToken(), GetTokenIfOpCode(), ScDBData::HasHeader(), ScDBData::HasTotals(), ScTableRefToken::HEADERS, ScTableRefToken::HEADERS_DATA, ScAddress::IncRow(), ScSingleRefData::InitFlags(), ScComplexRefData::InitFlags(), ScAddress::INITIALIZE_INVALID, ScRange::Intersection(), formula::FormulaTokenArray::IsFromRangeName(), ScRange::IsValid(), formula::FormulaCompiler::maArrIterator, formula::FormulaCompiler::mbJumpCommandReorder, formula::FormulaCompiler::mpToken, ocBad, ocPush, ocRange, ocSep, ocTableRefClose, ocTableRefItemAll, ocTableRefItemData, ocTableRefItemHeaders, ocTableRefItemThisRow, ocTableRefItemTotals, ocTableRefOpen, p, formula::FormulaCompiler::pArr, formula::FormulaTokenArrayPlainIterator::PeekNextNoSpaces(), formula::FormulaCompiler::PushTokenArray(), ScRange::PutInOrder(), rDoc, ScComplexRefData::Ref1, ScComplexRefData::Ref2, ScAddress::Row(), ScSingleRefData::SetAddress(), ScTableRefToken::SetAreaRefRPN(), ScSingleRefData::SetColRel(), SetError(), ScSingleRefData::SetFlag3D(), ScComplexRefData::SetRange(), ScSingleRefData::SetRelName(), ScAddress::SetRow(), ScSingleRefData::SetRowRel(), ScAddress::SetTab(), svSingleRef, ScAddress::Tab(), ScTableRefToken::TABLE, ScTableRefToken::THIS_ROW, and ScTableRefToken::TOTALS.
|
private |
Definition at line 3618 of file compiler.cxx.
References ScDocument::GetRangeName(), ScRangeName::hasPossibleAddressConflict(), and rDoc.
Referenced by ParseSingleReference().
|
inline |
Definition at line 508 of file compiler.hxx.
Referenced by ScFormulaCell::InterpretFormulaGroupOpenCL().
|
static |
If the character is allowed as tested by nFlags (SC_COMPILER_C_... bits) for all known address conventions.
If more than one bit is given in nFlags, all bits must match.
Definition at line 5214 of file compiler.cxx.
References formula::FormulaGrammar::CONV_LAST, formula::FormulaGrammar::CONV_UNSPECIFIED, ScGlobal::getCharClass(), CharClass::isLetterNumeric(), nPos, and pConventions.
Referenced by ScfTools::ConvertToScDefinedName(), ScRangeData::IsNameValid(), and ScRangeData::MakeValidName().
|
inline |
Definition at line 479 of file compiler.hxx.
References formula::FormulaCompiler::bCorrected.
Referenced by ScViewFunc::EnterData().
|
static |
Definition at line 201 of file compiler.cxx.
References ScUnoAddInCollection::FindFunction(), ScGlobal::GetAddInCollection(), GetCharClassEnglish(), formula::FormulaCompiler::GetEnglishOpCode(), ScGlobal::GetLegacyFuncCollection(), ocNone, and CharClass::uppercase().
Referenced by ScVbaWSFunction::hasMethod().
|
overrideprivatevirtual |
Reimplemented from formula::FormulaCompiler.
Definition at line 5504 of file compiler.cxx.
References ScGlobal::GetAddInCollection(), and ScUnoAddInCollection::LocalizeString().
void ScCompiler::MoveRelWrap | ( | ) |
Definition at line 5189 of file compiler.cxx.
References aPos, ScDocument::MaxCol(), ScDocument::MaxRow(), ScRefUpdate::MoveRelWrap(), formula::FormulaCompiler::pArr, rDoc, SingleDoubleRefModifier::Ref(), formula::FormulaTokenArray::References(), svExternalSingleRef, svSingleRef, and t.
Referenced by HandleExternalReference(), HandleRange(), XclExpFmlaCompImpl::Init(), and ScRangeData::UpdateSymbol().
|
static |
Definition at line 5202 of file compiler.cxx.
References ScRefUpdate::MoveRelWrap(), rDoc, SingleDoubleRefModifier::Ref(), formula::FormulaTokenArray::References(), svExternalSingleRef, svSingleRef, and t.
|
private |
Definition at line 4357 of file compiler.cxx.
References formula::FormulaTokenArray::AddBad(), ScTokenArray::AddRawToken(), aFormula, aStr, AutoCorrectParsedSymbol(), formula::FormulaCompiler::bAutoCorrect, ScRawToken::cByte, ScRawToken::cChar, cSymbol, formula::FormulaCompiler::eLastOp, EXTENDED_ERROR_DETECTION_NAME_BREAK, EXTENDED_ERROR_DETECTION_NAME_NO_BREAK, EXTENDED_ERROR_DETECTION_NONE, ScGlobal::getCharClass(), formula::FormulaTokenArray::GetCodeError(), svl::SharedString::getData(), svl::SharedString::getDataIgnoreCase(), formula::FormulaToken::GetOpCode(), ScDocument::GetSharedStringPool(), svl::SharedStringPool::intern(), utl::ConfigManager::IsFuzzing(), ScDocument::IsImportingXML(), CharClass::isLetter(), ScRawToken::IsValidReference(), maPendingOpCodes, maRawToken, maTableRefs, mbCharClassesDiffer, mbRewind, meExtendedErrorDetection, mnPredetectedReference, formula::FormulaCompiler::mxSymbols, ScRawToken::nCount, ScRawToken::NewOpCode(), NextSymbol(), nSrcPos, ocBad, ocErrRef, ocNone, ocSpaces, ocTableRefOpen, ocWhitespace, p, formula::FormulaCompiler::pArr, ParseBoolean(), ParseColRowName(), ParseDBRange(), ParseErrorConstant(), ParseExternalNamedRange(), ParseMacro(), ParseNamedRange(), ParseOpCode(), ParseOpCode2(), ParsePredetectedReference(), ParseReference(), ParseString(), ParseTableRefColumn(), ParseTableRefItem(), ParseValue(), pCharClass, rDoc, ScRawToken::sbyte, SetError(), ScRawToken::SetOpCode(), ScRawToken::SetString(), ToUpperAsciiOrI18nIsAscii(), CharClass::uppercase(), and ScRawToken::whitespace.
Referenced by CompileString().
|
private |
Definition at line 2145 of file compiler.cxx.
References ScCompiler::Convention::ABS_SHEET_PREFIX, formula::FormulaCompiler::aCorrectedSymbol, addWhitespace(), aFormula, formula::FormulaCompiler::bAutoCorrect, Bool, ScCompiler::Whitespace::cChar, Char, CharBool, CharDontCare, CharErrConst, CharIdent, CharString, CharValue, cSymbol, formula::FormulaCompiler::eLastOp, ScGlobal::getCharClass(), GetCharTableFlags(), ScGlobal::getLocaleData(), LocaleDataWrapper::getNumDecimalSep(), LocaleDataWrapper::getNumDecimalSepAlt(), LocaleDataWrapper::getNumThousandSep(), ScCompiler::Convention::getSpecialSymbol(), i, Ident, CharClass::isDigit(), lcl_isUnicodeIgnoreAscii(), lcl_UnicodeStrNCpy(), maTableRefs, MAXSTRLEN, formula::FormulaCompiler::meGrammar, mnPredetectedReference, mnRangeOpPosInSymbol, formula::FormulaCompiler::mxSymbols, nCount, ScCompiler::Whitespace::nCount, nSrcPos, ocArrayColSep, ocArrayRowSep, ocDBArea, ocSep, ocTableRefOpen, OdfLabelOp, OdfLBracket, OdfNameMarker, OdfRBracket, ScCompiler::Convention::parseAnyToken(), pCharClass, pConv, SC_COMPILER_FILE_TAB_SEP, SetError(), ScCompiler::Convention::SHEET_SEPARATOR, StringSep, Value, ValueExp, ValueSep, ValueSign, ValueValue, and WordSep.
Referenced by NextNewToken().
|
staticprivate |
Definition at line 6101 of file compiler.cxx.
References Array, ScParameterClassification::GetParameterType(), and Value.
Referenced by HandleIIOpCodeInternal().
|
private |
Definition at line 3967 of file compiler.cxx.
References maRawToken, formula::FormulaCompiler::mxSymbols, ocFalse, ocTrue, and ScRawToken::SetOpCode().
Referenced by NextNewToken().
|
private |
Definition at line 3712 of file compiler.cxx.
References ScRange::aEnd, aName, aPos, ScFormulaCell::aPos, ScRange::aStart, aStr, CELLTYPE_FORMULA, ScAddress::Col(), formula::FormulaCompiler::DeQuote(), ScRawToken::eOp, eType, ScCellIterator::first(), ScDocument::GetAutoNameCache(), ScFormulaCell::GetCode(), formula::FormulaTokenArray::GetCodeLen(), ScDocument::GetColNameRanges(), ScDocument::GetDocOptions(), ScCellIterator::getFormulaCell(), ScAutoNameCache::GetNameOccurrences(), ScCellIterator::GetPos(), ScRangePair::GetRange(), ScDocument::GetRefCellValue(), ScDocument::GetRowNameRanges(), ScDocument::GetSheetLimits(), ScCellIterator::getString(), ScGlobal::GetTransliteration(), ScCellIterator::getType(), ScRefCellValue::hasNumeric(), ScCellIterator::hasString(), ScDocument::HasStringData(), ScSingleRefData::InitAddress(), ScSingleRefData::InitFlags(), ScRefCellValue::isEmpty(), utl::TransliterationWrapper::isEqual(), ScDocOptions::IsLookUpColRowNames(), maRawToken, ScDocument::MaxCol(), ScDocument::MaxRow(), ScCellIterator::next(), ocColRowName, rDoc, ScAddress::Row(), ScAddress::Set(), ScSingleRefData::SetAddress(), ScSingleRefData::SetColRel(), ScSingleRefData::SetRowRel(), ScRawToken::SetSingleReference(), ScRangePairList::size(), and ScAddress::Tab().
Referenced by NextNewToken().
|
private |
Definition at line 3700 of file compiler.cxx.
References ScRawToken::eOp, ScDBCollection::NamedDBs::findByUpperName(), ScDocument::GetDBCollection(), ScDBCollection::getNamedDBs(), maRawToken, ocDBArea, p, rDoc, and ScRawToken::SetName().
Referenced by NextNewToken().
|
private |
Definition at line 3305 of file compiler.cxx.
References aPos, COL2_ABS, COL_ABS, ScDocument::GetExternalRefManager(), ScExternalRefManager::getRealTableName(), ScDocument::GetSheetLimits(), ScComplexRefData::InitRange(), maExternalFiles, maExternalLinks, maRawToken, ScAddress::ExternalInfo::maTabName, ScAddress::ExternalInfo::mbExternal, ScCompiler::Convention::meConv, ScAddress::ExternalInfo::mnFileId, ScRange::Parse(), pConv, rDoc, ScComplexRefData::Ref1, ScComplexRefData::Ref2, ROW2_ABS, ROW_ABS, ScSingleRefData::SetColRel(), ScRawToken::SetDoubleReference(), ScRawToken::SetExternalDoubleRef(), ScSingleRefData::SetFlag3D(), ScComplexRefData::SetRange(), ScSingleRefData::SetRowRel(), ScSingleRefData::SetTabDeleted(), ScSingleRefData::SetTabRel(), TAB2_3D, TAB2_ABS, TAB2_VALID, TAB_3D, TAB_ABS, TAB_VALID, VALID, and ZERO.
Referenced by ParsePredetectedErrRefReference(), ParsePredetectedReference(), and ParseReference().
bool ScCompiler::ParseErrorConstant | ( | const OUString & | rName | ) |
Definition at line 3981 of file compiler.cxx.
References formula::FormulaCompiler::GetErrorConstant(), maRawToken, and ScRawToken::SetErrorConstant().
Referenced by NextNewToken(), and ParsePredetectedReference().
|
private |
Definition at line 3662 of file compiler.cxx.
References aName, ScExternalRefManager::convertToAbsName(), ScExternalRefManager::getExternalFileId(), ScDocument::GetExternalRefManager(), ScExternalRefManager::getRealRangeName(), ScExternalRefManager::isValidRangeName(), maExternalFiles, maExternalLinks, maRawToken, MAXSTRLEN, ScCompiler::Convention::parseExternalName(), pConv, rDoc, and ScRawToken::SetExternalName().
Referenced by NextNewToken().
|
private |
Definition at line 3534 of file compiler.cxx.
References aName, ScRawToken::eOp, StarBASIC::Find(), SfxApplication::GetBasic(), SfxObjectShell::GetBasic(), ScDocument::GetDocumentShell(), formula::FormulaCompiler::GetGrammar(), SbxVariable::GetType(), vcl::SolarMutexTryAndBuyGuard::isAcquired(), SbxValue::IsFixed(), maRawToken, ocMacro, rDoc, SAL_WARN, SbxEMPTY, SbxVOID, and ScRawToken::SetExternal().
Referenced by NextNewToken().
|
private |
Definition at line 3629 of file compiler.cxx.
References aName, ScRangeName::findByUpperName(), GetRangeData(), ScDocument::GetRangeName(), maRawToken, mnCurrentSheetEndPos, mnCurrentSheetTab, pData, rDoc, and ScRawToken::SetName().
Referenced by NextNewToken(), and ParseSingleReference().
|
private |
Definition at line 2907 of file compiler.cxx.
References cSymbol, formula::FormulaCompiler::eLastOp, ScUnoAddInCollection::FindFunction(), ScGlobal::GetAddInCollection(), ScGlobal::GetLegacyFuncCollection(), ScRawToken::GetOpCode(), maRawToken, formula::FormulaCompiler::meGrammar, formula::FormulaCompiler::mxSymbols, ScRawToken::NewOpCode(), ocArrayColSep, ocArrayOpen, ocArrayRowSep, ocB, ocBackSolver, ocCeil, ocCeil_Math, ocColor, ocCurrent, ocEasterSunday, ocEffect, ocErrorType, ocFDist_LT, ocFInv_LT, ocFloor, ocFloor_Math, ocMultiArea, ocNegSub, ocOpen, ocRRI, ocSep, ocStyle, ocSub, ocTDist, pName, SC_OPCODE_START_BIN_OP, SC_OPCODE_STOP_BIN_OP, ScRawToken::SetExternal(), and ScRawToken::SetOpCode().
Referenced by NextNewToken().
|
private |
Definition at line 3094 of file compiler.cxx.
References o3tl::equalsAscii(), i, maRawToken, ocInternalBegin, ocInternalEnd, pInternal, and ScRawToken::SetOpCode().
Referenced by NextNewToken().
|
private |
Definition at line 3218 of file compiler.cxx.
References mnPredetectedReference, ParseDoubleReference(), and ParseSingleReference().
Referenced by ParsePredetectedReference().
|
private |
Definition at line 3231 of file compiler.cxx.
References mnPredetectedReference, nPos, ParseDoubleReference(), ParseErrorConstant(), ParsePredetectedErrRefReference(), and ParseSingleReference().
Referenced by NextNewToken().
|
private |
Definition at line 3422 of file compiler.cxx.
References cSymbol, ScGlobal::FindUnquoted(), GetCharTableFlags(), ScGlobal::getLocaleData(), LocaleDataWrapper::getNumDecimalSep(), LocaleDataWrapper::getNumDecimalSepAlt(), ScCompiler::Convention::getSpecialSymbol(), ScDocument::GetTable(), MAXSTRLEN, mbRewind, ScCompiler::Convention::meConv, mnCurrentSheetEndPos, mnCurrentSheetTab, mnRangeOpPosInSymbol, formula::FormulaCompiler::mxSymbols, nPos, nSrcPos, ParseDoubleReference(), ParseSingleReference(), pConv, rDoc, ScCompiler::Convention::SHEET_SEPARATOR, and ValueExp.
Referenced by NextNewToken().
|
private |
Definition at line 3345 of file compiler.cxx.
References aPos, COL_ABS, COL_VALID, ScGlobal::getCharClass(), ScDocument::GetExternalRefManager(), ScExternalRefManager::getRealTableName(), ScDocument::GetSheetLimits(), HasPossibleNamedRangeConflict(), ScSingleRefData::InitAddress(), maExternalFiles, maExternalLinks, maRawToken, ScAddress::ExternalInfo::maTabName, ScAddress::ExternalInfo::mbExternal, ScCompiler::Convention::meConv, mnCurrentSheetEndPos, mnCurrentSheetTab, ScAddress::ExternalInfo::mnFileId, ScAddress::Parse(), ParseNamedRange(), pConv, rDoc, ROW_ABS, ROW_VALID, ScSingleRefData::SetAddress(), ScSingleRefData::SetColDeleted(), ScSingleRefData::SetColRel(), ScRawToken::SetExternalSingleRef(), ScSingleRefData::SetFlag3D(), ScSingleRefData::SetRowDeleted(), ScSingleRefData::SetRowRel(), ScRawToken::SetSingleReference(), ScSingleRefData::SetTabDeleted(), ScSingleRefData::SetTabRel(), ScAddress::Tab(), TAB_3D, TAB_ABS, TAB_VALID, VALID, and ZERO.
Referenced by ParsePredetectedErrRefReference(), ParsePredetectedReference(), and ParseReference().
|
private |
Definition at line 3203 of file compiler.cxx.
References cSymbol, svl::SharedString::getData(), svl::SharedString::getDataIgnoreCase(), ScDocument::GetSharedStringPool(), svl::SharedStringPool::intern(), maRawToken, p, rDoc, and ScRawToken::SetString().
Referenced by NextNewToken().
bool ScCompiler::ParseTableRefColumn | ( | const OUString & | rName | ) |
Definition at line 4065 of file compiler.cxx.
References ScRange::aEnd, aName, aPos, ScFormulaCell::aPos, ScRange::aStart, aStr, CELLTYPE_FORMULA, eType, ScDBCollection::NamedDBs::findByIndex(), ScCellIterator::first(), ScDBData::GetArea(), ScFormulaCell::GetCode(), formula::FormulaTokenArray::GetCodeLen(), ScDBData::GetColumnNameOffset(), ScDocument::GetDBCollection(), ScCellIterator::getFormulaCell(), ScDBCollection::getNamedDBs(), ScCellIterator::GetPos(), ScCellIterator::getString(), ScGlobal::GetTransliteration(), ScCellIterator::getType(), ScDBData::HasHeader(), ScCellIterator::hasString(), ScAddress::IncCol(), ScSingleRefData::InitAddress(), utl::TransliterationWrapper::isEqual(), maRawToken, maTableRefs, ScCellIterator::next(), p, rDoc, ScAddress::Row(), SAL_WARN, ScAddress::SetRow(), ScRawToken::SetSingleReference(), ScAddress::SetTab(), and ScAddress::Tab().
Referenced by NextNewToken().
bool ScCompiler::ParseTableRefItem | ( | const OUString & | rName | ) |
Definition at line 3993 of file compiler.cxx.
References ScTableRefToken::ALL, ScTableRefToken::DATA, ScTableRefToken::HEADERS, maRawToken, maTableRefs, formula::FormulaCompiler::mxSymbols, ocTableRefItemAll, ocTableRefItemData, ocTableRefItemHeaders, ocTableRefItemThisRow, ocTableRefItemTotals, p, ScRawToken::SetOpCode(), ScTableRefToken::THIS_ROW, and ScTableRefToken::TOTALS.
Referenced by NextNewToken().
|
private |
Definition at line 3115 of file compiler.cxx.
References aFormula, ScDBCollection::NamedDBs::findByUpperName(), ScDocument::GetDBCollection(), formula::FormulaCompiler::GetGrammar(), ScDBCollection::getNamedDBs(), GetRangeData(), SvNumberFormatter::GetStandardIndex(), SvNumberFormatter::GetType(), SvNumberFormatter::IsNumberFormat(), LANGUAGE_ENGLISH_US, lcl_ParenthesisFollows(), maPendingOpCodes, maRawToken, mpFormatter, formula::FormulaCompiler::mxSymbols, nIndex, nSrcPos, nType, ocClose, ocFalse, ocNone, ocOpen, ocTrue, rDoc, ScRawToken::SetDouble(), SetError(), and ScRawToken::SetOpCode().
Referenced by NextNewToken().
|
overrideprivatevirtual |
Reimplemented from formula::FormulaCompiler.
Definition at line 6276 of file compiler.cxx.
References mPendingImplicitIntersectionOptimizations, formula::FormulaCompiler::pCode, and ReplaceDoubleRefII().
|
private |
Definition at line 6297 of file compiler.cxx.
References ScRange::aEnd, aPos, ScRange::aStart, DoubleRefToPosSingleRefScalarCase(), ScDocument::GetSheetLimits(), formula::FormulaToken::IncRef(), ScSingleRefData::InitFlags(), ScSingleRefData::IsColRel(), ScSingleRefData::IsRowRel(), ScSingleRefData::IsTabRel(), rDoc, ScComplexRefData::Ref1, ScComplexRefData::Ref2, ScSingleRefData::SetAddress(), ScSingleRefData::SetColRel(), ScSingleRefData::SetRowRel(), ScSingleRefData::SetTabRel(), and ScComplexRefData::toAbs().
Referenced by PostProcessCode().
void ScCompiler::SetAutoCorrection | ( | bool | bVal | ) |
When auto correction is set, the jump command reorder must be enabled.
Definition at line 4147 of file compiler.cxx.
References formula::FormulaCompiler::bAutoCorrect, formula::FormulaCompiler::mbJumpCommandReorder, and formula::FormulaCompiler::mbStopOnError.
Referenced by ScViewFunc::EnterData().
|
inline |
Definition at line 433 of file compiler.hxx.
Referenced by ScTabViewShell::IsRefInputMode().
|
overrideprivatevirtual |
Reimplemented from formula::FormulaCompiler.
Definition at line 2056 of file compiler.cxx.
References formula::FormulaTokenArray::GetCodeError(), formula::FormulaCompiler::pArr, and formula::FormulaTokenArray::SetCodeError().
Referenced by CompileString(), HandleColRowName(), HandleDbData(), HandleExternalReference(), HandleRange(), HandleTableRef(), NextNewToken(), NextSymbol(), and ParseValue().
|
inline |
Definition at line 477 of file compiler.hxx.
Referenced by ScRangeData::CompileRangeData(), ScViewFunc::EnterData(), and IMPL_LINK().
|
inline |
Set external link info for ScAddress::CONV_XL_OOX.
Definition at line 468 of file compiler.hxx.
Referenced by oox::xls::DefinedName::getScTokens(), oox::xls::ExternalName::importDefinedName(), and ScFormulaParserObj::SetCompilerFlags().
void ScCompiler::SetFormulaLanguage | ( | const OpCodeMapPtr & | xMap | ) |
Set symbol map if not empty.
Definition at line 316 of file compiler.cxx.
References ScGlobal::getCharClass(), GetCharClassEnglish(), GetCharClassLocalized(), formula::FormulaCompiler::GetGrammar(), LanguageTag::getLanguage(), CharClass::getLanguageTag(), mbCharClassesDiffer, formula::FormulaCompiler::mxSymbols, pCharClass, and SetGrammarAndRefConvention().
Referenced by ScFormulaParserObj::SetCompilerFlags(), and SetGrammar().
void ScCompiler::SetGrammar | ( | const formula::FormulaGrammar::Grammar | eGrammar | ) |
Definition at line 260 of file compiler.cxx.
References formula::FormulaCompiler::GetFinalOpCodeMap(), formula::FormulaCompiler::GetGrammar(), formula::FormulaCompiler::meGrammar, formula::FormulaCompiler::mxSymbols, SetFormulaLanguage(), and SetGrammarAndRefConvention().
Referenced by ScConditionEntry::Compile(), CompileString(), ScXMLConditionalFormatContext::endFastElement(), ScCompiler(), ScConditionEntryObj::setPropertyValue(), and XclXmlUtils::ToOUString().
|
private |
Set grammar and reference convention from within SetFormulaLanguage() or SetGrammar().
eNewGrammar | The new grammar to be set and the associated reference convention. |
eOldGrammar | The previous grammar that was active before SetFormulaLanguage(). |
Definition at line 339 of file compiler.cxx.
References ScDocument::GetAddressConvention(), formula::FormulaCompiler::meGrammar, rDoc, and SetRefConvention().
Referenced by SetFormulaLanguage(), and SetGrammar().
void ScCompiler::SetNumberFormatter | ( | SvNumberFormatter * | pFormatter | ) |
Definition at line 311 of file compiler.cxx.
References mpFormatter.
void ScCompiler::SetRefConvention | ( | const Convention * | pConvP | ) |
Definition at line 2049 of file compiler.cxx.
References ScCompiler::Convention::meConv, formula::FormulaCompiler::meGrammar, and pConv.
Referenced by ScInterpreter::ScIndirect(), ScFormulaParserObj::SetCompilerFlags(), SetGrammarAndRefConvention(), and SetRefConvention().
void ScCompiler::SetRefConvention | ( | const formula::FormulaGrammar::AddressConvention | eConv | ) |
Definition at line 2004 of file compiler.cxx.
References GetRefConvention(), p, and SetRefConvention().
|
inline |
Definition at line 434 of file compiler.hxx.
Referenced by ScFormulaParserObj::SetCompilerFlags().
|
private |
Definition at line 5171 of file compiler.cxx.
References ScSingleRefData::IsColRel(), ScSingleRefData::IsRowRel(), ScSingleRefData::IsTabRel(), formula::FormulaCompiler::pArr, formula::FormulaTokenArray::References(), ScSingleRefData::SetRelName(), svDoubleRef, and t.
Referenced by HandleExternalReference(), and HandleRange().
|
private |
Definition at line 6107 of file compiler.cxx.
References formula::ForceArray, formula::FormulaToken::GetInForceArray(), ScParameterClassification::GetParameterType(), formula::FormulaCompiler::mbMatrixFlag, formula::Reference, formula::ReferenceOrForceArray, formula::ReferenceOrRefArray, SAL_MAX_UINT16, and formula::SuppressedReferenceOrForceArray.
Referenced by HandleIIOpCodeInternal().
|
private |
Definition at line 4340 of file compiler.cxx.
References formula::FormulaCompiler::meGrammar, pCharClass, and CharClass::uppercase().
Referenced by NextNewToken().
Definition at line 510 of file compiler.hxx.
Referenced by ScFormulaCell::InterpretFormulaGroupOpenCL().
|
friend |
Definition at line 257 of file compiler.hxx.
|
private |
Definition at line 287 of file compiler.hxx.
Referenced by CompileString(), NextNewToken(), NextSymbol(), and ParseValue().
|
private |
Definition at line 275 of file compiler.hxx.
Referenced by AdjustSumRangeShape(), AutoCorrectParsedSymbol(), CompileString(), CreateStringFromDoubleRef(), CreateStringFromIndex(), CreateStringFromSingleRef(), ExtendRangeReference(), GetRangeData(), HandleColRowName(), HandleDbData(), HandleExternalReference(), HandleRange(), HandleTableRef(), MoveRelWrap(), ParseColRowName(), ParseDoubleReference(), ParseSingleReference(), ParseTableRefColumn(), and ReplaceDoubleRefII().
|
private |
Definition at line 286 of file compiler.hxx.
Referenced by NextNewToken(), NextSymbol(), ParseOpCode(), ParseReference(), and ParseString().
|
staticprivate |
Definition at line 24 of file odffmap.cxx.
Referenced by fillFromAddInMap(), and GetAddInMapCount().
|
private |
Definition at line 303 of file compiler.hxx.
Referenced by CompileString(), ParseDoubleReference(), ParseExternalNamedRange(), and ParseSingleReference().
|
private |
Definition at line 284 of file compiler.hxx.
Referenced by ParseDoubleReference(), ParseExternalNamedRange(), and ParseSingleReference().
|
private |
Definition at line 291 of file compiler.hxx.
Referenced by NextNewToken(), and ParseValue().
|
private |
Definition at line 289 of file compiler.hxx.
Referenced by CompileString(), NextNewToken(), ParseBoolean(), ParseColRowName(), ParseDBRange(), ParseDoubleReference(), ParseErrorConstant(), ParseExternalNamedRange(), ParseMacro(), ParseNamedRange(), ParseOpCode(), ParseOpCode2(), ParseSingleReference(), ParseString(), ParseTableRefColumn(), ParseTableRefItem(), and ParseValue().
|
private |
Definition at line 314 of file compiler.hxx.
Referenced by CompileString(), NextNewToken(), NextSymbol(), ParseTableRefColumn(), and ParseTableRefItem().
|
private |
Definition at line 305 of file compiler.hxx.
Referenced by GetSetupTabNames().
|
private |
Definition at line 294 of file compiler.hxx.
Referenced by NextNewToken(), and SetFormulaLanguage().
|
private |
Definition at line 299 of file compiler.hxx.
Referenced by CompileString().
|
private |
Definition at line 301 of file compiler.hxx.
Referenced by CreateStringFromIndex().
|
private |
Definition at line 300 of file compiler.hxx.
Referenced by NextNewToken(), and ParseReference().
|
private |
Definition at line 298 of file compiler.hxx.
Referenced by NextNewToken().
|
private |
Definition at line 281 of file compiler.hxx.
Referenced by ParseNamedRange(), ParseReference(), and ParseSingleReference().
|
private |
Definition at line 280 of file compiler.hxx.
Referenced by ParseNamedRange(), ParseReference(), and ParseSingleReference().
|
private |
Definition at line 295 of file compiler.hxx.
Referenced by NextNewToken(), NextSymbol(), ParsePredetectedErrRefReference(), and ParsePredetectedReference().
|
private |
Definition at line 296 of file compiler.hxx.
Referenced by NextSymbol(), and ParseReference().
|
private |
Definition at line 326 of file compiler.hxx.
Referenced by HandleIIOpCodeInternal(), and PostProcessCode().
|
private |
Definition at line 277 of file compiler.hxx.
Referenced by ParseValue(), and SetNumberFormatter().
|
private |
Definition at line 278 of file compiler.hxx.
Referenced by CreateStringFromSingleRef().
|
private |
Definition at line 327 of file compiler.hxx.
Referenced by HandleIIOpCodeInternal().
Definition at line 329 of file compiler.hxx.
Referenced by HandleIIOpCode().
|
private |
Definition at line 288 of file compiler.hxx.
Referenced by CompileString(), lcl_isValidQuotedText(), NextNewToken(), NextSymbol(), ParseReference(), and ParseValue().
|
private |
Definition at line 293 of file compiler.hxx.
Referenced by NextNewToken(), NextSymbol(), SetFormulaLanguage(), and ToUpperAsciiOrI18nIsAscii().
|
staticprivate |
Definition at line 261 of file compiler.hxx.
Referenced by DeInit(), and GetCharClassEnglish().
|
staticprivate |
Definition at line 262 of file compiler.hxx.
Referenced by DeInit(), and GetCharClassLocalized().
|
private |
Definition at line 297 of file compiler.hxx.
Referenced by AutoCorrectParsedSymbol(), CreateStringFromDoubleRef(), CreateStringFromExternal(), CreateStringFromIndex(), CreateStringFromSingleRef(), NextSymbol(), ParseDoubleReference(), ParseExternalNamedRange(), ParseReference(), ParseSingleReference(), and SetRefConvention().
|
staticprivate |
Definition at line 263 of file compiler.hxx.
Referenced by ScCompiler::Convention::Convention(), and IsCharFlagAllConventions().
|
private |
Definition at line 274 of file compiler.hxx.
Referenced by AdjustSumRangeShape(), AutoCorrectParsedSymbol(), CompileString(), CorrectSumRange(), CreateStringFromDoubleRef(), CreateStringFromExternal(), CreateStringFromIndex(), CreateStringFromSingleRef(), ExtendRangeReference(), GetRangeData(), GetSetupTabNames(), HandleColRowName(), HandleDbData(), HandleExternalReference(), HandleRange(), HandleTableRef(), HasPossibleNamedRangeConflict(), lcl_parseExternalName(), MoveRelWrap(), NextNewToken(), ParseColRowName(), ParseDBRange(), ParseDoubleReference(), ParseExternalNamedRange(), ParseMacro(), ParseNamedRange(), ParseReference(), ParseSingleReference(), ParseString(), ParseTableRefColumn(), ParseValue(), ReplaceDoubleRefII(), and SetGrammarAndRefConvention().