LibreOffice Module slideshow (master) 1
|
#include <smilfunctionparser.hxx>
Public Member Functions | |
SmilFunctionParser ()=delete | |
SmilFunctionParser (const SmilFunctionParser &)=delete | |
SmilFunctionParser & | operator= (const SmilFunctionParser &)=delete |
Static Public Member Functions | |
static std::shared_ptr< ExpressionNode > const & | parseSmilValue (const OUString &rSmilValue, const ::basegfx::B2DRectangle &rRelativeShapeBounds) |
Parse a string containing a SMIL value. More... | |
static std::shared_ptr< ExpressionNode > const & | parseSmilFunction (const OUString &rSmilFunction, const ::basegfx::B2DRectangle &rRelativeShapeBounds) |
Parse a string containing a SMIL function. More... | |
Definition at line 35 of file smilfunctionparser.hxx.
|
delete |
|
delete |
|
delete |
|
static |
Parse a string containing a SMIL function.
This method parses a string representing a possibly time-varying SMIL function.
The following grammar is accepted by this method: identifier = 't'|'pi'|'e'|'X'|'Y'|'Width'|'Height'
function = 'abs'|'sqrt'|'sin'|'cos'|'tan'|'atan'|'acos'|'asin'|'exp'|'log'
basic_expression = number | identifier | function '(' additive_expression ')' | '(' additive_expression ')'
unary_expression = '-' basic_expression | basic_expression
multiplicative_expression = unary_expression ( ( '*' unary_expression )* | ( '/' unary_expression )* )
additive_expression = multiplicative_expression ( ( '+' multiplicative_expression )* | ( '-' multiplicative_expression )* )
rSmilFunction | The string to parse |
rRelativeShapeBounds | The bounds of the shape this SMIL value is to be evaluated for. The bounds must be relative to the page the shape is part of, i.e. within the [0,1] range. This is necessary, since the string might contain symbolic references to the shape bounding box. |
ParseError | if an invalid expression is given. |
Definition at line 567 of file smilfunctionparser.cxx.
References OUStringToOString().
|
static |
Parse a string containing a SMIL value.
This method parses a string representing a fixed value (i.e. a value that does not change by time). Due to the dynamic view capabilities of the presentation engine, this value can sometimes only be determined during runtime of the animation (because e.g. mixed screen/view coordinates are involved), and is thus still returned as an ExpressionNode object. An example for such a case is the "Width+1.0" string, which contains the width of the shape in user coordinate space, and the screen width in device coordinate space.
The following grammar is accepted by this method: identifier = 'pi'|'e'|'X'|'Y'|'Width'|'Height'
function = 'abs'|'sqrt'|'sin'|'cos'|'tan'|'atan'|'acos'|'asin'|'exp'|'log'
basic_expression = number | identifier | function '(' additive_expression ')' | '(' additive_expression ')'
unary_expression = '-' basic_expression | basic_expression
multiplicative_expression = unary_expression ( ( '*' unary_expression )* | ( '/' unary_expression )* )
additive_expression = multiplicative_expression ( ( '+' multiplicative_expression )* | ( '-' multiplicative_expression )* )
rSmilValue | The string to parse |
rRelativeShapeBounds | The bounds of the shape this SMIL value is to be evaluated for. The bounds must be relative to the page the shape is part of, i.e. within the [0,1] range. This is necessary, since the string might contain symbolic references to the shape bounding box. |
ParseError | if an invalid expression is given. |
Definition at line 524 of file smilfunctionparser.cxx.
References OUStringToOString().
Referenced by slideshow::internal::extractValue().