LibreOffice Module svx (master) 1
Public Member Functions | List of all members
EnhancedCustomShape::FunctionParser Class Reference

#include <EnhancedCustomShapeFunctionParser.hxx>

Public Member Functions

UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) static std FunctionParser ()=delete
 Parse a string. More...
 
 FunctionParser (const FunctionParser &)=delete
 
FunctionParseroperator= (const FunctionParser &)=delete
 

Detailed Description

Definition at line 179 of file EnhancedCustomShapeFunctionParser.hxx.

Constructor & Destructor Documentation

◆ FunctionParser() [1/2]

UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) static std EnhancedCustomShape::FunctionParser::FunctionParser ( )
delete

Parse a string.

The following grammar is accepted by this method:

number_digit = '0'|'1'|'2'|'3'|'4'|'5'|'6'|'7'|'8'|'9'

number = number number_digit | number_digit

identifier = 'pi'|'left'|'top'|'right'|'bottom'|'xstretch'|'ystretch'| 'hasstroke'|'hasfill'|'width'|'height'|'logwidth'|'logheight'

unary_function = 'abs'|'sqrt'|'sin'|'cos'|'tan'|'atan' binary_function = 'min'|'max'|'atan2' ternary_function = 'if'

function_reference = '?' 'a-z,A-Z,0-9' ' ' modifier_reference = '$' '0-9' ' '

basic_expression = number | identifier | function_reference | unary_function '(' additive_expression ')' | binary_function '(' additive_expression ',' additive_expression ')' | ternary_function '(' additive_expression ',' additive_expression ', ' additive_expression ')' | '(' additive_expression ')'

unary_expression = '-' basic_expression

multiplicative_expression = basic_expression | multiplicative_expression '*' basic_expression | multiplicative_expression '/' basic_expression

additive_expression = multiplicative_expression | additive_expression '+' multiplicative_expression | additive_expression '-' multiplicative_expression

Parameters
rFunctionThe string to parse
rCustoShapeThe CustomShape is required for calculation of dynamic values such "hasstroke", function references and or modifier references ...
Exceptions
ParseErrorif an invalid expression is given.
Returns
the generated function object.

◆ FunctionParser() [2/2]

EnhancedCustomShape::FunctionParser::FunctionParser ( const FunctionParser )
delete

Member Function Documentation

◆ operator=()

FunctionParser & EnhancedCustomShape::FunctionParser::operator= ( const FunctionParser )
delete

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