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... | |
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 | IsErrorConstant (const OUString &) const |
bool | IsTableRefItem (const OUString &) const |
bool | IsTableRefColumn (const OUString &) const |
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 | 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 |
sal_Int32 | NextSymbol (bool bInArray) |
bool | IsValue (const OUString &) |
bool | IsOpCode (const OUString &, bool bInArray) |
bool | IsOpCode2 (const OUString &) |
bool | IsString () |
bool | IsReference (const OUString &rSymbol, const OUString *pErrRef=nullptr) |
bool | IsSingleReference (const OUString &rSymbol, const OUString *pErrRef=nullptr) |
bool | IsDoubleReference (const OUString &rSymbol, const OUString *pErrRef=nullptr) |
bool | IsPredetectedReference (const OUString &rSymbol) |
bool | IsPredetectedErrRefReference (const OUString &rName, const OUString *pErrRef) |
bool | IsMacro (const OUString &) |
bool | IsNamedRange (const OUString &) |
bool | IsExternalNamedRange (const OUString &rSymbol, bool &rbInvalidExternalNameRange) |
bool | IsDBRange (const OUString &) |
bool | IsColRowName (const OUString &) |
bool | IsBoolean (const OUString &) |
void | AutoCorrectParsedSymbol () |
void | AdjustSheetLocalNameRelReferences (SCTAB nDelta) |
void | SetRelNameReference () |
ScRangeData * | GetRangeData (const formula::FormulaToken &pToken) const |
Obtain range data for ocName token, global or sheet local. More... | |
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 const CharClass * | GetCharClassEnglish () |
static const CharClass * | GetCharClassLocalized () |
static bool | ParameterMayBeImplicitIntersection (const formula::FormulaToken *token, int parameter) |
Private Attributes | |
ScDocument & | rDoc |
ScAddress | aPos |
SvNumberFormatter * | mpFormatter |
const ScInterpreterContext * | mpInterpreterContext |
SCTAB | mnCurrentSheetTab |
sal_Int32 | mnCurrentSheetEndPos |
css::uno::Sequence< css::sheet::ExternalLinkInfo > | maExternalLinks |
sal_Unicode | cSymbol [MAXSTRLEN+1] |
OUString | aFormula |
sal_Int32 | nSrcPos |
ScRawToken | maRawToken |
std::queue< OpCode > | maPendingOpCodes |
const CharClass * | pCharClass |
bool | mbCharClassesDiffer |
sal_uInt16 | mnPredetectedReference |
sal_Int32 | mnRangeOpPosInSymbol |
const Convention * | pConv |
ExtendedErrorDetection | meExtendedErrorDetection |
bool | mbCloseBrackets |
bool | mbRewind |
std::vector< sal_uInt16 > | maExternalFiles |
std::vector< OUString > | maTabNames |
std::vector< TableRefEntry > | maTableRefs |
std::vector< PendingImplicitIntersectionOptimization > | mPendingImplicitIntersectionOptimizations |
std::set< formula::FormulaTokenRef > | mUnhandledPossibleImplicitIntersections |
std::set< OpCode > | mUnhandledPossibleImplicitIntersectionsOpCodes |
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 176 of file compiler.hxx.
Enumerator | |
---|---|
EXTENDED_ERROR_DETECTION_NONE | |
EXTENDED_ERROR_DETECTION_NAME_BREAK | |
EXTENDED_ERROR_DETECTION_NAME_NO_BREAK |
Definition at line 180 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 1878 of file compiler.cxx.
References 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 1900 of file compiler.cxx.
References 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 1831 of file compiler.cxx.
References 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 1853 of file compiler.cxx.
References ScDocument::GetGrammar(), formula::FormulaGrammar::GRAM_UNSPECIFIED, and SetGrammar().
|
overridevirtual |
Definition at line 1925 of file compiler.cxx.
Definition at line 4992 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 6245 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 6135 of file compiler.cxx.
References AnnotateTrimOnDoubleRefs().
|
private |
Definition at line 6311 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 4021 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 1929 of file compiler.cxx.
References EMPTY_OUSTRING, ScGlobal::getCharClassPtr(), 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 4530 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(), ScNameDefDlg::IsFormulaValid(), ScNameDlg::IsFormulaValid(), ScSimpleFormulaCalculator::ScSimpleFormulaCalculator(), and ScImportExport::Sylk2Doc().
std::unique_ptr< ScTokenArray > ScCompiler::CompileString | ( | const OUString & | rFormula, |
const OUString & | rFormulaNmsp | ||
) |
Definition at line 4845 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 6297 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 5243 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 5074 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 5250 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(), 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 5116 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 5187 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 4497 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 167 of file compiler.cxx.
Referenced by ScGlobal::Clear().
|
static |
TODO : Move this to somewhere appropriate.
Definition at line 6180 of file compiler.cxx.
References ScRange::aEnd, assert(), ScRange::aStart, ScAddress::Col(), ScAddress::Row(), ScAddress::Set(), and ScAddress::Tab().
Referenced by ReplaceDoubleRefII().
|
static |
Definition at line 5342 of file compiler.cxx.
References ScGlobal::getCharClassPtr(), CharClass::getStringType(), CharClass::isAlphaNumericType(), CharClass::isNumericType(), nPos, and nType.
Referenced by CreateStringFromSingleRef().
|
overrideprivatevirtual |
Reimplemented from formula::FormulaCompiler.
Definition at line 5359 of file compiler.cxx.
References aPos, extendRangeReference(), ScDocument::GetSheetLimits(), and rDoc.
|
overrideprivatevirtual |
Reimplemented from formula::FormulaCompiler.
Definition at line 5364 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 148 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 135 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 107 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 317 of file compiler.cxx.
References ScUnoAddInCollection::FindFunction(), and ScGlobal::GetAddInCollection().
|
staticprivate |
Definition at line 138 of file odffmap.cxx.
References g_aAddInMap, and SAL_N_ELEMENTS.
|
staticprivate |
Definition at line 204 of file compiler.cxx.
References comphelper::getProcessComponentContext().
|
staticprivate |
Definition at line 215 of file compiler.cxx.
References comphelper::getProcessComponentContext(), and Application::GetSettings().
|
inlineprivate |
Access the CharTable flags.
Definition at line 510 of file compiler.hxx.
References ScCompiler::Convention::getCharTableFlags(), and NONE.
Referenced by AutoCorrectParsedSymbol(), IsReference(), and NextSymbol().
|
inline |
Definition at line 452 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 1968 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 5941 of file compiler.cxx.
References ScParameterClassification::GetParameterType().
|
inline |
Definition at line 464 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 4874 of file compiler.cxx.
References ScDocument::FindRangeNameBySheetAndIndex(), formula::FormulaToken::GetIndex(), formula::FormulaToken::GetSheet(), and rDoc.
Referenced by CreateStringFromIndex(), and HandleRange().
|
static |
Definition at line 1986 of file compiler.cxx.
Referenced by ScDocument::GetSheetSeparator(), and SetRefConvention().
|
private |
sheet names mangled for the current grammar for output
Definition at line 264 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 5626 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 5394 of file compiler.cxx.
References formula::FormulaTokenArray::Add(), ScTokenArray::AddDoubleReference(), ScTokenArray::AddSingleReference(), ScRange::aEnd, aPos, ScRange::aStart, ScAddress::Col(), ScDocument::GetColNameRanges(), ScDocument::GetDocOptions(), formula::FormulaToken::GetOpCode(), ScRangePair::GetRange(), ScDocument::GetRowNameRanges(), ScDocument::GetSheetLimits(), formula::FormulaCompiler::GetToken(), ScRefCellValue::hasString(), i, ScRange::In(), 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 5605 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 4947 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 5968 of file compiler.cxx.
References formula::FormulaToken::GetOpCode(), HandleIIOpCodeInternal(), formula::FormulaCompiler::mbComputeII, and mUnhandledPossibleImplicitIntersectionsOpCodes.
|
private |
Definition at line 5981 of file compiler.cxx.
References assert(), 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 4879 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 5642 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.
|
inline |
Definition at line 480 of file compiler.hxx.
Referenced by ScFormulaCell::InterpretFormulaGroupOpenCL().
|
private |
Definition at line 3834 of file compiler.cxx.
References maRawToken, formula::FormulaCompiler::mxSymbols, ocFalse, ocTrue, and ScRawToken::SetOpCode().
Referenced by NextNewToken().
|
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 5053 of file compiler.cxx.
References formula::FormulaGrammar::CONV_LAST, formula::FormulaGrammar::CONV_UNSPECIFIED, ScGlobal::getCharClassPtr(), CharClass::isLetterNumeric(), and pConventions.
Referenced by ScfTools::ConvertToScDefinedName(), ScRangeData::IsNameValid(), and ScRangeData::MakeValidName().
|
private |
Definition at line 3587 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(), ScGlobal::GetpTransliteration(), ScRangePair::GetRange(), ScDocument::GetRowNameRanges(), ScDocument::GetSheetLimits(), ScCellIterator::getString(), ScCellIterator::getType(), ScCellIterator::hasString(), ScDocument::HasStringData(), ScSingleRefData::InitAddress(), ScSingleRefData::InitFlags(), 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().
|
inline |
Definition at line 451 of file compiler.hxx.
References formula::FormulaCompiler::bCorrected.
|
private |
Definition at line 3575 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 3217 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 IsPredetectedErrRefReference(), IsPredetectedReference(), and IsReference().
|
static |
Definition at line 181 of file compiler.cxx.
References ScUnoAddInCollection::FindFunction(), ScGlobal::GetAddInCollection(), formula::FormulaCompiler::GetEnglishOpCode(), ScGlobal::GetLegacyFuncCollection(), and ocNone.
Referenced by ScVbaWSFunction::hasMethod().
bool ScCompiler::IsErrorConstant | ( | const OUString & | rName | ) | const |
Definition at line 3848 of file compiler.cxx.
References formula::FormulaCompiler::GetErrorConstant(), maRawToken, and ScRawToken::SetErrorConstant().
Referenced by IsPredetectedReference(), and NextNewToken().
|
private |
Definition at line 3537 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 3428 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 3493 of file compiler.cxx.
References aName, aPos, ScRangeName::findByUpperName(), ScRangeData::GetIndex(), ScDocument::GetRangeName(), maRawToken, mnCurrentSheetEndPos, mnCurrentSheetTab, pData, rDoc, ScRawToken::SetName(), and ScAddress::Tab().
Referenced by NextNewToken().
|
private |
Definition at line 2835 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 3022 of file compiler.cxx.
References i, maRawToken, ocInternalBegin, ocInternalEnd, pInternal, and ScRawToken::SetOpCode().
Referenced by NextNewToken().
|
private |
Definition at line 3130 of file compiler.cxx.
References IsDoubleReference(), IsSingleReference(), and mnPredetectedReference.
Referenced by IsPredetectedReference().
|
private |
Definition at line 3143 of file compiler.cxx.
References IsDoubleReference(), IsErrorConstant(), IsPredetectedErrRefReference(), IsSingleReference(), mnPredetectedReference, and nPos.
Referenced by NextNewToken().
|
private |
Definition at line 3322 of file compiler.cxx.
References assert(), cSymbol, ScGlobal::FindUnquoted(), GetCharTableFlags(), ScGlobal::getLocaleDataPtr(), LocaleDataWrapper::getNumDecimalSep(), LocaleDataWrapper::getNumDecimalSepAlt(), ScCompiler::Convention::getSpecialSymbol(), ScDocument::GetTable(), IsDoubleReference(), IsSingleReference(), MAXSTRLEN, mbRewind, ScCompiler::Convention::meConv, mnRangeOpPosInSymbol, formula::FormulaCompiler::mxSymbols, nPos, pConv, rDoc, ScCompiler::Convention::SHEET_SEPARATOR, and ValueExp.
Referenced by NextNewToken().
|
private |
Definition at line 3257 of file compiler.cxx.
References aPos, COL_ABS, COL_VALID, ScDocument::GetExternalRefManager(), ScExternalRefManager::getRealTableName(), ScDocument::GetSheetLimits(), ScSingleRefData::InitAddress(), maExternalFiles, maExternalLinks, maRawToken, ScAddress::ExternalInfo::maTabName, ScAddress::ExternalInfo::mbExternal, ScCompiler::Convention::meConv, mnCurrentSheetEndPos, mnCurrentSheetTab, ScAddress::ExternalInfo::mnFileId, ScAddress::Parse(), 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 IsPredetectedErrRefReference(), IsPredetectedReference(), and IsReference().
|
private |
Definition at line 3115 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::IsTableRefColumn | ( | const OUString & | rName | ) | const |
Definition at line 3932 of file compiler.cxx.
References ScRange::aEnd, aName, ScFormulaCell::aPos, aPos, assert(), 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(), ScGlobal::GetpTransliteration(), ScCellIterator::getString(), 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::IsTableRefItem | ( | const OUString & | rName | ) | const |
Definition at line 3860 of file compiler.cxx.
References ScTableRefToken::AddItem(), ScTableRefToken::ALL, assert(), 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 3044 of file compiler.cxx.
References aFormula, formula::FormulaCompiler::GetGrammar(), 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, ScRawToken::SetDouble(), SetError(), and ScRawToken::SetOpCode().
Referenced by NextNewToken().
|
overrideprivatevirtual |
Reimplemented from formula::FormulaCompiler.
Definition at line 5335 of file compiler.cxx.
References ScGlobal::GetAddInCollection(), and ScUnoAddInCollection::LocalizeString().
void ScCompiler::MoveRelWrap | ( | ) |
Definition at line 5028 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 5041 of file compiler.cxx.
References ScRefUpdate::MoveRelWrap(), Ref, formula::FormulaTokenArray::References(), svExternalSingleRef, svSingleRef, and t.
|
private |
Definition at line 4223 of file compiler.cxx.
References formula::FormulaTokenArray::AddBad(), aFormula, assert(), 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::getCharClassPtr(), formula::FormulaTokenArray::GetCodeError(), svl::SharedString::getData(), svl::SharedString::getDataIgnoreCase(), formula::FormulaToken::GetOpCode(), ScDocument::GetSharedStringPool(), svl::SharedStringPool::intern(), IsBoolean(), IsColRowName(), IsDBRange(), IsErrorConstant(), IsExternalNamedRange(), utl::ConfigManager::IsFuzzing(), ScDocument::IsImportingXML(), CharClass::isLetter(), IsMacro(), IsNamedRange(), IsOpCode(), IsOpCode2(), IsPredetectedReference(), IsReference(), IsString(), IsTableRefColumn(), IsTableRefItem(), ScRawToken::IsValidReference(), IsValue(), CharClass::lowercase(), maPendingOpCodes, maRawToken, maTableRefs, mbCharClassesDiffer, mbRewind, meExtendedErrorDetection, mnPredetectedReference, formula::FormulaCompiler::mxSymbols, ScRawToken::NewOpCode(), NextSymbol(), nSrcPos, ocBad, ocErrRef, ocSpaces, ocTableRefOpen, formula::FormulaCompiler::pArr, rDoc, ScRawToken::sbyte, SetError(), ScRawToken::SetOpCode(), ScRawToken::SetString(), ToUpperAsciiOrI18nIsAscii(), and CharClass::uppercase().
Referenced by CompileString().
|
private |
Definition at line 2108 of file compiler.cxx.
References ScCompiler::Convention::ABS_SHEET_PREFIX, formula::FormulaCompiler::aCorrectedSymbol, aFormula, assert(), formula::FormulaCompiler::bAutoCorrect, Bool, Char, CharBool, CharDontCare, CharErrConst, CharIdent, CharString, CharValue, cSymbol, formula::FormulaCompiler::eLastOp, GetCharTableFlags(), ScGlobal::getLocaleDataPtr(), LocaleDataWrapper::getNumDecimalSep(), LocaleDataWrapper::getNumDecimalSepAlt(), LocaleDataWrapper::getNumThousandSep(), ScCompiler::Convention::getSpecialSymbol(), i, Ident, lcl_isUnicodeIgnoreAscii(), lcl_UnicodeStrNCpy(), maTableRefs, MAXSTRLEN, formula::FormulaCompiler::meGrammar, mnPredetectedReference, mnRangeOpPosInSymbol, formula::FormulaCompiler::mxSymbols, nSrcPos, ocArrayColSep, ocArrayRowSep, ocDBArea, ocSep, ocTableRefOpen, OdfLabelOp, OdfLBracket, OdfNameMarker, OdfRBracket, ScCompiler::Convention::parseAnyToken(), 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 5946 of file compiler.cxx.
References Array, ScParameterClassification::GetParameterType(), and Value.
Referenced by HandleIIOpCodeInternal().
|
overrideprivatevirtual |
Reimplemented from formula::FormulaCompiler.
Definition at line 6119 of file compiler.cxx.
References mPendingImplicitIntersectionOptimizations, formula::FormulaCompiler::pCode, and ReplaceDoubleRefII().
|
private |
Definition at line 6140 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 4014 of file compiler.cxx.
References assert(), formula::FormulaCompiler::bAutoCorrect, formula::FormulaCompiler::mbJumpCommandReorder, and formula::FormulaCompiler::mbStopOnError.
Referenced by ScViewFunc::EnterData().
|
inline |
Definition at line 411 of file compiler.hxx.
Referenced by ScTabViewShell::IsRefInputMode().
|
overrideprivatevirtual |
Reimplemented from formula::FormulaCompiler.
Definition at line 2032 of file compiler.cxx.
References formula::FormulaTokenArray::GetCodeError(), formula::FormulaCompiler::pArr, and formula::FormulaTokenArray::SetCodeError().
Referenced by CompileString(), HandleColRowName(), HandleDbData(), HandleExternalReference(), HandleRange(), HandleTableRef(), IsValue(), NextNewToken(), and NextSymbol().
|
inline |
Definition at line 449 of file compiler.hxx.
Referenced by ScRangeData::CompileRangeData().
|
inline |
Set external link info for ScAddress::CONV_XL_OOX.
Definition at line 440 of file compiler.hxx.
Referenced by oox::xls::DefinedName::getScTokens(), and ScFormulaParserObj::SetCompilerFlags().
void ScCompiler::SetFormulaLanguage | ( | const OpCodeMapPtr & | xMap | ) |
Set symbol map if not empty.
Definition at line 283 of file compiler.cxx.
References ScGlobal::getCharClassPtr(), LanguageTag::getLanguage(), and CharClass::getLanguageTag().
Referenced by ScFormulaParserObj::SetCompilerFlags().
void ScCompiler::SetGrammar | ( | const formula::FormulaGrammar::Grammar | eGrammar | ) |
Definition at line 227 of file compiler.cxx.
References assert(), 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 306 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 278 of file compiler.cxx.
void ScCompiler::SetRefConvention | ( | const Convention * | pConvP | ) |
Definition at line 2024 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 1979 of file compiler.cxx.
References GetRefConvention(), and SetRefConvention().
|
private |
Definition at line 5010 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 5952 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 4206 of file compiler.cxx.
References formula::FormulaCompiler::meGrammar, and CharClass::uppercase().
Referenced by NextNewToken().
Definition at line 482 of file compiler.hxx.
Referenced by ScFormulaCell::InterpretFormulaGroupOpenCL().
|
friend |
Definition at line 253 of file compiler.hxx.
|
private |
Definition at line 283 of file compiler.hxx.
Referenced by CompileString(), IsValue(), NextNewToken(), and NextSymbol().
|
private |
Definition at line 271 of file compiler.hxx.
Referenced by AdjustSumRangeShape(), AutoCorrectParsedSymbol(), CompileString(), CreateStringFromDoubleRef(), CreateStringFromIndex(), CreateStringFromSingleRef(), ExtendRangeReference(), HandleColRowName(), HandleDbData(), HandleExternalReference(), HandleRange(), HandleTableRef(), IsColRowName(), IsDoubleReference(), IsNamedRange(), IsSingleReference(), IsTableRefColumn(), MoveRelWrap(), and ReplaceDoubleRefII().
|
private |
Definition at line 282 of file compiler.hxx.
Referenced by IsOpCode(), IsReference(), IsString(), NextNewToken(), and NextSymbol().
|
staticprivate |
Definition at line 25 of file odffmap.cxx.
Referenced by GetAddInMapCount().
|
private |
Definition at line 297 of file compiler.hxx.
Referenced by CompileString(), IsDoubleReference(), IsExternalNamedRange(), and IsSingleReference().
|
private |
Definition at line 280 of file compiler.hxx.
Referenced by IsDoubleReference(), IsExternalNamedRange(), and IsSingleReference().
|
private |
Definition at line 287 of file compiler.hxx.
Referenced by IsValue(), and NextNewToken().
|
mutableprivate |
Definition at line 285 of file compiler.hxx.
Referenced by CompileString(), IsBoolean(), IsColRowName(), IsDBRange(), IsDoubleReference(), IsErrorConstant(), IsExternalNamedRange(), IsMacro(), IsNamedRange(), IsOpCode(), IsOpCode2(), IsSingleReference(), IsString(), IsTableRefColumn(), IsTableRefItem(), IsValue(), and NextNewToken().
|
private |
Definition at line 308 of file compiler.hxx.
Referenced by CompileString(), IsTableRefColumn(), IsTableRefItem(), NextNewToken(), and NextSymbol().
|
private |
Definition at line 299 of file compiler.hxx.
|
private |
Definition at line 290 of file compiler.hxx.
Referenced by NextNewToken().
|
private |
Definition at line 295 of file compiler.hxx.
Referenced by CompileString().
|
private |
Definition at line 296 of file compiler.hxx.
Referenced by IsReference(), and NextNewToken().
|
private |
Definition at line 294 of file compiler.hxx.
Referenced by NextNewToken().
|
private |
Definition at line 277 of file compiler.hxx.
Referenced by IsNamedRange(), and IsSingleReference().
|
private |
Definition at line 276 of file compiler.hxx.
Referenced by IsNamedRange(), and IsSingleReference().
|
private |
Definition at line 291 of file compiler.hxx.
Referenced by IsPredetectedErrRefReference(), IsPredetectedReference(), NextNewToken(), and NextSymbol().
|
private |
Definition at line 292 of file compiler.hxx.
Referenced by IsReference(), and NextSymbol().
|
private |
Definition at line 320 of file compiler.hxx.
Referenced by HandleIIOpCodeInternal(), and PostProcessCode().
|
private |
Definition at line 273 of file compiler.hxx.
Referenced by IsValue().
|
private |
Definition at line 274 of file compiler.hxx.
Referenced by CreateStringFromSingleRef().
|
private |
Definition at line 321 of file compiler.hxx.
Referenced by HandleIIOpCodeInternal().
Definition at line 323 of file compiler.hxx.
Referenced by HandleIIOpCode().
|
private |
Definition at line 284 of file compiler.hxx.
Referenced by CompileString(), IsValue(), lcl_isValidQuotedText(), NextNewToken(), and NextSymbol().
|
private |
Definition at line 289 of file compiler.hxx.
|
staticprivate |
Definition at line 257 of file compiler.hxx.
|
staticprivate |
Definition at line 258 of file compiler.hxx.
|
private |
Definition at line 293 of file compiler.hxx.
Referenced by AutoCorrectParsedSymbol(), CreateStringFromDoubleRef(), CreateStringFromExternal(), CreateStringFromIndex(), CreateStringFromSingleRef(), IsDoubleReference(), IsExternalNamedRange(), IsReference(), IsSingleReference(), NextSymbol(), and SetRefConvention().
|
staticprivate |
Definition at line 259 of file compiler.hxx.
Referenced by IsCharFlagAllConventions().
|
private |
Definition at line 270 of file compiler.hxx.
Referenced by AdjustSumRangeShape(), AutoCorrectParsedSymbol(), CompileString(), CorrectSumRange(), CreateStringFromDoubleRef(), CreateStringFromExternal(), CreateStringFromIndex(), CreateStringFromSingleRef(), ExtendRangeReference(), GetRangeData(), HandleColRowName(), HandleDbData(), HandleExternalReference(), HandleRange(), HandleTableRef(), IsColRowName(), IsDBRange(), IsDoubleReference(), IsExternalNamedRange(), IsMacro(), IsNamedRange(), IsReference(), IsSingleReference(), IsString(), IsTableRefColumn(), MoveRelWrap(), NextNewToken(), and ReplaceDoubleRefII().