LibreOffice Module sc (master) 1
|
Base class for import formula parsers and export formula compilers. More...
#include <formulabase.hxx>
Public Member Functions | |
FormulaProcessorBase (const WorkbookHelper &rHelper) | |
css::uno::Any | extractReference (const ApiTokenSequence &rTokens) const |
Tries to extract a single cell reference from a formula token sequence. More... | |
bool | extractCellRange (ScRange &orRange, const ApiTokenSequence &rTokens) const |
Tries to extract a cell range address from a formula token sequence. More... | |
void | extractCellRangeList (ScRangeList &orRanges, const ApiTokenSequence &rTokens, sal_Int32 nFilterBySheet) const |
Tries to extract a cell range list from a formula token sequence. More... | |
bool | extractString (OUString &orString, const ApiTokenSequence &rTokens) const |
Tries to extract a string from a formula token sequence. More... | |
bool | extractSpecialTokenInfo (ApiSpecialTokenInfo &orTokenInfo, const ApiTokenSequence &rTokens) const |
Tries to extract information about a special token used for array formulas, shared formulas, or table operations. More... | |
void | convertStringToStringList (ApiTokenSequence &orTokens, sal_Unicode cStringSep, bool bTrimLeadingSpaces) const |
Converts a single string with separators in the passed formula token sequence to a list of string tokens. 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... | |
Static Public Member Functions | |
static OUString | generateAddress2dString (const ScAddress &rAddress, bool bAbsolute) |
Generates a cell address string in A1 notation from the passed cell address. More... | |
static OUString | generateAddress2dString (const BinAddress &rAddress, bool bAbsolute) |
Generates a cell address string in A1 notation from the passed binary cell address. More... | |
static OUString | generateApiArray (const Matrix< css::uno::Any > &rMatrix) |
Generates an array string in Calc formula notation from the passed matrix with Any's containing double values or strings. More... | |
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) |
Additional Inherited Members | |
Public Types inherited from oox::xls::WorkbookHelper | |
typedef std::pair< ScRangeData *, bool > | RangeDataRet |
Protected Types inherited from oox::xls::WorkbookHelper | |
typedef std::pair< ScRangeData *, bool > | RangeDataRet |
Protected Member Functions inherited from oox::xls::FunctionProvider | |
const FunctionInfoVector & | getFuncs () const |
Returns the list of all function infos. More... | |
Protected 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... | |
Static Protected Member Functions inherited from oox::xls::WorkbookHelper | |
static WorkbookGlobalsRef | constructGlobals (ExcelFilter &rFilter) |
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... | |
Base class for import formula parsers and export formula compilers.
Definition at line 629 of file formulabase.hxx.
|
explicit |
Definition at line 1538 of file formulabase.cxx.
void oox::xls::FormulaProcessorBase::convertStringToStringList | ( | ApiTokenSequence & | orTokens, |
sal_Unicode | cStringSep, | ||
bool | bTrimLeadingSpaces | ||
) | const |
Converts a single string with separators in the passed formula token sequence to a list of string tokens.
orTokens | (input/output parameter) Expects a single string token in this token sequence (whitespace tokens are allowed). The string is split into substrings. A list of string tokens separated with parameter separator tokens is returned in this parameter. |
cStringSep | The separator character used to split the input string. |
bTrimLeadingSpaces | True = removes leading whitespace from all substrings inserted into the formula token sequence. |
Definition at line 1681 of file formulabase.cxx.
References Any, comphelper::containerToSequence(), extractString(), nPos, oox::xls::ApiOpCodes::OPCODE_PUSH, and oox::xls::ApiOpCodes::OPCODE_SEP.
Referenced by oox::xls::DataValidationsContextBase::importDataValidation().
bool oox::xls::FormulaProcessorBase::extractCellRange | ( | ScRange & | orRange, |
const ApiTokenSequence & | rTokens | ||
) | const |
Tries to extract a cell range address from a formula token sequence.
Only real absolute references will be accepted.
orAddress | (output parameter) If the token sequence is valid, this parameter will contain the extracted cell range address. If the token sequence contains unexpected tokens, nothing meaningful is inserted, and the function returns false. |
rTokens | The token sequence to be parsed. Should contain exactly one cell range address token. The token sequence may contain whitespace tokens. |
Definition at line 1606 of file formulabase.cxx.
References ScRangeList::empty(), extractReference(), and ScRangeList::front().
Referenced by oox::xls::DefinedName::getAbsoluteRange().
void oox::xls::FormulaProcessorBase::extractCellRangeList | ( | ScRangeList & | orRanges, |
const ApiTokenSequence & | rTokens, | ||
sal_Int32 | nFilterBySheet | ||
) | const |
Tries to extract a cell range list from a formula token sequence.
Only real absolute references will be accepted.
orRanges | (output parameter) If the token sequence is valid, this parameter will contain the extracted cell range list. Deleted cells or cell ranges (shown as #REF! error in a formula) will be skipped. If the token sequence contains unexpected tokens, an empty list is returned here. |
rTokens | The token sequence to be parsed. Should contain cell address tokens or cell range address tokens, separated by the standard function parameter separator token. The token sequence may contain parentheses and whitespace tokens. |
nFilterBySheet | If non-negative, this function returns only cell ranges located in the specified sheet, otherwise returns all cell ranges contained in the token sequence. |
Definition at line 1619 of file formulabase.cxx.
References oox::xls::WorkbookHelper::getAddressConverter(), oox::xls::ApiTokenIterator::is(), oox::xls::ApiOpCodes::OPCODE_CLOSE, oox::xls::ApiOpCodes::OPCODE_LIST, oox::xls::ApiOpCodes::OPCODE_OPEN, oox::xls::ApiOpCodes::OPCODE_PUSH, oox::xls::ApiOpCodes::OPCODE_SEP, oox::xls::ApiOpCodes::OPCODE_SPACES, ScRangeList::RemoveAll(), and oox::xls::AddressConverter::validateCellRangeList().
Referenced by oox::xls::DefinedName::convertFormula().
Any oox::xls::FormulaProcessorBase::extractReference | ( | const ApiTokenSequence & | rTokens | ) | const |
Tries to extract a single cell reference from a formula token sequence.
rTokens | The token sequence to be parsed. Should contain exactly one address token or cell range address token. The token sequence may contain whitespace tokens. |
Definition at line 1594 of file formulabase.cxx.
References Any, oox::xls::ApiTokenIterator::is(), oox::xls::ApiOpCodes::OPCODE_PUSH, and oox::xls::ApiOpCodes::OPCODE_SPACES.
Referenced by extractCellRange().
bool oox::xls::FormulaProcessorBase::extractSpecialTokenInfo | ( | ApiSpecialTokenInfo & | orTokenInfo, |
const ApiTokenSequence & | rTokens | ||
) | const |
Tries to extract information about a special token used for array formulas, shared formulas, or table operations.
orTokenInfo | (output parameter) The extracted information about the token. Contains the base address and the token type (sal_False for array or shared formulas, sal_True for table operations). |
rTokens | The token sequence to be parsed. If it contains exactly one OPCODE_BAD token with special token information, this information will be extracted. |
Definition at line 1675 of file formulabase.cxx.
References oox::xls::ApiTokenIterator::is(), oox::xls::ApiOpCodes::OPCODE_BAD, and oox::xls::ApiOpCodes::OPCODE_SPACES.
bool oox::xls::FormulaProcessorBase::extractString | ( | OUString & | orString, |
const ApiTokenSequence & | rTokens | ||
) | const |
Tries to extract a string from a formula token sequence.
orString | (output parameter) The extracted string. |
rTokens | The token sequence to be parsed. Should contain exactly one string token, may contain whitespace tokens. |
Definition at line 1669 of file formulabase.cxx.
References oox::xls::ApiTokenIterator::is(), oox::xls::ApiOpCodes::OPCODE_PUSH, and oox::xls::ApiOpCodes::OPCODE_SPACES.
Referenced by convertStringToStringList().
|
static |
Generates a cell address string in A1 notation from the passed binary cell address.
rAddress | The cell address containing column and row index. |
bAbsolute | True = adds dollar signs before column and row. |
Definition at line 1550 of file formulabase.cxx.
References aBuffer, oox::xls::BinAddress::mnCol, and oox::xls::BinAddress::mnRow.
|
static |
Generates a cell address string in A1 notation from the passed cell address.
rAddress | The cell address containing column and row index. |
bAbsolute | True = adds dollar signs before column and row. |
Definition at line 1545 of file formulabase.cxx.
References generateAddress2dString().
Referenced by oox::xls::CondFormatRule::finalizeImport(), generateAddress2dString(), and oox::xls::SheetDataContext::importDataTable().
|
static |
Generates an array string in Calc formula notation from the passed matrix with Any's containing double values or strings.
rMatrix | The matrix containing double values or strings. |
Definition at line 1565 of file formulabase.cxx.
References aBuffer, API_TOKEN_ARRAY_CLOSE, API_TOKEN_ARRAY_COLSEP, API_TOKEN_ARRAY_OPEN, oox::Matrix< typename Type >::empty(), oox::Matrix< typename Type >::height(), oox::Matrix< typename Type >::row_begin(), oox::Matrix< typename Type >::row_end(), and u.
Referenced by oox::xls::ExcelChartConverter::createDataSequence().