LibreOffice Module sc (master) 1
Public Attributes | List of all members
oox::xls::FunctionParamInfo Struct Reference

Structure that contains all needed information for a parameter in a function. More...

#include <formulabase.hxx>

Public Attributes

FuncParamValidity meValid
 

Detailed Description

Structure that contains all needed information for a parameter in a function.

The member meValid specifies which application supports the parameter. If set to CALCONLY, import filters have to insert a default value for this parameter, and export filters have to skip the parameter. If set to EXCELONLY, import filters have to skip the parameter, and export filters have to insert a default value for this parameter.

The member mbValType specifies whether the parameter requires tokens to be of value type (VAL or ARR class).

If set to false, the parameter is called to be REFTYPE. Tokens with REF
default class can be inserted for the parameter (e.g. tAreaR tokens).

If set to true, the parameter is called to be VALTYPE. Tokens with REF
class need to be converted to VAL tokens first (e.g. tAreaR will be
converted to tAreaV), and further conversion is done according to this
new token class.

The member meConv specifies how to convert the current token class of the token inserted for the parameter. If the token class is still REF this means that the token has default REF class and the parameter is REFTYPE (see member mbValType), the token will not be converted at all and remains in REF class. Otherwise, token class conversion is depending on the actual token class of the return value of the function containing this parameter. The function may return REF class (tFuncR, tFuncVarR, tFuncCER), or it may return VAL or ARR class (tFuncV, tFuncA, tFuncVarV, tFuncVarA, tFuncCEV, tFuncCEA). Even if the function is able to return REF class, it may return VAL or ARR class instead due to the VALTYPE data type of the parent function parameter that calls the own function. Example: The INDIRECT function returns REF class by default. But if called from a VALTYPE function parameter, e.g. in the formula =ABS(INDIRECT("A1")), it returns VAL or ARR class instead. Additionally, the repeating conversion types RPT and RPX rely on the conversion executed for the function token class.

1) ORG:
Use the original class of the token (VAL or ARR), regardless of any
conversion done for the function return class.

2) VAL:
Convert ARR tokens to VAL class, regardless of any conversion done for
the function return class.

3) ARR:
Convert VAL tokens to ARR class, regardless of any conversion done for
the function return class.

4) RPT:
If the own function returns REF class (thus it is called from a REFTYPE
parameter, see above), and the parent conversion type (for the function
return class) was ORG, VAL, or ARR, ignore that conversion and always
use VAL conversion for the own token instead. If the parent conversion
type was RPT or RPX, repeat the conversion that would have been used if
the function would return value type.
If the own function returns value type (VAL or ARR class, see above),
and the parent conversion type (for the function return class) was ORG,
VAL, ARR, or RPT, repeat this conversion for the own token. If the
parent conversion type was RPX, always use ORG conversion type for the
own token instead.

5) RPX:
This type of conversion only occurs in functions returning VAL class by
default. If the own token is value type, and the VAL return class of
the own function has been changed to ARR class (due to direct ARR
conversion, or due to ARR conversion repeated by RPT or RPX), set the
own token to ARR type. Otherwise use the original token type (VAL
conversion from parent parameter will not be repeated at all). If
nested functions have RPT or value-type RPX parameters, they will not
repeat this conversion type, but will use ORG conversion instead (see
description of RPT above).

6) RPO:
This type of conversion is only used for the operands of all operators
(unary and binary arithmetic operators, comparison operators, and range
operators). It is not used for function parameters. On conversion, it
will be replaced by the last conversion type that was not the RPO
conversion. This leads to a slightly different behaviour than the RPT
conversion for operands in conjunction with a parent RPX conversion.

Definition at line 455 of file formulabase.hxx.

Member Data Documentation

◆ meValid

FuncParamValidity oox::xls::FunctionParamInfo::meValid

The documentation for this struct was generated from the following file: