LibreOffice Module sc (master) 1
|
Public Member Functions | |
FormulaParserImpl (const FormulaParser &rParent) | |
virtual ApiTokenSequence | importOoxFormula (const ScAddress &rBaseAddress, const OUString &rFormulaString) |
Converts an OOXML formula string. More... | |
virtual ApiTokenSequence | importBiff12Formula (const ScAddress &rBaseAddress, FormulaType eType, SequenceInputStream &rStrm) |
Imports and converts a BIFF12 token array from the passed stream. More... | |
OUString | resolveOleTarget (sal_Int32 nRefId, bool bUseRefSheets) const |
Tries to resolve the passed ref-id to an OLE target URL. More... | |
Public Member Functions inherited from oox::xls::FormulaFinalizer | |
FormulaFinalizer (const OpCodeProvider &rOpCodeProv) | |
ApiTokenSequence | finalizeTokenArray (const ApiTokenSequence &rTokens) |
Finalizes and returns the passed token array. More... | |
Public Member Functions inherited from oox::xls::OpCodeProvider | |
OpCodeProvider (const css::uno::Reference< css::lang::XMultiServiceFactory > &rxModelFactory, bool bImportFilter) | |
virtual | ~OpCodeProvider () override |
OpCodeProvider (OpCodeProvider const &)=default | |
OpCodeProvider (OpCodeProvider &&)=default | |
OpCodeProvider & | operator= (OpCodeProvider const &)=delete |
OpCodeProvider & | operator= (OpCodeProvider &&)=delete |
const ApiOpCodes & | getOpCodes () const |
Returns the structure containing all token op-codes for operators and special tokens used by the Calc document and its formula parser. More... | |
const FunctionInfo * | getFuncInfoFromApiToken (const ApiToken &rToken) const |
Returns the function info for an API token, or 0 on error. More... | |
css::uno::Sequence< css::sheet::FormulaOpCodeMapEntry > | getOoxParserMap () const |
Returns the op-code map that is used by the OOXML formula parser. More... | |
Public Member Functions inherited from oox::xls::FunctionProvider | |
FunctionProvider (bool bImportFilter) | |
virtual | ~FunctionProvider () |
FunctionProvider (FunctionProvider const &)=default | |
FunctionProvider (FunctionProvider &&)=default | |
FunctionProvider & | operator= (FunctionProvider const &)=delete |
FunctionProvider & | operator= (FunctionProvider &&)=delete |
const FunctionInfo * | getFuncInfoFromOoxFuncName (const OUString &rFuncName) const |
Returns the function info for an OOXML function name, or 0 on error. More... | |
const FunctionInfo * | getFuncInfoFromBiff12FuncId (sal_uInt16 nFuncId) const |
Returns the function info for a BIFF12 function index, or 0 on error. More... | |
const FunctionInfo * | getFuncInfoFromMacroName (const OUString &rFuncName) const |
Returns the function info for a macro function referred by the EXTERN.CALL function, or 0 on error. More... | |
Public Member Functions inherited from oox::xls::WorkbookHelper | |
WorkbookHelper (WorkbookGlobals &rBookGlob) | |
virtual | ~WorkbookHelper () |
WorkbookHelper (WorkbookHelper const &)=default | |
WorkbookHelper (WorkbookHelper &&)=default | |
WorkbookHelper & | operator= (WorkbookHelper const &)=delete |
WorkbookHelper & | operator= (WorkbookHelper &&)=delete |
::oox::core::FilterBase & | getBaseFilter () const |
Returns the base filter object (base class of all filters). More... | |
SegmentProgressBar & | getProgressBar () const |
Returns the filter progress bar. More... | |
sal_Int16 | getCurrentSheetIndex () const |
Returns the index of the current Calc sheet, if filter currently processes a sheet. More... | |
bool | isGeneratorKnownGood () const |
Returns true when reading a file generated by a known good generator. More... | |
bool | hasCalculatedFormulaCells () const |
Returns true if any formula cell is calculated. More... | |
void | setCalculatedFormulaCells () |
Set if any formula cell is calculated. More... | |
void | setVbaProjectStorage (const StorageRef &rxVbaPrjStrg) |
Sets the VBA project storage used to import VBA source code and forms. More... | |
void | setCurrentSheetIndex (SCTAB nSheet) |
Sets the index of the current Calc sheet, if filter currently processes a sheet. More... | |
void | finalizeWorkbookImport () |
Final conversion after importing the workbook. More... | |
void | useInternalChartDataTable (bool bInternal) |
ScDocument & | getScDocument () |
const ScDocument & | getScDocument () const |
ScDocumentImport & | getDocImport () |
const ScDocumentImport & | getDocImport () const |
ScEditEngineDefaulter & | getEditEngine () const |
const css::uno::Reference< css::sheet::XSpreadsheetDocument > & | getDocument () const |
Returns a reference to the source/target spreadsheet document model. More... | |
css::uno::Reference< css::sheet::XSpreadsheet > | getSheetFromDoc (sal_Int32 nSheet) const |
Returns a reference to the specified spreadsheet in the document model. More... | |
css::uno::Reference< css::sheet::XSpreadsheet > | getSheetFromDoc (const OUString &rSheet) const |
Returns a reference to the specified spreadsheet in the document model. More... | |
css::uno::Reference< css::table::XCellRange > | getCellRangeFromDoc (const ScRange &rRange) const |
Returns the XCellRange interface for the passed cell range address. More... | |
css::uno::Reference< css::container::XNameContainer > | getCellStyleFamily () const |
Returns the cell styles container from the Calc document. More... | |
css::uno::Reference< css::style::XStyle > | getStyleObject (const OUString &rStyleName, bool bPageStyle) const |
Returns the specified cell or page style from the Calc document. More... | |
RangeDataRet | createNamedRangeObject (OUString &orName, sal_Int32 nIndex, sal_Int32 nNameFlags, bool bHidden) const |
Creates and returns a defined name on-the-fly in the Calc document. More... | |
RangeDataRet | createLocalNamedRangeObject (OUString &orName, sal_Int32 nIndex, sal_Int32 nNameFlags, sal_Int32 nTab, bool bHidden) const |
Creates and returns a defined name on-the-fly in the sheet. More... | |
css::uno::Reference< css::sheet::XDatabaseRange > | createDatabaseRangeObject (OUString &orName, const ScRange &rRangeAddr) const |
Creates and returns a database range on-the-fly in the Calc document. More... | |
css::uno::Reference< css::sheet::XDatabaseRange > | createUnnamedDatabaseRangeObject (const ScRange &rRangeAddr) const |
Creates and returns an unnamed database range on-the-fly in the Calc document. More... | |
ScDBData * | findDatabaseRangeByIndex (sal_uInt16 nIndex) const |
Finds the (already existing) database range of the given formula token index. More... | |
css::uno::Reference< css::style::XStyle > | createStyleObject (OUString &orStyleName, bool bPageStyle) const |
Creates and returns a com.sun.star.style.Style object for cells or pages. More... | |
FormulaBuffer & | getFormulaBuffer () const |
WorkbookSettings & | getWorkbookSettings () const |
Returns the global workbook settings object. More... | |
ViewSettings & | getViewSettings () const |
Returns the workbook and sheet view settings object. More... | |
WorksheetBuffer & | getWorksheets () const |
Returns the worksheet buffer containing sheet names and properties. More... | |
ThemeBuffer & | getTheme () const |
Returns the office theme object read from the theme substorage. More... | |
StylesBuffer & | getStyles () const |
Returns all cell formatting objects read from the styles substream. More... | |
SharedStringsBuffer & | getSharedStrings () const |
Returns the shared strings read from the shared strings substream. More... | |
ExternalLinkBuffer & | getExternalLinks () const |
Returns the external links read from the external links substream. More... | |
DefinedNamesBuffer & | getDefinedNames () const |
Returns the defined names read from the workbook globals. More... | |
TableBuffer & | getTables () const |
Returns the tables collection (equivalent to Calc's database ranges). More... | |
ScenarioBuffer & | getScenarios () const |
Returns the scenarios collection. More... | |
ConnectionsBuffer & | getConnections () const |
Returns the collection of external data connections. More... | |
PivotCacheBuffer & | getPivotCaches () const |
Returns the collection of pivot caches. More... | |
PivotTableBuffer & | getPivotTables () const |
Returns the collection of pivot tables. More... | |
FormulaParser & | getFormulaParser () const |
Returns a shared import formula parser (import filter only!). More... | |
FormulaParser * | createFormulaParser () const |
Returns an unshared import formula parser (import filter only!). More... | |
UnitConverter & | getUnitConverter () const |
Returns the measurement unit converter. More... | |
AddressConverter & | getAddressConverter () const |
Returns the converter for string to cell address/range conversion. More... | |
oox::drawingml::chart::ChartConverter * | getChartConverter () const |
Returns the chart object converter. More... | |
PageSettingsConverter & | getPageSettingsConverter () const |
Returns the page and print settings converter. More... | |
::oox::core::XmlFilterBase & | getOoxFilter () const |
Returns the base OOXML/BIFF12 filter object. More... | |
bool | importOoxFragment (const rtl::Reference< oox::core::FragmentHandler > &rxHandler) |
Imports a fragment using the passed fragment handler, which contains the full path to the fragment stream. More... | |
bool | importOoxFragment (const rtl::Reference< oox::core::FragmentHandler > &rxHandler, oox::core::FastParser &rParser) |
rtl_TextEncoding | getTextEncoding () const |
Returns the text encoding used to import/export byte strings. More... | |
Protected Types | |
typedef ::std::pair< sal_Int32, bool > | WhiteSpace |
typedef ::std::vector< WhiteSpace > | WhiteSpaceVec |
Protected Member Functions | |
void | initializeImport (const ScAddress &rBaseAddress, FormulaType eType) |
Initializes the formula parser before importing a formula. More... | |
ApiTokenSequence | finalizeImport () |
Finalizes the internal token storage after import. More... | |
bool | resetSpaces () |
void | appendLeadingSpaces (sal_Int32 nCount, bool bLineFeed) |
void | appendOpeningSpaces (sal_Int32 nCount, bool bLineFeed) |
void | appendClosingSpaces (sal_Int32 nCount, bool bLineFeed) |
size_t | getFormulaSize () const |
Any & | appendRawToken (sal_Int32 nOpCode) |
Any & | insertRawToken (sal_Int32 nOpCode, size_t nIndexFromEnd) |
size_t | appendWhiteSpaceTokens (const WhiteSpaceVec *pSpaces) |
size_t | insertWhiteSpaceTokens (const WhiteSpaceVec *pSpaces, size_t nIndexFromEnd) |
size_t | getOperandSize (size_t nOpIndex) const |
void | pushOperandSize (size_t nSize) |
size_t | popOperandSize () |
ApiToken & | getOperandToken (size_t nOpIndex, size_t nTokenIndex) |
bool | pushOperandToken (sal_Int32 nOpCode, const WhiteSpaceVec *pSpaces=nullptr) |
template<typename Type > | |
bool | pushValueOperandToken (const Type &rValue, sal_Int32 nOpCode, const WhiteSpaceVec *pSpaces=nullptr) |
template<typename Type > | |
bool | pushValueOperandToken (const Type &rValue) |
bool | pushParenthesesOperandToken (const WhiteSpaceVec *pClosingSpaces=nullptr) |
bool | pushUnaryPreOperatorToken (sal_Int32 nOpCode, const WhiteSpaceVec *pSpaces=nullptr) |
bool | pushUnaryPostOperatorToken (sal_Int32 nOpCode, const WhiteSpaceVec *pSpaces=nullptr) |
bool | pushBinaryOperatorToken (sal_Int32 nOpCode, const WhiteSpaceVec *pSpaces=nullptr) |
bool | pushParenthesesOperatorToken (const WhiteSpaceVec *pOpeningSpaces=nullptr, const WhiteSpaceVec *pClosingSpaces=nullptr) |
bool | pushFunctionOperatorToken (sal_Int32 nOpCode, size_t nParamCount, const WhiteSpaceVec *pLeadingSpaces=nullptr, const WhiteSpaceVec *pClosingSpaces=nullptr) |
bool | pushFunctionOperatorToken (const FunctionInfo &rFuncInfo, size_t nParamCount, const WhiteSpaceVec *pLeadingSpaces=nullptr, const WhiteSpaceVec *pClosingSpaces=nullptr) |
bool | pushOperand (sal_Int32 nOpCode) |
template<typename Type > | |
bool | pushValueOperand (const Type &rValue, sal_Int32 nOpCode) |
template<typename Type > | |
bool | pushValueOperand (const Type &rValue) |
bool | pushBoolOperand (bool bValue) |
bool | pushErrorOperand (double fEncodedError) |
bool | pushBiffBoolOperand (sal_uInt8 nValue) |
bool | pushBiffErrorOperand (sal_uInt8 nErrorCode) |
bool | pushReferenceOperand (const BinSingleRef2d &rRef, bool bDeleted, bool bRelativeAsOffset) |
bool | pushReferenceOperand (const BinComplexRef2d &rRef, bool bDeleted, bool bRelativeAsOffset) |
template<typename Type > | |
bool | pushReferenceOperand (const LinkSheetRange &rSheetRange, const Type &rApiRef) |
bool | pushReferenceOperand (const LinkSheetRange &rSheetRange, const BinSingleRef2d &rRef, bool bDeleted, bool bRelativeAsOffset) |
bool | pushReferenceOperand (const LinkSheetRange &rSheetRange, const BinComplexRef2d &rRef, bool bDeleted, bool bRelativeAsOffset) |
bool | pushEmbeddedRefOperand (const DefinedNameBase &rName, bool bPushBadToken) |
bool | pushDefinedNameOperand (const DefinedNameRef &rxDefName) |
bool | pushExternalFuncOperand (const FunctionInfo &rFuncInfo) |
bool | pushDdeLinkOperand (const OUString &rDdeServer, const OUString &rDdeTopic, const OUString &rDdeItem) |
bool | pushExternalNameOperand (const ExternalNameRef &rxExtName, const ExternalLink &rExtLink) |
bool | pushSpecialTokenOperand (const BinAddress &rBaseAddr) |
bool | pushUnaryPreOperator (sal_Int32 nOpCode) |
bool | pushUnaryPostOperator (sal_Int32 nOpCode) |
bool | pushBinaryOperator (sal_Int32 nOpCode) |
bool | pushParenthesesOperator () |
bool | pushFunctionOperator (sal_Int32 nOpCode, size_t nParamCount) |
bool | pushFunctionOperator (const FunctionInfo &rFuncInfo, size_t nParamCount) |
virtual const FunctionInfo * | resolveBadFuncName (const OUString &rTokenData) const |
Derived classed may try to find a function info struct from the passed string extracted from an OPCODE_BAD token. More... | |
virtual OUString | resolveDefinedName (sal_Int32 nTokenIndex) const |
Derived classed may try to find the name of a defined name with the passed index extracted from an OPCODE_NAME token. More... | |
Protected Member Functions inherited from oox::xls::FunctionProvider | |
const FunctionInfoVector & | getFuncs () const |
Returns the list of all function infos. More... | |
Static Protected Member Functions | |
static void | appendSpaces (WhiteSpaceVec &orSpaces, sal_Int32 nCount, bool bLineFeed) |
Protected Attributes | |
const sal_Int32 | mnMaxApiCol |
const sal_Int32 | mnMaxApiRow |
Maximum column index in own document. More... | |
const sal_Int32 | mnMaxXlsCol |
Maximum row index in own document. More... | |
const sal_Int32 | mnMaxXlsRow |
Maximum column index in imported document. More... | |
ScAddress | maBaseAddr |
Maximum row index in imported document. More... | |
bool | mbRelativeAsOffset |
Base address for relative references. More... | |
bool | mb2dRefsAs3dRefs |
True = relative row/column index is (signed) offset, false = explicit index. More... | |
bool | mbSpecialTokens |
True = convert all 2D references to 3D references in sheet specified by base address. More... | |
Protected Attributes inherited from oox::xls::ApiOpCodes | |
sal_Int32 | OPCODE_UNKNOWN |
sal_Int32 | OPCODE_EXTERNAL |
Internal: function name unknown to mapper. More... | |
sal_Int32 | OPCODE_PUSH |
External function call (e.g. add-ins). More... | |
sal_Int32 | OPCODE_MISSING |
Op-code for common value operands. More... | |
sal_Int32 | OPCODE_SPACES |
Placeholder for a missing function parameter. More... | |
sal_Int32 | OPCODE_NAME |
Spaces between other formula tokens. More... | |
sal_Int32 | OPCODE_DBAREA |
Index of a defined name. More... | |
sal_Int32 | OPCODE_NLR |
Index of a database area. More... | |
sal_Int32 | OPCODE_DDE |
Natural language reference. More... | |
sal_Int32 | OPCODE_MACRO |
DDE link function. More... | |
sal_Int32 | OPCODE_BAD |
Macro function call. More... | |
sal_Int32 | OPCODE_NONAME |
Bad token (unknown name, formula error). More... | |
sal_Int32 | OPCODE_OPEN |
Function style #NAME? error. More... | |
sal_Int32 | OPCODE_CLOSE |
Opening parenthesis. More... | |
sal_Int32 | OPCODE_SEP |
Closing parenthesis. More... | |
sal_Int32 | OPCODE_ARRAY_OPEN |
Function parameter separator. More... | |
sal_Int32 | OPCODE_ARRAY_CLOSE |
Opening brace for constant arrays. More... | |
sal_Int32 | OPCODE_ARRAY_ROWSEP |
Closing brace for constant arrays. More... | |
sal_Int32 | OPCODE_ARRAY_COLSEP |
Row separator in constant arrays. More... | |
sal_Int32 | OPCODE_PLUS_SIGN |
Column separator in constant arrays. More... | |
sal_Int32 | OPCODE_MINUS_SIGN |
Unary plus sign. More... | |
sal_Int32 | OPCODE_PERCENT |
Unary minus sign. More... | |
sal_Int32 | OPCODE_ADD |
Percent sign. More... | |
sal_Int32 | OPCODE_SUB |
Addition operator. More... | |
sal_Int32 | OPCODE_MULT |
Subtraction operator. More... | |
sal_Int32 | OPCODE_DIV |
Multiplication operator. More... | |
sal_Int32 | OPCODE_POWER |
Division operator. More... | |
sal_Int32 | OPCODE_CONCAT |
Power operator. More... | |
sal_Int32 | OPCODE_EQUAL |
String concatenation operator. More... | |
sal_Int32 | OPCODE_NOT_EQUAL |
Compare equal operator. More... | |
sal_Int32 | OPCODE_LESS |
Compare not equal operator. More... | |
sal_Int32 | OPCODE_LESS_EQUAL |
Compare less operator. More... | |
sal_Int32 | OPCODE_GREATER |
Compare less or equal operator. More... | |
sal_Int32 | OPCODE_GREATER_EQUAL |
Compare greater operator. More... | |
sal_Int32 | OPCODE_INTERSECT |
Compare greater or equal operator. More... | |
sal_Int32 | OPCODE_LIST |
Range intersection operator. More... | |
sal_Int32 | OPCODE_RANGE |
Range list operator. More... | |
Private Member Functions | |
void | initReference2d (SingleReference &orApiRef) const |
void | convertReference (SingleReference &orApiRef, const BinSingleRef2d &rRef, bool bDeleted, bool bRelativeAsOffset) const |
void | convertReference (ComplexReference &orApiRef, const BinSingleRef2d &rRef1, const BinSingleRef2d &rRef2, bool bDeleted, bool bRelativeAsOffset) const |
void | convertReference2d (SingleReference &orApiRef, const BinSingleRef2d &rRef, bool bDeleted, bool bRelativeAsOffset) const |
void | convertReference2d (ComplexReference &orApiRef, const BinSingleRef2d &rRef1, const BinSingleRef2d &rRef2, bool bDeleted, bool bRelativeAsOffset) const |
void | convertReference3d (SingleReference &orApiRef, sal_Int32 nSheet, bool bSameSheet, const BinSingleRef2d &rRef, bool bDeleted, bool bRelativeAsOffset) const |
void | convertReference3d (ComplexReference &orApiRef, const LinkSheetRange &rSheetRange, const BinSingleRef2d &rRef1, const BinSingleRef2d &rRef2, bool bDeleted, bool bRelativeAsOffset) const |
virtual const FunctionInfo * | resolveBadFuncName (const OUString &rTokenData) const override |
Derived classed may try to find a function info struct from the passed string extracted from an OPCODE_BAD token. More... | |
virtual OUString | resolveDefinedName (sal_Int32 nTokenIndex) const override |
Derived classed may try to find the name of a defined name with the passed index extracted from an OPCODE_NAME token. More... | |
Static Private Member Functions | |
static void | initReference3d (SingleReference &orApiRef, sal_Int32 nSheet, bool bSameSheet) |
Private Attributes | |
ApiTokenVector | maTokenStorage |
True = special handling for tExp and tTbl tokens, false = exit with error. More... | |
std::vector< size_t > | maTokenIndexes |
Raw unordered token storage. More... | |
std::vector< size_t > | maOperandSizeStack |
Indexes into maTokenStorage. More... | |
WhiteSpaceVec | maLeadingSpaces |
Stack with token sizes per operand. More... | |
WhiteSpaceVec | maOpeningSpaces |
List of whitespaces before next token. More... | |
WhiteSpaceVec | maClosingSpaces |
List of whitespaces before opening parenthesis. More... | |
Additional Inherited Members | |
Public Types inherited from oox::xls::WorkbookHelper | |
typedef std::pair< ScRangeData *, bool > | RangeDataRet |
Static Public Member Functions inherited from oox::xls::FunctionProvider | |
static FunctionLibraryType | getFuncLibTypeFromLibraryName (std::u16string_view rLibraryName) |
Returns the library type associated with the passed URL of a function library (function add-in). More... | |
Static Public Member Functions inherited from oox::xls::WorkbookHelper | |
static WorkbookGlobalsRef | constructGlobals (ExcelFilter &rFilter) |
Definition at line 418 of file formulaparser.cxx.
|
protected |
Definition at line 438 of file formulaparser.cxx.
|
protected |
Definition at line 439 of file formulaparser.cxx.
|
explicit |
Definition at line 548 of file formulaparser.cxx.
References Col, maClosingSpaces, maLeadingSpaces, maOpeningSpaces, maOperandSizeStack, maTokenIndexes, maTokenStorage, oox::xls::ApiTokenVector::reserve(), and Row.
|
protected |
Definition at line 658 of file formulaparser.cxx.
References appendSpaces(), maClosingSpaces, and nCount.
|
protected |
Definition at line 648 of file formulaparser.cxx.
References appendSpaces(), maLeadingSpaces, and nCount.
|
protected |
Definition at line 653 of file formulaparser.cxx.
References appendSpaces(), maOpeningSpaces, and nCount.
|
protected |
Definition at line 668 of file formulaparser.cxx.
References Any, oox::xls::ApiTokenVector::append(), maTokenIndexes, maTokenStorage, and oox::xls::ApiTokenVector::size().
Referenced by appendWhiteSpaceTokens(), pushErrorOperand(), pushOperandToken(), pushParenthesesOperandToken(), pushParenthesesOperatorToken(), pushUnaryPostOperatorToken(), and pushValueOperandToken().
|
staticprotected |
Definition at line 641 of file formulaparser.cxx.
References nCount.
Referenced by appendClosingSpaces(), appendLeadingSpaces(), and appendOpeningSpaces().
|
protected |
Definition at line 680 of file formulaparser.cxx.
References appendRawToken(), and oox::xls::ApiOpCodes::OPCODE_SPACES.
Referenced by pushOperandToken(), pushParenthesesOperandToken(), pushParenthesesOperatorToken(), pushUnaryPostOperatorToken(), and pushValueOperandToken().
|
private |
Definition at line 1094 of file formulaparser.cxx.
References convertReference(), oox::xls::BinSingleRef2d::mbColRel, oox::xls::BinSingleRef2d::mbRowRel, mnMaxApiCol, mnMaxApiRow, mnMaxXlsCol, and mnMaxXlsRow.
|
private |
Definition at line 1067 of file formulaparser.cxx.
References ScAddress::Col(), maBaseAddr, oox::xls::BinSingleRef2d::mbColRel, oox::xls::BinSingleRef2d::mbRowRel, oox::xls::BinSingleRef2d::mnCol, oox::xls::BinSingleRef2d::mnRow, ScAddress::Row(), and oox::setFlag().
Referenced by convertReference(), convertReference2d(), and convertReference3d().
|
private |
Definition at line 1112 of file formulaparser.cxx.
References convertReference(), initReference2d(), and oox::setFlag().
|
private |
Definition at line 1106 of file formulaparser.cxx.
References convertReference(), and initReference2d().
Referenced by pushReferenceOperand().
|
private |
Definition at line 1127 of file formulaparser.cxx.
References convertReference(), oox::xls::LinkSheetRange::getFirstSheet(), oox::xls::LinkSheetRange::getLastSheet(), initReference3d(), oox::xls::LinkSheetRange::is3dRange(), oox::xls::LinkSheetRange::isSameSheet(), and oox::setFlag().
|
private |
Definition at line 1121 of file formulaparser.cxx.
References convertReference(), and initReference3d().
Referenced by pushReferenceOperand().
|
protected |
Finalizes the internal token storage after import.
Definition at line 616 of file formulaparser.cxx.
References oox::xls::FormulaFinalizer::finalizeTokenArray(), maTokenIndexes, and maTokenStorage.
|
protected |
Definition at line 663 of file formulaparser.cxx.
References maTokenIndexes.
Referenced by pushSpecialTokenOperand().
|
protected |
Definition at line 696 of file formulaparser.cxx.
References maOperandSizeStack.
Referenced by getOperandToken().
|
protected |
Definition at line 716 of file formulaparser.cxx.
References getOperandSize(), maOperandSizeStack, maTokenIndexes, maTokenStorage, and SAL_WARN_IF.
Referenced by pushFunctionOperatorToken().
|
virtual |
Imports and converts a BIFF12 token array from the passed stream.
Definition at line 574 of file formulaparser.cxx.
References SAL_WARN.
|
virtual |
Converts an OOXML formula string.
Definition at line 568 of file formulaparser.cxx.
|
protected |
Initializes the formula parser before importing a formula.
Definition at line 589 of file formulaparser.cxx.
References oox::xls::Array, oox::xls::Cell, oox::xls::ApiTokenVector::clear(), oox::xls::CondFormat, eType, maBaseAddr, maOperandSizeStack, maTokenIndexes, maTokenStorage, mb2dRefsAs3dRefs, mbRelativeAsOffset, mbSpecialTokens, oox::xls::SharedFormula, and oox::xls::Validation.
|
private |
Definition at line 1032 of file formulaparser.cxx.
References initReference3d(), maBaseAddr, mb2dRefsAs3dRefs, and ScAddress::Tab().
Referenced by convertReference2d().
|
staticprivate |
Definition at line 1047 of file formulaparser.cxx.
Referenced by convertReference3d(), and initReference2d().
|
protected |
Definition at line 674 of file formulaparser.cxx.
References Any, oox::xls::ApiTokenVector::append(), maTokenIndexes, maTokenStorage, and oox::xls::ApiTokenVector::size().
Referenced by insertWhiteSpaceTokens(), pushBinaryOperatorToken(), pushParenthesesOperatorToken(), and pushUnaryPreOperatorToken().
|
protected |
Definition at line 688 of file formulaparser.cxx.
References insertRawToken(), and oox::xls::ApiOpCodes::OPCODE_SPACES.
Referenced by pushBinaryOperatorToken(), pushParenthesesOperatorToken(), and pushUnaryPreOperatorToken().
|
protected |
Definition at line 708 of file formulaparser.cxx.
References maOperandSizeStack.
Referenced by pushBinaryOperatorToken(), pushErrorOperand(), pushParenthesesOperatorToken(), pushUnaryPostOperatorToken(), and pushUnaryPreOperatorToken().
|
protected |
Definition at line 873 of file formulaparser.cxx.
References oox::xls::BIFF_TOK_BOOL_FALSE, nValue, and pushBoolOperand().
|
protected |
Definition at line 878 of file formulaparser.cxx.
References oox::xls::BiffHelper::calcDoubleFromError(), and pushErrorOperand().
Referenced by pushDefinedNameOperand(), pushEmbeddedRefOperand(), and pushExternalNameOperand().
|
protected |
Definition at line 1010 of file formulaparser.cxx.
References maLeadingSpaces, pushBinaryOperatorToken(), and resetSpaces().
|
protected |
Definition at line 779 of file formulaparser.cxx.
References insertRawToken(), insertWhiteSpaceTokens(), maOperandSizeStack, popOperandSize(), and pushOperandSize().
Referenced by pushBinaryOperator(), and pushFunctionOperatorToken().
|
protected |
Definition at line 851 of file formulaparser.cxx.
References oox::xls::BIFF_FUNC_FALSE, oox::xls::BIFF_FUNC_TRUE, oox::xls::FunctionProvider::getFuncInfoFromBiff12FuncId(), and pushFunctionOperator().
Referenced by pushBiffBoolOperand().
|
protected |
Definition at line 956 of file formulaparser.cxx.
References oox::xls::ApiOpCodes::OPCODE_DDE, pushFunctionOperator(), and pushValueOperandToken().
Referenced by pushExternalNameOperand().
|
protected |
Definition at line 938 of file formulaparser.cxx.
References oox::xls::BIFF_ERR_NAME, oox::xls::ApiOpCodes::OPCODE_MACRO, oox::xls::ApiOpCodes::OPCODE_NAME, pushBiffErrorOperand(), pushEmbeddedRefOperand(), and pushValueOperand().
|
protected |
Definition at line 931 of file formulaparser.cxx.
References oox::xls::BIFF_ERR_NAME, oox::xls::DefinedNameBase::getModelName(), oox::xls::ApiOpCodes::OPCODE_BAD, pushBiffErrorOperand(), and pushValueOperand().
Referenced by pushDefinedNameOperand(), and pushExternalNameOperand().
|
protected |
Definition at line 858 of file formulaparser.cxx.
References appendRawToken(), maTokenIndexes, oox::xls::ApiOpCodes::OPCODE_ARRAY_CLOSE, oox::xls::ApiOpCodes::OPCODE_ARRAY_OPEN, oox::xls::ApiOpCodes::OPCODE_PUSH, popOperandSize(), pushOperand(), and pushOperandSize().
Referenced by pushBiffErrorOperand().
|
protected |
Definition at line 949 of file formulaparser.cxx.
References oox::xls::FunctionInfo::maExtProgName, oox::xls::FunctionInfo::mnApiOpCode, oox::xls::ApiOpCodes::OPCODE_EXTERNAL, pushOperand(), and pushValueOperand().
Referenced by pushExternalNameOperand().
|
protected |
Definition at line 966 of file formulaparser.cxx.
References oox::xls::BIFF_ERR_NAME, oox::xls::DDE, oox::xls::External, oox::xls::FUNCLIB_UNKNOWN, oox::xls::FunctionProvider::getFuncInfoFromOoxFuncName(), oox::xls::ExternalLink::getFuncLibraryType(), oox::xls::ExternalLink::getLinkType(), oox::xls::Library, pushBiffErrorOperand(), pushDdeLinkOperand(), pushEmbeddedRefOperand(), pushExternalFuncOperand(), and oox::xls::Self.
|
protected |
Definition at line 1025 of file formulaparser.cxx.
References maClosingSpaces, maLeadingSpaces, pushFunctionOperatorToken(), and resetSpaces().
|
protected |
Definition at line 1020 of file formulaparser.cxx.
References maClosingSpaces, maLeadingSpaces, pushFunctionOperatorToken(), and resetSpaces().
Referenced by pushBoolOperand(), and pushDdeLinkOperand().
|
protected |
Definition at line 825 of file formulaparser.cxx.
References getOperandToken(), oox::xls::FunctionInfo::maExtProgName, oox::xls::FunctionInfo::maOoxFuncName, oox::xls::FunctionInfo::mnApiOpCode, oox::xls::ApiOpCodes::OPCODE_BAD, oox::xls::ApiOpCodes::OPCODE_EXTERNAL, and pushFunctionOperatorToken().
|
protected |
Definition at line 808 of file formulaparser.cxx.
References maOperandSizeStack, oox::xls::ApiOpCodes::OPCODE_SEP, pushBinaryOperatorToken(), pushParenthesesOperandToken(), pushParenthesesOperatorToken(), and pushUnaryPreOperatorToken().
Referenced by pushFunctionOperator(), and pushFunctionOperatorToken().
|
protected |
Definition at line 840 of file formulaparser.cxx.
References maLeadingSpaces, pushOperandToken(), and resetSpaces().
Referenced by pushErrorOperand(), and pushExternalFuncOperand().
|
protected |
Definition at line 703 of file formulaparser.cxx.
References maOperandSizeStack.
Referenced by pushBinaryOperatorToken(), pushErrorOperand(), pushOperandToken(), pushParenthesesOperandToken(), pushParenthesesOperatorToken(), pushUnaryPostOperatorToken(), pushUnaryPreOperatorToken(), and pushValueOperandToken().
|
protected |
Definition at line 726 of file formulaparser.cxx.
References appendRawToken(), appendWhiteSpaceTokens(), and pushOperandSize().
Referenced by pushOperand().
|
protected |
Definition at line 743 of file formulaparser.cxx.
References appendRawToken(), appendWhiteSpaceTokens(), oox::xls::ApiOpCodes::OPCODE_CLOSE, oox::xls::ApiOpCodes::OPCODE_OPEN, and pushOperandSize().
Referenced by pushFunctionOperatorToken().
|
protected |
Definition at line 1015 of file formulaparser.cxx.
References maClosingSpaces, maOpeningSpaces, pushParenthesesOperatorToken(), and resetSpaces().
|
protected |
Definition at line 793 of file formulaparser.cxx.
References appendRawToken(), appendWhiteSpaceTokens(), insertRawToken(), insertWhiteSpaceTokens(), maOperandSizeStack, oox::xls::ApiOpCodes::OPCODE_CLOSE, oox::xls::ApiOpCodes::OPCODE_OPEN, popOperandSize(), and pushOperandSize().
Referenced by pushFunctionOperatorToken(), and pushParenthesesOperator().
|
protected |
Definition at line 890 of file formulaparser.cxx.
References convertReference2d(), oox::xls::BinComplexRef2d::maRef1, oox::xls::BinComplexRef2d::maRef2, and pushValueOperand().
|
protected |
Definition at line 883 of file formulaparser.cxx.
References convertReference2d(), and pushValueOperand().
Referenced by pushReferenceOperand().
|
protected |
Definition at line 924 of file formulaparser.cxx.
References convertReference3d(), oox::xls::BinComplexRef2d::maRef1, oox::xls::BinComplexRef2d::maRef2, and pushReferenceOperand().
|
protected |
Definition at line 910 of file formulaparser.cxx.
References convertReference3d(), oox::xls::LinkSheetRange::getFirstSheet(), oox::xls::LinkSheetRange::is3dRange(), oox::xls::LinkSheetRange::isSameSheet(), and pushReferenceOperand().
|
protected |
Definition at line 898 of file formulaparser.cxx.
References oox::xls::LinkSheetRange::getDocLinkIndex(), oox::xls::LinkSheetRange::isExternal(), and pushValueOperand().
|
protected |
Definition at line 993 of file formulaparser.cxx.
References getFormulaSize(), maBaseAddr, mbSpecialTokens, oox::xls::BinAddress::mnCol, oox::xls::BinAddress::mnRow, oox::xls::ApiOpCodes::OPCODE_BAD, pushValueOperand(), and ScAddress::Tab().
|
protected |
Definition at line 1005 of file formulaparser.cxx.
References maLeadingSpaces, pushUnaryPostOperatorToken(), and resetSpaces().
|
protected |
Definition at line 766 of file formulaparser.cxx.
References appendRawToken(), appendWhiteSpaceTokens(), maOperandSizeStack, popOperandSize(), and pushOperandSize().
Referenced by pushUnaryPostOperator().
|
protected |
Definition at line 1000 of file formulaparser.cxx.
References maLeadingSpaces, pushUnaryPreOperatorToken(), and resetSpaces().
|
protected |
Definition at line 753 of file formulaparser.cxx.
References insertRawToken(), insertWhiteSpaceTokens(), maOperandSizeStack, popOperandSize(), and pushOperandSize().
Referenced by pushFunctionOperatorToken(), and pushUnaryPreOperator().
|
inlineprotected |
Definition at line 484 of file formulaparser.cxx.
References oox::xls::ApiOpCodes::OPCODE_PUSH, and pushValueOperand().
|
protected |
Definition at line 846 of file formulaparser.cxx.
References maLeadingSpaces, pushValueOperandToken(), and resetSpaces().
Referenced by pushDefinedNameOperand(), pushEmbeddedRefOperand(), pushExternalFuncOperand(), pushReferenceOperand(), pushSpecialTokenOperand(), and pushValueOperand().
|
inlineprotected |
Definition at line 470 of file formulaparser.cxx.
References oox::xls::ApiOpCodes::OPCODE_PUSH, and pushValueOperandToken().
|
protected |
Definition at line 735 of file formulaparser.cxx.
References appendRawToken(), appendWhiteSpaceTokens(), and pushOperandSize().
Referenced by pushDdeLinkOperand(), pushValueOperand(), and pushValueOperandToken().
|
protected |
Definition at line 633 of file formulaparser.cxx.
References maClosingSpaces, maLeadingSpaces, and maOpeningSpaces.
Referenced by pushBinaryOperator(), pushFunctionOperator(), pushOperand(), pushParenthesesOperator(), pushUnaryPostOperator(), pushUnaryPreOperator(), and pushValueOperand().
|
overrideprivatevirtual |
Derived classed may try to find a function info struct from the passed string extracted from an OPCODE_BAD token.
rTokenData | The string that has been found in an OPCODE_BAD token preceding the function parentheses. |
Reimplemented from oox::xls::FormulaFinalizer.
Definition at line 1139 of file formulaparser.cxx.
References oox::xls::FUNCLIB_UNKNOWN, oox::xls::ExternalLinkBuffer::getExternalLink(), oox::xls::WorkbookHelper::getExternalLinks(), oox::xls::FunctionProvider::getFuncInfoFromOoxFuncName(), oox::xls::ExternalLink::getFuncLibraryType(), oox::xls::ExternalLink::getLinkType(), oox::xls::Library, and o3tl::toInt32().
|
overrideprivatevirtual |
Derived classed may try to find the name of a defined name with the passed index extracted from an OPCODE_NAME token.
nTokenIndex | The index of the defined name that has been found in an OPCODE_NAME token preceding the function parentheses. |
Reimplemented from oox::xls::FormulaFinalizer.
Definition at line 1162 of file formulaparser.cxx.
References get(), and oox::xls::WorkbookHelper::getDefinedNames().
OUString oox::xls::FormulaParserImpl::resolveOleTarget | ( | sal_Int32 | nRefId, |
bool | bUseRefSheets | ||
) | const |
Tries to resolve the passed ref-id to an OLE target URL.
Definition at line 580 of file formulaparser.cxx.
References oox::core::FilterBase::getAbsoluteUrl(), oox::xls::WorkbookHelper::getBaseFilter(), oox::xls::ExternalLinkBuffer::getExternalLink(), oox::xls::WorkbookHelper::getExternalLinks(), oox::xls::ExternalLink::getLinkType(), oox::xls::ExternalLink::getTargetUrl(), and oox::xls::OLE.
|
protected |
Maximum row index in imported document.
Definition at line 534 of file formulaparser.cxx.
Referenced by convertReference(), initializeImport(), initReference2d(), and pushSpecialTokenOperand().
|
private |
List of whitespaces before opening parenthesis.
Definition at line 545 of file formulaparser.cxx.
Referenced by appendClosingSpaces(), FormulaParserImpl(), pushFunctionOperator(), pushParenthesesOperator(), and resetSpaces().
|
private |
Stack with token sizes per operand.
Definition at line 543 of file formulaparser.cxx.
Referenced by appendLeadingSpaces(), FormulaParserImpl(), pushBinaryOperator(), pushFunctionOperator(), pushOperand(), pushUnaryPostOperator(), pushUnaryPreOperator(), pushValueOperand(), and resetSpaces().
|
private |
List of whitespaces before next token.
Definition at line 544 of file formulaparser.cxx.
Referenced by appendOpeningSpaces(), FormulaParserImpl(), pushParenthesesOperator(), and resetSpaces().
|
private |
Indexes into maTokenStorage.
Definition at line 542 of file formulaparser.cxx.
Referenced by FormulaParserImpl(), getOperandSize(), getOperandToken(), initializeImport(), popOperandSize(), pushBinaryOperatorToken(), pushFunctionOperatorToken(), pushOperandSize(), pushParenthesesOperatorToken(), pushUnaryPostOperatorToken(), and pushUnaryPreOperatorToken().
|
private |
Raw unordered token storage.
Definition at line 541 of file formulaparser.cxx.
Referenced by appendRawToken(), finalizeImport(), FormulaParserImpl(), getFormulaSize(), getOperandToken(), initializeImport(), insertRawToken(), and pushErrorOperand().
|
private |
True = special handling for tExp and tTbl tokens, false = exit with error.
Definition at line 540 of file formulaparser.cxx.
Referenced by appendRawToken(), finalizeImport(), FormulaParserImpl(), getOperandToken(), initializeImport(), and insertRawToken().
|
protected |
True = relative row/column index is (signed) offset, false = explicit index.
Definition at line 536 of file formulaparser.cxx.
Referenced by initializeImport(), and initReference2d().
|
protected |
Base address for relative references.
Definition at line 535 of file formulaparser.cxx.
Referenced by initializeImport().
|
protected |
True = convert all 2D references to 3D references in sheet specified by base address.
Definition at line 537 of file formulaparser.cxx.
Referenced by initializeImport(), and pushSpecialTokenOperand().
|
protected |
Definition at line 529 of file formulaparser.cxx.
Referenced by convertReference().
|
protected |
Maximum column index in own document.
Definition at line 530 of file formulaparser.cxx.
Referenced by convertReference().
|
protected |
Maximum row index in own document.
Definition at line 531 of file formulaparser.cxx.
Referenced by convertReference().
|
protected |
Maximum column index in imported document.
Definition at line 532 of file formulaparser.cxx.
Referenced by convertReference().