LibreOffice Module sc (master) 1
Classes | Namespaces | Typedefs | Enumerations | Variables
formulabase.hxx File Reference
#include <com/sun/star/beans/Pair.hpp>
#include <com/sun/star/sheet/FormulaToken.hpp>
#include <com/sun/star/table/CellAddress.hpp>
#include <oox/helper/propertyset.hxx>
#include <oox/helper/refvector.hxx>
#include "workbookhelper.hxx"
Include dependency graph for formulabase.hxx:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  oox::xls::BinSingleRef2d
 A 2D formula cell reference struct with relative flags. More...
 
struct  oox::xls::BinComplexRef2d
 A 2D formula cell range reference struct with relative flags. More...
 
class  oox::xls::ApiTokenVector
 A vector of formula tokens with additional convenience functions. More...
 
class  oox::xls::ApiTokenIterator
 Token sequence iterator that is able to skip space tokens. More...
 
struct  oox::xls::ApiOpCodes
 Contains all API op-codes needed to build formulas with tokens. More...
 
struct  oox::xls::FunctionParamInfo
 Structure that contains all needed information for a parameter in a function. More...
 
struct  oox::xls::FunctionInfo
 Represents information for a spreadsheet function. More...
 
class  oox::xls::FunctionParamInfoIterator
 Iterator working on the mpParamInfos member of the FunctionInfo struct. More...
 
class  oox::xls::FunctionProvider
 Provides access to function info structs for all available sheet functions. More...
 
class  oox::xls::OpCodeProvider
 Provides access to API op-codes for all available formula tokens and to function info structs for all available sheet functions. More...
 
class  oox::xls::ApiParserWrapper
 A wrapper around the FormulaParser service provided by the Calc document. More...
 
class  oox::xls::FormulaProcessorBase
 Base class for import formula parsers and export formula compilers. More...
 

Namespaces

namespace  com
 
namespace  com::sun
 
namespace  com::sun::star
 
namespace  com::sun::star::lang
 
namespace  com::sun::star::sheet
 
namespace  oox
 
namespace  oox::xls
 

Typedefs

typedef css::sheet::FormulaToken oox::xls::ApiToken
 
typedef css::uno::Sequence< ApiToken > oox::xls::ApiTokenSequence
 
typedef css::beans::Pair< css::table::CellAddress, sal_Booloox::xls::ApiSpecialTokenInfo
 Contains the base address and type of a special token representing an array formula or a shared formula (sal_False), or a table operation (sal_True). More...
 
typedef RefVector< FunctionInfo > oox::xls::FunctionInfoVector
 

Enumerations

enum class  oox::xls::FormulaType {
  oox::xls::Cell ,
  oox::xls::Array ,
  oox::xls::SharedFormula ,
  oox::xls::CondFormat ,
  oox::xls::Validation
}
 Function identifier of the WEEKNUM function. More...
 
enum class  oox::xls::FuncParamValidity {
  oox::xls::Regular ,
  oox::xls::CalcOnly ,
  oox::xls::ExcelOnly
}
 Enumerates validity modes for a function parameter. More...
 
enum  oox::xls::FunctionLibraryType {
  oox::xls::FUNCLIB_UNKNOWN = 0 ,
  oox::xls::FUNCLIB_EUROTOOL
}
 This enumeration contains constants for all known external libraries containing supported sheet functions. More...
 

Variables

const size_t oox::xls::BIFF_TOKARR_MAXLEN = 4096
 
const sal_uInt8 oox::xls::BIFF_TOKCLASS_MASK = 0x60
 Maximum size of a token array. More...
 
const sal_uInt8 oox::xls::BIFF_TOKCLASS_NONE = 0x00
 
const sal_uInt8 oox::xls::BIFF_TOKCLASS_REF = 0x20
 00-1F: Base tokens. More...
 
const sal_uInt8 oox::xls::BIFF_TOKCLASS_VAL = 0x40
 20-3F: Reference class tokens. More...
 
const sal_uInt8 oox::xls::BIFF_TOKCLASS_ARR = 0x60
 40-5F: Value class tokens. More...
 
const sal_uInt8 oox::xls::BIFF_TOKFLAG_INVALID = 0x80
 60-7F: Array class tokens. More...
 
const sal_uInt8 oox::xls::BIFF_TOKID_MASK = 0x1F
 This bit must be null for a valid token identifier. More...
 
const sal_uInt8 oox::xls::BIFF_TOKID_NONE = 0x00
 
const sal_uInt8 oox::xls::BIFF_TOKID_EXP = 0x01
 Placeholder for invalid token id. More...
 
const sal_uInt8 oox::xls::BIFF_TOKID_TBL = 0x02
 Array or shared formula reference. More...
 
const sal_uInt8 oox::xls::BIFF_TOKID_ADD = 0x03
 Multiple operation reference. More...
 
const sal_uInt8 oox::xls::BIFF_TOKID_SUB = 0x04
 Addition operator. More...
 
const sal_uInt8 oox::xls::BIFF_TOKID_MUL = 0x05
 Subtraction operator. More...
 
const sal_uInt8 oox::xls::BIFF_TOKID_DIV = 0x06
 Multiplication operator. More...
 
const sal_uInt8 oox::xls::BIFF_TOKID_POWER = 0x07
 Division operator. More...
 
const sal_uInt8 oox::xls::BIFF_TOKID_CONCAT = 0x08
 Power operator. More...
 
const sal_uInt8 oox::xls::BIFF_TOKID_LT = 0x09
 String concatenation operator. More...
 
const sal_uInt8 oox::xls::BIFF_TOKID_LE = 0x0A
 Less than operator. More...
 
const sal_uInt8 oox::xls::BIFF_TOKID_EQ = 0x0B
 Less than or equal operator. More...
 
const sal_uInt8 oox::xls::BIFF_TOKID_GE = 0x0C
 Equal operator. More...
 
const sal_uInt8 oox::xls::BIFF_TOKID_GT = 0x0D
 Greater than or equal operator. More...
 
const sal_uInt8 oox::xls::BIFF_TOKID_NE = 0x0E
 Greater than operator. More...
 
const sal_uInt8 oox::xls::BIFF_TOKID_ISECT = 0x0F
 Not equal operator. More...
 
const sal_uInt8 oox::xls::BIFF_TOKID_LIST = 0x10
 Intersection operator. More...
 
const sal_uInt8 oox::xls::BIFF_TOKID_RANGE = 0x11
 List operator. More...
 
const sal_uInt8 oox::xls::BIFF_TOKID_UPLUS = 0x12
 Range operator. More...
 
const sal_uInt8 oox::xls::BIFF_TOKID_UMINUS = 0x13
 Unary plus. More...
 
const sal_uInt8 oox::xls::BIFF_TOKID_PERCENT = 0x14
 Unary minus. More...
 
const sal_uInt8 oox::xls::BIFF_TOKID_PAREN = 0x15
 Percent sign. More...
 
const sal_uInt8 oox::xls::BIFF_TOKID_MISSARG = 0x16
 Parentheses. More...
 
const sal_uInt8 oox::xls::BIFF_TOKID_STR = 0x17
 Missing argument. More...
 
const sal_uInt8 oox::xls::BIFF_TOKID_NLR = 0x18
 String constant. More...
 
const sal_uInt8 oox::xls::BIFF_TOKID_ATTR = 0x19
 Natural language reference (NLR). More...
 
const sal_uInt8 oox::xls::BIFF_TOKID_SHEET = 0x1A
 Special attribute. More...
 
const sal_uInt8 oox::xls::BIFF_TOKID_ENDSHEET = 0x1B
 Start of a sheet reference (BIFF2-BIFF4). More...
 
const sal_uInt8 oox::xls::BIFF_TOKID_ERR = 0x1C
 End of a sheet reference (BIFF2-BIFF4). More...
 
const sal_uInt8 oox::xls::BIFF_TOKID_BOOL = 0x1D
 Error constant. More...
 
const sal_uInt8 oox::xls::BIFF_TOKID_INT = 0x1E
 Boolean constant. More...
 
const sal_uInt8 oox::xls::BIFF_TOKID_NUM = 0x1F
 Integer constant. More...
 
const sal_uInt8 oox::xls::BIFF_TOKID_ARRAY = 0x00
 Floating-point constant. More...
 
const sal_uInt8 oox::xls::BIFF_TOKID_FUNC = 0x01
 Array constant. More...
 
const sal_uInt8 oox::xls::BIFF_TOKID_FUNCVAR = 0x02
 Function, fixed number of arguments. More...
 
const sal_uInt8 oox::xls::BIFF_TOKID_NAME = 0x03
 Function, variable number of arguments. More...
 
const sal_uInt8 oox::xls::BIFF_TOKID_REF = 0x04
 Defined name. More...
 
const sal_uInt8 oox::xls::BIFF_TOKID_AREA = 0x05
 2D cell reference. More...
 
const sal_uInt8 oox::xls::BIFF_TOKID_MEMAREA = 0x06
 2D area reference. More...
 
const sal_uInt8 oox::xls::BIFF_TOKID_MEMERR = 0x07
 Constant reference subexpression. More...
 
const sal_uInt8 oox::xls::BIFF_TOKID_MEMNOMEM = 0x08
 Deleted reference subexpression. More...
 
const sal_uInt8 oox::xls::BIFF_TOKID_MEMFUNC = 0x09
 Constant reference subexpression without result. More...
 
const sal_uInt8 oox::xls::BIFF_TOKID_REFERR = 0x0A
 Variable reference subexpression. More...
 
const sal_uInt8 oox::xls::BIFF_TOKID_AREAERR = 0x0B
 Deleted 2D cell reference. More...
 
const sal_uInt8 oox::xls::BIFF_TOKID_REFN = 0x0C
 Deleted 2D area reference. More...
 
const sal_uInt8 oox::xls::BIFF_TOKID_AREAN = 0x0D
 Relative 2D cell reference (in names). More...
 
const sal_uInt8 oox::xls::BIFF_TOKID_MEMAREAN = 0x0E
 Relative 2D area reference (in names). More...
 
const sal_uInt8 oox::xls::BIFF_TOKID_MEMNOMEMN = 0x0F
 Reference subexpression (in names). More...
 
const sal_uInt8 oox::xls::BIFF_TOKID_FUNCCE = 0x18
 Reference subexpression (in names) without result. More...
 
const sal_uInt8 oox::xls::BIFF_TOKID_NAMEX = 0x19
 
const sal_uInt8 oox::xls::BIFF_TOKID_REF3D = 0x1A
 External reference. More...
 
const sal_uInt8 oox::xls::BIFF_TOKID_AREA3D = 0x1B
 3D cell reference. More...
 
const sal_uInt8 oox::xls::BIFF_TOKID_REFERR3D = 0x1C
 3D area reference. More...
 
const sal_uInt8 oox::xls::BIFF_TOKID_AREAERR3D = 0x1D
 Deleted 3D cell reference. More...
 
const sal_uInt8 oox::xls::BIFF_TOK_ARRAY_DOUBLE = 0
 Deleted 3D area reference. More...
 
const sal_uInt8 oox::xls::BIFF_TOK_ARRAY_STRING = 1
 Double value in an array. More...
 
const sal_uInt8 oox::xls::BIFF_TOK_ARRAY_BOOL = 2
 String value in an array. More...
 
const sal_uInt8 oox::xls::BIFF_TOK_ARRAY_ERROR = 4
 Boolean value in an array. More...
 
const sal_uInt8 oox::xls::BIFF_TOK_BOOL_FALSE = 0
 Error code in an array. More...
 
const sal_uInt8 oox::xls::BIFF_TOK_BOOL_TRUE = 1
 FALSE value of a tBool token. More...
 
const sal_uInt8 oox::xls::BIFF_TOK_ATTR_VOLATILE = 0x01
 TRUE value of a tBool token. More...
 
const sal_uInt8 oox::xls::BIFF_TOK_ATTR_IF = 0x02
 Volatile function. More...
 
const sal_uInt8 oox::xls::BIFF_TOK_ATTR_CHOOSE = 0x04
 Start of true condition in IF function. More...
 
const sal_uInt8 oox::xls::BIFF_TOK_ATTR_SKIP = 0x08
 Jump array of CHOOSE function. More...
 
const sal_uInt8 oox::xls::BIFF_TOK_ATTR_SUM = 0x10
 Skip tokens. More...
 
const sal_uInt8 oox::xls::BIFF_TOK_ATTR_ASSIGN = 0x20
 SUM function with one parameter. More...
 
const sal_uInt8 oox::xls::BIFF_TOK_ATTR_SPACE = 0x40
 BASIC style assignment. More...
 
const sal_uInt8 oox::xls::BIFF_TOK_ATTR_SPACE_VOLATILE = 0x41
 Spaces in formula representation. More...
 
const sal_uInt8 oox::xls::BIFF_TOK_ATTR_IFERROR = 0x80
 Leading spaces and volatile formula. More...
 
const sal_uInt8 oox::xls::BIFF_TOK_ATTR_SPACE_SP = 0x00
 Start of condition in IFERROR function (BIFF12 only). More...
 
const sal_uInt8 oox::xls::BIFF_TOK_ATTR_SPACE_BR = 0x01
 Spaces before next token. More...
 
const sal_uInt8 oox::xls::BIFF_TOK_ATTR_SPACE_SP_OPEN = 0x02
 Line breaks before next token. More...
 
const sal_uInt8 oox::xls::BIFF_TOK_ATTR_SPACE_BR_OPEN = 0x03
 Spaces before opening parenthesis. More...
 
const sal_uInt8 oox::xls::BIFF_TOK_ATTR_SPACE_SP_CLOSE = 0x04
 Line breaks before opening parenthesis. More...
 
const sal_uInt8 oox::xls::BIFF_TOK_ATTR_SPACE_BR_CLOSE = 0x05
 Spaces before closing parenthesis. More...
 
const sal_uInt8 oox::xls::BIFF_TOK_ATTR_SPACE_SP_PRE = 0x06
 Line breaks before closing parenthesis. More...
 
const sal_uInt16 oox::xls::BIFF_TOK_FUNCVAR_CMD = 0x8000
 Spaces before formula (BIFF3). More...
 
const sal_uInt16 oox::xls::BIFF_TOK_FUNCVAR_FUNCIDMASK = 0x7FFF
 Macro command. More...
 
const sal_uInt8 oox::xls::BIFF_TOK_FUNCVAR_CMDPROMPT = 0x80
 Mask for function/command index. More...
 
const sal_uInt8 oox::xls::BIFF_TOK_FUNCVAR_COUNTMASK = 0x7F
 User prompt for macro commands. More...
 
const sal_uInt16 oox::xls::BIFF12_TOK_REF_COLMASK = 0x3FFF
 Mask for parameter count. More...
 
const sal_Int32 oox::xls::BIFF12_TOK_REF_ROWMASK = 0xFFFFF
 Mask to extract column from reference (BIFF12). More...
 
const sal_uInt16 oox::xls::BIFF12_TOK_REF_COLREL = 0x4000
 Mask to extract row from reference (BIFF12). More...
 
const sal_uInt16 oox::xls::BIFF12_TOK_REF_ROWREL = 0x8000
 True = column is relative (BIFF12). More...
 
const sal_uInt16 oox::xls::BIFF_TOK_REF_COLMASK = 0x00FF
 True = row is relative (BIFF12). More...
 
const sal_uInt16 oox::xls::BIFF_TOK_REF_ROWMASK = 0x3FFF
 Mask to extract BIFF8 column from reference. More...
 
const sal_uInt16 oox::xls::BIFF_TOK_REF_COLREL = 0x4000
 Mask to extract BIFF2-BIFF5 row from reference. More...
 
const sal_uInt16 oox::xls::BIFF_TOK_REF_ROWREL = 0x8000
 True = column is relative. More...
 
const sal_uInt16 oox::xls::BIFF12_TOK_TABLE_COLUMN = 0x0001
 True = row is relative. More...
 
const sal_uInt16 oox::xls::BIFF12_TOK_TABLE_COLRANGE = 0x0002
 Table reference: Single column. More...
 
const sal_uInt16 oox::xls::BIFF12_TOK_TABLE_ALL = 0x0004
 Table reference: Range of columns. More...
 
const sal_uInt16 oox::xls::BIFF12_TOK_TABLE_HEADERS = 0x0008
 Table reference: Special [#All] range. More...
 
const sal_uInt16 oox::xls::BIFF12_TOK_TABLE_DATA = 0x0010
 Table reference: Special [#Headers] range. More...
 
const sal_uInt16 oox::xls::BIFF12_TOK_TABLE_TOTALS = 0x0020
 Table reference: Special [#Data] range. More...
 
const sal_uInt16 oox::xls::BIFF12_TOK_TABLE_THISROW = 0x0040
 Table reference: Special [#Totals] range. More...
 
const sal_uInt16 oox::xls::BIFF12_TOK_TABLE_SP_BRACKETS = 0x0080
 Table reference: Special [#This Row] range. More...
 
const sal_uInt16 oox::xls::BIFF12_TOK_TABLE_SP_SEP = 0x0100
 Table reference: Spaces in outer brackets. More...
 
const sal_uInt16 oox::xls::BIFF12_TOK_TABLE_ROW = 0x0200
 Table reference: Spaces after separators. More...
 
const sal_uInt16 oox::xls::BIFF12_TOK_TABLE_CELL = 0x0400
 Table reference: Single row. More...
 
const sal_uInt8 oox::xls::BIFF_TOK_NLR_ERR = 0x01
 Table reference: Single cell. More...
 
const sal_uInt8 oox::xls::BIFF_TOK_NLR_ROWR = 0x02
 NLR: Invalid/deleted. More...
 
const sal_uInt8 oox::xls::BIFF_TOK_NLR_COLR = 0x03
 NLR: Row index. More...
 
const sal_uInt8 oox::xls::BIFF_TOK_NLR_ROWV = 0x06
 NLR: Column index. More...
 
const sal_uInt8 oox::xls::BIFF_TOK_NLR_COLV = 0x07
 NLR: Value in row. More...
 
const sal_uInt8 oox::xls::BIFF_TOK_NLR_RANGE = 0x0A
 NLR: Value in column. More...
 
const sal_uInt8 oox::xls::BIFF_TOK_NLR_SRANGE = 0x0B
 NLR: Range. More...
 
const sal_uInt8 oox::xls::BIFF_TOK_NLR_SROWR = 0x0C
 Stacked NLR: Range. More...
 
const sal_uInt8 oox::xls::BIFF_TOK_NLR_SCOLR = 0x0D
 Stacked NLR: Row index. More...
 
const sal_uInt8 oox::xls::BIFF_TOK_NLR_SROWV = 0x0E
 Stacked NLR: Column index. More...
 
const sal_uInt8 oox::xls::BIFF_TOK_NLR_SCOLV = 0x0F
 Stacked NLR: Value in row. More...
 
const sal_uInt8 oox::xls::BIFF_TOK_NLR_RANGEERR = 0x10
 Stacked NLR: Value in column. More...
 
const sal_uInt8 oox::xls::BIFF_TOK_NLR_SXNAME = 0x1D
 NLR: Invalid/deleted range. More...
 
const sal_uInt16 oox::xls::BIFF_TOK_NLR_REL = 0x8000
 NLR: Pivot table name. More...
 
const sal_uInt16 oox::xls::BIFF_TOK_NLR_MASK = 0x3FFF
 True = NLR is relative. More...
 
const sal_uInt32 oox::xls::BIFF_TOK_NLR_ADDREL = 0x80000000
 Mask to extract BIFF8 column from NLR. More...
 
const sal_uInt32 oox::xls::BIFF_TOK_NLR_ADDMASK = 0x3FFFFFFF
 NLR relative (in appended data). More...
 
const sal_uInt8 oox::xls::OOX_MAX_PARAMCOUNT = 255
 Mask for number of appended ranges. More...
 
const sal_uInt8 oox::xls::BIFF_MAX_PARAMCOUNT = 30
 Maximum parameter count for OOXML/BIFF12 files. More...
 
const sal_uInt16 oox::xls::BIFF_FUNC_IF = 1
 Maximum parameter count for BIFF2-BIFF8 files. More...
 
const sal_uInt16 oox::xls::BIFF_FUNC_SUM = 4
 Function identifier of the IF function. More...
 
const sal_uInt16 oox::xls::BIFF_FUNC_TRUE = 34
 Function identifier of the SUM function. More...
 
const sal_uInt16 oox::xls::BIFF_FUNC_FALSE = 35
 Function identifier of the TRUE function. More...
 
const sal_uInt16 oox::xls::BIFF_FUNC_ROWS = 76
 Function identifier of the FALSE function. More...
 
const sal_uInt16 oox::xls::BIFF_FUNC_COLUMNS = 77
 Function identifier of the ROWS function. More...
 
const sal_uInt16 oox::xls::BIFF_FUNC_OFFSET = 78
 Function identifier of the COLUMNS function. More...
 
const sal_uInt16 oox::xls::BIFF_FUNC_EXTERNCALL = 255
 Function identifier of the OFFSET function. More...
 
const sal_uInt16 oox::xls::BIFF_FUNC_FLOOR = 285
 BIFF function id of the EXTERN.CALL function. More...
 
const sal_uInt16 oox::xls::BIFF_FUNC_CEILING = 288
 Function identifier of the FLOOR function. More...
 
const sal_uInt16 oox::xls::BIFF_FUNC_HYPERLINK = 359
 Function identifier of the CEILING function. More...
 
const sal_uInt16 oox::xls::BIFF_FUNC_WEEKNUM = 465
 Function identifier of the HYPERLINK function. More...