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 } |
![]() | |
enum | SeparatorType { SeparatorType::RESOURCE_BASE, SeparatorType::SEMICOLON_BASE } |
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) |
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 () |
![]() | |
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 |
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 |
void | SetComputeIIFlag (bool bSet) |
void | SetMatrixFlag (bool bSet) |
Static Public Member Functions | |
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 | EnQuote (OUString &rStr) |
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_... More... | |
static bool | DoubleRefToPosSingleRefScalarCase (const ScRange &rRange, ScAddress &rAdr, const ScAddress &rFormulaPos) |
TODO : Move this to somewhere appropriate. More... | |
![]() | |
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 const CharClass * | GetCharClassEnglish () |
static const CharClass * | GetCharClassLocalized () |
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 179 of file compiler.hxx.
Enumerator | |
---|---|
EXTENDED_ERROR_DETECTION_NONE | |
EXTENDED_ERROR_DETECTION_NAME_BREAK | |
EXTENDED_ERROR_DETECTION_NAME_NO_BREAK |
Definition at line 183 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 1872 of file compiler.cxx.
References false, 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 1895 of file compiler.cxx.
References false, 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 1823 of file compiler.cxx.
References false, 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 1846 of file compiler.cxx.
References false, getCharClass(), ScDocument::GetGrammar(), formula::FormulaGrammar::GRAM_UNSPECIFIED, and SetGrammar().
|
overridevirtual |
Definition at line 1921 of file compiler.cxx.
|
staticprivate |
Definition at line 2067 of file compiler.cxx.
References ScCompiler::Whitespace::cChar, ScCompiler::Whitespace::nCount, and ScCompiler::Whitespace::reset().
Referenced by NextSymbol().
Definition at line 5125 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 6383 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 6273 of file compiler.cxx.
References AnnotateTrimOnDoubleRefs().
|
private |
Definition at line 6449 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, formula::FormulaCompiler::pCode, ScComplexRefData::SetTrimToData(), svDouble, svDoubleRef, and svSingleRef.
Referenced by AnnotateOperands().
|
private |
Definition at line 4129 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, ScAddress::Parse(), pConv, rDoc, ROW_VALID, VALID, and Word.
Referenced by NextNewToken().
|
static |
all
Definition at line 1925 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 4663 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(), formula::FormulaTokenArray::SetShareable(), comphelper::string::strip(), svSep, svSingleRef, and ScTableRefToken::TABLE.
Referenced by ScVbaNames::Add(), ScOrcusFormula::commit(), ScFormulaCell::Compile(), ScConditionEntry::Compile(), ScRangeData::CompileRangeData(), CompileString(), ScFormulaCell::CompileXML(), XclExpChSourceLink::ConvertDataSequence(), ScXMLConditionalFormatContext::endFastElement(), ScDocFunc::EnterMatrix(), oox::xls::DefinedName::getScTokens(), oox::xls::ExternalName::importDefinedName(), ScNameDefDlg::IsFormulaValid(), ScNameDlg::IsFormulaValid(), ScSimpleFormulaCalculator::ScSimpleFormulaCalculator(), and ScImportExport::Sylk2Doc().
std::unique_ptr< ScTokenArray > ScCompiler::CompileString | ( | const OUString & | rFormula, |
const OUString & | rFormulaNmsp | ||
) |
Definition at line 4978 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 6435 of file compiler.cxx.
References AdjustSumRangeShape(), formula::FormulaToken::DecRef(), ScDocument::GetSheetLimits(), formula::FormulaToken::IncRef(), and rDoc.
Referenced by HandleIIOpCodeInternal().
|
overrideprivatevirtual |
Reimplemented from formula::FormulaCompiler.
Definition at line 5376 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 5207 of file compiler.cxx.
References ScExternalRefManager::convertFileIdToUsedFileId(), ScExternalRefManager::getAllCachedTableNames(), formula::FormulaToken::GetDoubleRef(), ScExternalRefManager::getExternalFileName(), ScDocument::GetExternalRefManager(), formula::FormulaToken::GetIndex(), GetPos(), ScDocument::GetSheetLimits(), formula::FormulaToken::GetSingleRef(), formula::FormulaToken::GetString(), svl::SharedString::getString(), formula::FormulaToken::GetType(), ScCompiler::Convention::makeExternalNameStr(), ScCompiler::Convention::makeExternalRefStr(), pConv, rDoc, SAL_WARN_IF, svExternalDoubleRef, svExternalName, svExternalSingleRef, and t.
|
overrideprivatevirtual |
Reimplemented from formula::FormulaCompiler.
Definition at line 5383 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(), ScRangeData::GetName(), 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 5249 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 5320 of file compiler.cxx.
References aPos, AREA, aStr, ScAddress::Col(), EnQuote(), ScAddress::Format(), formula::FormulaCompiler::GetCurrentOpCodeMap(), ScDocument::GetDBAtCursor(), formula::FormulaCompiler::GetNativeSymbol(), formula::FormulaToken::GetOpCode(), GetSetupTabNames(), ScDocument::GetSheetLimits(), formula::FormulaToken::GetSingleRef(), ScDocument::GetString(), ScDBData::GetTableColumnName(), ScDBData::HasHeader(), ScDocument::HasStringData(), formula::FormulaTokenArray::IsFromRangeName(), formula::FormulaCompiler::maArrIterator, ScCompiler::Convention::makeRefStr(), formula::FormulaCompiler::meGrammar, mpInterpreterContext, ocColRowName, ocErrName, ocErrRef, ocTableRefOpen, 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(), and VALID.
Referenced by CreateStringFromIndex().
void ScCompiler::CreateStringFromXMLTokenArray | ( | OUString & | rFormula, |
OUString & | rFormulaNmsp | ||
) |
Definition at line 4630 of file compiler.cxx.
References formula::FormulaTokenArray::GetArray(), formula::FormulaCompiler::GetGrammar(), formula::FormulaTokenArray::GetLen(), svl::SharedString::getString(), formula::FormulaToken::GetString(), and formula::FormulaCompiler::pArr.
Referenced by ScFormulaCell::CompileXML().
|
static |
Definition at line 168 of file compiler.cxx.
Referenced by ScGlobal::Clear().
|
static |
TODO : Move this to somewhere appropriate.
Definition at line 6318 of file compiler.cxx.
References ScRange::aEnd, ScRange::aStart, ScAddress::Col(), ScAddress::Row(), ScAddress::Set(), and ScAddress::Tab().
Referenced by ScInterpreter::DoubleRefToPosSingleRef(), and ReplaceDoubleRefII().
|
static |
Definition at line 5480 of file compiler.cxx.
References ScGlobal::getCharClass(), CharClass::getStringType(), CharClass::isAlphaNumericType(), CharClass::isNumericType(), nPos, nType, and u.
Referenced by CreateStringFromSingleRef().
|
overrideprivatevirtual |
Reimplemented from formula::FormulaCompiler.
Definition at line 5497 of file compiler.cxx.
References aPos, extendRangeReference(), ScDocument::GetSheetLimits(), and rDoc.
|
overrideprivatevirtual |
Reimplemented from formula::FormulaCompiler.
Definition at line 5502 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 149 of file compiler.cxx.
References aName, ScGlobal::GetAddInCollection(), ScUnoAddInFuncData::GetExcelName(), ScUnoAddInCollection::GetFuncCount(), ScUnoAddInCollection::GetFuncData(), ScUnoAddInFuncData::GetOriginalName(), ScUnoAddInFuncData::GetUpperName(), i, LANGUAGE_ENGLISH_US, and nCount.
|
overrideprivatevirtual |
Reimplemented from formula::FormulaCompiler.
Definition at line 136 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 108 of file compiler.cxx.
References formula::FormulaGrammar::GRAM_ENGLISH, formula::FormulaGrammar::GRAM_ODFF, formula::FormulaGrammar::GRAM_PODF, and ScCompiler::AddInMap::pOriginal.
|
overrideprivatevirtual |
Reimplemented from formula::FormulaCompiler.
Definition at line 318 of file compiler.cxx.
References ScUnoAddInCollection::FindFunction(), and ScGlobal::GetAddInCollection().
|
staticprivate |
Definition at line 137 of file odffmap.cxx.
References g_aAddInMap.
|
staticprivate |
Definition at line 205 of file compiler.cxx.
References comphelper::getProcessComponentContext().
|
staticprivate |
Definition at line 216 of file compiler.cxx.
References comphelper::getProcessComponentContext(), and Application::GetSettings().
|
inlineprivate |
Access the CharTable flags.
Definition at line 533 of file compiler.hxx.
References ScCompiler::Convention::getCharTableFlags(), and NONE.
Referenced by AutoCorrectParsedSymbol(), NextSymbol(), and ParseReference().
|
inline |
Definition at line 475 of file compiler.hxx.
References formula::FormulaCompiler::aCorrectedFormula.
|
static |
Analyzes a string for a 'Doc'Tab construct, or 'Do''c'Tab etc...
Definition at line 1964 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 6079 of file compiler.cxx.
References ScParameterClassification::GetParameterType().
|
inline |
Definition at line 487 of file compiler.hxx.
Referenced by CreateStringFromExternal().
|
private |
Definition at line 3574 of file compiler.cxx.
References aPos, ScRangeName::findByUpperName(), ScDocument::GetRangeName(), pData, rDoc, and ScAddress::Tab().
Referenced by CreateStringFromIndex(), HandleRange(), ParseNamedRange(), and ParseValue().
|
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 5007 of file compiler.cxx.
References ScDocument::FindRangeNameBySheetAndIndex(), formula::FormulaToken::GetIndex(), formula::FormulaToken::GetSheet(), and rDoc.
|
static |
Definition at line 1982 of file compiler.cxx.
Referenced by ScDocument::GetSheetSeparator(), and SetRefConvention().
|
private |
sheet names mangled for the current grammar for output
Definition at line 265 of file compiler.cxx.
References CheckTabQuotes(), and formula::FormulaGrammar::extractRefConvention().
Referenced by CreateStringFromDoubleRef(), and CreateStringFromSingleRef().
bool ScCompiler::GetTokenIfOpCode | ( | OpCode | eOp | ) |
Calls GetToken() if PeekNextNoSpaces() is of given OpCode.
Definition at line 5764 of file compiler.cxx.
References formula::FormulaToken::GetOpCode(), formula::FormulaCompiler::GetToken(), formula::FormulaCompiler::maArrIterator, and formula::FormulaTokenArrayPlainIterator::PeekNextNoSpaces().
Referenced by HandleTableRef().
|
overrideprivatevirtual |
Reimplemented from formula::FormulaCompiler.
Definition at line 5532 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 5743 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 5080 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 6106 of file compiler.cxx.
References formula::FormulaToken::GetOpCode(), HandleIIOpCodeInternal(), formula::FormulaCompiler::mbComputeII, and mUnhandledPossibleImplicitIntersectionsOpCodes.
|
private |
Definition at line 6119 of file compiler.cxx.
References CorrectSumRange(), formula::FormulaToken::GetOpCode(), formula::FormulaToken::GetType(), i, mPendingImplicitIntersectionOptimizations, mUnhandledPossibleImplicitIntersections, ocAverageIf, 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 5012 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 5780 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(), formula::FormulaToken::GetOpCode(), ScDocument::GetSheetLimits(), formula::FormulaToken::GetSingleRef(), formula::FormulaCompiler::GetToken(), GetTokenIfOpCode(), formula::FormulaToken::GetType(), ScDBData::HasHeader(), ScDBData::HasTotals(), ScTableRefToken::HEADERS, ScTableRefToken::HEADERS_DATA, ScAddress::IncRow(), ScSingleRefData::InitFlags(), ScComplexRefData::InitFlags(), ScAddress::INITIALIZE_INVALID, ScRange::Intersection(), ScSingleRefData::IsColRel(), formula::FormulaTokenArray::IsFromRangeName(), ScSingleRefData::IsRelName(), ScRange::IsValid(), formula::FormulaCompiler::maArrIterator, formula::FormulaCompiler::mbJumpCommandReorder, formula::FormulaCompiler::mpToken, ocBad, ocPush, ocRange, ocSep, ocTableRefClose, ocTableRefItemAll, ocTableRefItemData, ocTableRefItemHeaders, ocTableRefItemThisRow, ocTableRefItemTotals, ocTableRefOpen, 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 3593 of file compiler.cxx.
References ScDocument::GetRangeName(), ScRangeName::hasPossibleAddressConflict(), and rDoc.
Referenced by ParseSingleReference().
|
inline |
Definition at line 503 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 5186 of file compiler.cxx.
References formula::FormulaGrammar::CONV_LAST, formula::FormulaGrammar::CONV_UNSPECIFIED, ScGlobal::getCharClass(), CharClass::isLetterNumeric(), and pConventions.
Referenced by ScfTools::ConvertToScDefinedName(), ScRangeData::IsNameValid(), and ScRangeData::MakeValidName().
|
inline |
Definition at line 474 of file compiler.hxx.
References formula::FormulaCompiler::bCorrected.
|
static |
Definition at line 182 of file compiler.cxx.
References ScUnoAddInCollection::FindFunction(), ScGlobal::GetAddInCollection(), formula::FormulaCompiler::GetEnglishOpCode(), ScGlobal::GetLegacyFuncCollection(), and ocNone.
Referenced by ScVbaWSFunction::hasMethod().
|
overrideprivatevirtual |
Reimplemented from formula::FormulaCompiler.
Definition at line 5473 of file compiler.cxx.
References ScGlobal::GetAddInCollection(), and ScUnoAddInCollection::LocalizeString().
void ScCompiler::MoveRelWrap | ( | ) |
Definition at line 5161 of file compiler.cxx.
References aPos, ScDocument::MaxCol(), ScDocument::MaxRow(), ScRefUpdate::MoveRelWrap(), formula::FormulaCompiler::pArr, rDoc, Ref, formula::FormulaTokenArray::References(), svExternalSingleRef, svSingleRef, and t.
Referenced by HandleExternalReference(), HandleRange(), and XclExpFmlaCompImpl::Init().
|
static |
Definition at line 5174 of file compiler.cxx.
References ScRefUpdate::MoveRelWrap(), Ref, formula::FormulaTokenArray::References(), svExternalSingleRef, svSingleRef, and t.
|
private |
Definition at line 4332 of file compiler.cxx.
References formula::FormulaTokenArray::AddBad(), aFormula, aStr, AutoCorrectParsedSymbol(), formula::FormulaCompiler::bAutoCorrect, 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(), 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::NewOpCode(), NextSymbol(), nSrcPos, ocBad, ocErrRef, ocNone, ocSpaces, ocTableRefOpen, ocWhitespace, 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 2116 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 6084 of file compiler.cxx.
References Array, ScParameterClassification::GetParameterType(), and Value.
Referenced by HandleIIOpCodeInternal().
|
private |
Definition at line 3942 of file compiler.cxx.
References maRawToken, formula::FormulaCompiler::mxSymbols, ocFalse, ocTrue, and ScRawToken::SetOpCode().
Referenced by NextNewToken().
|
private |
Definition at line 3687 of file compiler.cxx.
References ScRange::aEnd, aName, ScFormulaCell::aPos, 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(), ScDocOptions::IsLookUpColRowNames(), maRawToken, ScDocument::MaxCol(), ScDocument::MaxRow(), ScCellIterator::next(), ocColRowName, rDoc, ScAddress::Row(), ScSingleRefData::SetAddress(), ScSingleRefData::SetColRel(), ScSingleRefData::SetRowRel(), ScRawToken::SetSingleReference(), ScRangePairList::size(), and ScAddress::Tab().
Referenced by NextNewToken().
|
private |
Definition at line 3675 of file compiler.cxx.
References ScRawToken::eOp, ScDBCollection::NamedDBs::findByUpperName(), ScDocument::GetDBCollection(), ScDBData::GetIndex(), ScDBCollection::getNamedDBs(), maRawToken, ocDBArea, rDoc, and ScRawToken::SetName().
Referenced by NextNewToken().
|
private |
Definition at line 3277 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 3956 of file compiler.cxx.
References formula::FormulaCompiler::GetErrorConstant(), maRawToken, and ScRawToken::SetErrorConstant().
Referenced by NextNewToken(), and ParsePredetectedReference().
|
private |
Definition at line 3637 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 3509 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, ScRawToken::SetExternal(), and void().
Referenced by NextNewToken().
|
private |
Definition at line 3604 of file compiler.cxx.
References aName, ScRangeData::GetIndex(), GetRangeData(), ScDocument::GetRangeName(), maRawToken, mnCurrentSheetEndPos, mnCurrentSheetTab, pData, rDoc, and ScRawToken::SetName().
Referenced by NextNewToken(), and ParseSingleReference().
|
private |
Definition at line 2878 of file compiler.cxx.
References cSymbol, formula::FormulaCompiler::eLastOp, LegacyFuncCollection::findByName(), ScUnoAddInCollection::FindFunction(), ScGlobal::GetAddInCollection(), ScUnoAddInCollection::GetFuncData(), 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, SC_OPCODE_START_BIN_OP, SC_OPCODE_STOP_BIN_OP, ScRawToken::SetExternal(), and ScRawToken::SetOpCode().
Referenced by NextNewToken().
|
private |
Definition at line 3065 of file compiler.cxx.
References o3tl::equalsAscii(), i, maRawToken, ocInternalBegin, ocInternalEnd, pInternal, and ScRawToken::SetOpCode().
Referenced by NextNewToken().
|
private |
Definition at line 3190 of file compiler.cxx.
References mnPredetectedReference, ParseDoubleReference(), and ParseSingleReference().
Referenced by ParsePredetectedReference().
|
private |
Definition at line 3203 of file compiler.cxx.
References mnPredetectedReference, nPos, ParseDoubleReference(), ParseErrorConstant(), ParsePredetectedErrRefReference(), and ParseSingleReference().
Referenced by NextNewToken().
|
private |
Definition at line 3397 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, ParseDoubleReference(), ParseSingleReference(), pConv, rDoc, ScCompiler::Convention::SHEET_SEPARATOR, and ValueExp.
Referenced by NextNewToken().
|
private |
Definition at line 3317 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, mbCharClassesDiffer, 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, ToUpperAsciiOrI18nIsAscii(), CharClass::uppercase(), VALID, and ZERO.
Referenced by ParsePredetectedErrRefReference(), ParsePredetectedReference(), and ParseReference().
|
private |
Definition at line 3175 of file compiler.cxx.
References cSymbol, svl::SharedString::getData(), svl::SharedString::getDataIgnoreCase(), ScDocument::GetSharedStringPool(), svl::SharedStringPool::intern(), maRawToken, rDoc, and ScRawToken::SetString().
Referenced by NextNewToken().
bool ScCompiler::ParseTableRefColumn | ( | const OUString & | rName | ) |
Definition at line 4040 of file compiler.cxx.
References ScRange::aEnd, aName, ScFormulaCell::aPos, 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(), ScTableRefToken::GetIndex(), ScDBCollection::getNamedDBs(), ScCellIterator::GetPos(), ScCellIterator::getString(), ScGlobal::GetTransliteration(), ScCellIterator::getType(), ScDBData::HasHeader(), ScCellIterator::hasString(), ScAddress::IncCol(), ScSingleRefData::InitAddress(), maRawToken, maTableRefs, ScCellIterator::next(), 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 3968 of file compiler.cxx.
References ScTableRefToken::AddItem(), ScTableRefToken::ALL, ScTableRefToken::DATA, ScTableRefToken::HEADERS, maRawToken, maTableRefs, formula::FormulaCompiler::mxSymbols, ocTableRefItemAll, ocTableRefItemData, ocTableRefItemHeaders, ocTableRefItemThisRow, ocTableRefItemTotals, ScRawToken::SetOpCode(), ScTableRefToken::THIS_ROW, and ScTableRefToken::TOTALS.
Referenced by NextNewToken().
|
private |
Definition at line 3087 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 6257 of file compiler.cxx.
References mPendingImplicitIntersectionOptimizations, formula::FormulaCompiler::pCode, and ReplaceDoubleRefII().
|
private |
Definition at line 6278 of file compiler.cxx.
References ScRange::aEnd, aPos, ScRange::aStart, formula::FormulaToken::DecRef(), 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 4122 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 2027 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 472 of file compiler.hxx.
Referenced by ScRangeData::CompileRangeData().
|
inline |
Set external link info for ScAddress::CONV_XL_OOX.
Definition at line 463 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 284 of file compiler.cxx.
References ScGlobal::getCharClass(), LanguageTag::getLanguage(), and CharClass::getLanguageTag().
Referenced by ScFormulaParserObj::SetCompilerFlags().
void ScCompiler::SetGrammar | ( | const formula::FormulaGrammar::Grammar | eGrammar | ) |
Definition at line 228 of file compiler.cxx.
References formula::FormulaGrammar::extractFormulaLanguage(), formula::FormulaGrammar::GRAM_EXTERNAL, and formula::FormulaGrammar::GRAM_UNSPECIFIED.
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 307 of file compiler.cxx.
References formula::FormulaGrammar::CONV_UNSPECIFIED, formula::FormulaGrammar::extractRefConvention(), and formula::FormulaGrammar::GRAM_UNSPECIFIED.
void ScCompiler::SetNumberFormatter | ( | SvNumberFormatter * | pFormatter | ) |
Definition at line 279 of file compiler.cxx.
void ScCompiler::SetRefConvention | ( | const Convention * | pConvP | ) |
Definition at line 2020 of file compiler.cxx.
References ScCompiler::Convention::meConv, formula::FormulaCompiler::meGrammar, and pConv.
Referenced by ScInterpreter::ScIndirect(), ScFormulaParserObj::SetCompilerFlags(), and SetRefConvention().
void ScCompiler::SetRefConvention | ( | const formula::FormulaGrammar::AddressConvention | eConv | ) |
Definition at line 1975 of file compiler.cxx.
References GetRefConvention(), and SetRefConvention().
|
inline |
Definition at line 434 of file compiler.hxx.
Referenced by ScFormulaParserObj::SetCompilerFlags().
|
private |
Definition at line 5143 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 6090 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 4315 of file compiler.cxx.
References formula::FormulaCompiler::meGrammar, and CharClass::uppercase().
Referenced by NextNewToken(), and ParseSingleReference().
Definition at line 505 of file compiler.hxx.
Referenced by ScFormulaCell::InterpretFormulaGroupOpenCL().
|
friend |
Definition at line 256 of file compiler.hxx.
|
private |
Definition at line 286 of file compiler.hxx.
Referenced by CompileString(), NextNewToken(), NextSymbol(), and ParseValue().
|
private |
Definition at line 274 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 285 of file compiler.hxx.
Referenced by NextNewToken(), NextSymbol(), ParseOpCode(), ParseReference(), and ParseString().
|
staticprivate |
Definition at line 24 of file odffmap.cxx.
Referenced by GetAddInMapCount().
|
private |
Definition at line 302 of file compiler.hxx.
Referenced by CompileString(), ParseDoubleReference(), ParseExternalNamedRange(), and ParseSingleReference().
|
private |
Definition at line 283 of file compiler.hxx.
Referenced by ParseDoubleReference(), ParseExternalNamedRange(), and ParseSingleReference().
|
private |
Definition at line 290 of file compiler.hxx.
Referenced by NextNewToken(), and ParseValue().
|
private |
Definition at line 288 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 313 of file compiler.hxx.
Referenced by CompileString(), NextNewToken(), NextSymbol(), ParseTableRefColumn(), and ParseTableRefItem().
|
private |
Definition at line 304 of file compiler.hxx.
|
private |
Definition at line 293 of file compiler.hxx.
Referenced by NextNewToken(), and ParseSingleReference().
|
private |
Definition at line 298 of file compiler.hxx.
Referenced by CompileString().
|
private |
Definition at line 300 of file compiler.hxx.
Referenced by CreateStringFromIndex().
|
private |
Definition at line 299 of file compiler.hxx.
Referenced by NextNewToken(), and ParseReference().
|
private |
Definition at line 297 of file compiler.hxx.
Referenced by NextNewToken().
|
private |
Definition at line 280 of file compiler.hxx.
Referenced by ParseNamedRange(), ParseReference(), and ParseSingleReference().
|
private |
Definition at line 279 of file compiler.hxx.
Referenced by ParseNamedRange(), ParseReference(), and ParseSingleReference().
|
private |
Definition at line 294 of file compiler.hxx.
Referenced by NextNewToken(), NextSymbol(), ParsePredetectedErrRefReference(), and ParsePredetectedReference().
|
private |
Definition at line 295 of file compiler.hxx.
Referenced by NextSymbol(), and ParseReference().
|
private |
Definition at line 325 of file compiler.hxx.
Referenced by HandleIIOpCodeInternal(), and PostProcessCode().
|
private |
Definition at line 276 of file compiler.hxx.
Referenced by ParseValue().
|
private |
Definition at line 277 of file compiler.hxx.
Referenced by CreateStringFromSingleRef().
|
private |
Definition at line 326 of file compiler.hxx.
Referenced by HandleIIOpCodeInternal().
Definition at line 328 of file compiler.hxx.
Referenced by HandleIIOpCode().
|
private |
Definition at line 287 of file compiler.hxx.
Referenced by CompileString(), lcl_isValidQuotedText(), NextNewToken(), NextSymbol(), and ParseValue().
|
private |
Definition at line 292 of file compiler.hxx.
Referenced by NextNewToken(), and NextSymbol().
|
staticprivate |
Definition at line 260 of file compiler.hxx.
|
staticprivate |
Definition at line 261 of file compiler.hxx.
|
private |
Definition at line 296 of file compiler.hxx.
Referenced by AutoCorrectParsedSymbol(), CreateStringFromDoubleRef(), CreateStringFromExternal(), CreateStringFromIndex(), CreateStringFromSingleRef(), NextSymbol(), ParseDoubleReference(), ParseExternalNamedRange(), ParseReference(), ParseSingleReference(), and SetRefConvention().
|
staticprivate |
Definition at line 262 of file compiler.hxx.
Referenced by IsCharFlagAllConventions().
|
private |
Definition at line 273 of file compiler.hxx.
Referenced by AdjustSumRangeShape(), AutoCorrectParsedSymbol(), CompileString(), CorrectSumRange(), CreateStringFromDoubleRef(), CreateStringFromExternal(), CreateStringFromIndex(), CreateStringFromSingleRef(), ExtendRangeReference(), GetRangeData(), HandleColRowName(), HandleDbData(), HandleExternalReference(), HandleRange(), HandleTableRef(), HasPossibleNamedRangeConflict(), MoveRelWrap(), NextNewToken(), ParseColRowName(), ParseDBRange(), ParseDoubleReference(), ParseExternalNamedRange(), ParseMacro(), ParseNamedRange(), ParseReference(), ParseSingleReference(), ParseString(), ParseTableRefColumn(), ParseValue(), and ReplaceDoubleRefII().