LibreOffice Module reportdesign (master) 1
|
#include <reportformula.hxx>
Public Types | |
enum | BindType { Expression , Field , Invalid } |
Public Member Functions | |
ReportFormula (const OUString &_rFormula) | |
constructs a ReportFormula object from a string More... | |
ReportFormula (const BindType _eType, const OUString &_rFieldOrExpression) | |
constructs a ReportFormula by BindType More... | |
~ReportFormula () | |
bool | isValid () const |
returns whether the object denotes a valid formula More... | |
BindType | getType () const |
returns the type of the binding represented by the formula More... | |
const OUString & | getCompleteFormula () const |
returns the complete formula represented by the object More... | |
const OUString & | getUndecoratedContent () const |
gets the undecorated formula content More... | |
OUString const & | getFieldName () const |
convenience alias for getUndecoratedContent , which asserts (in a non-product build) when used on an expression More... | |
OUString | getEqualUndecoratedContent () const |
OUString const & | getExpression () const |
convenience alias for getUndecoratedContent , which asserts (in a non-product build) when used on a field More... | |
OUString | getBracketedFieldOrExpression () const |
returns a bracketed field name of the formula denotes a field reference, or the undecorated expression if the formula denotes an expression. More... | |
Private Attributes | |
BindType | m_eType |
OUString | m_sCompleteFormula |
OUString | m_sUndecoratedContent |
Definition at line 35 of file reportformula.hxx.
Enumerator | |
---|---|
Expression | |
Field | |
Invalid |
Definition at line 38 of file reportformula.hxx.
rptui::ReportFormula::ReportFormula | ( | const OUString & | _rFormula | ) |
constructs a ReportFormula object from a string
does it refer to a field?
Definition at line 38 of file reportformula.cxx.
References Expression, Field, Invalid, Invalid, m_eType, m_eType, m_sCompleteFormula, and m_sUndecoratedContent.
rptui::ReportFormula::ReportFormula | ( | const BindType | _eType, |
const OUString & | _rFieldOrExpression | ||
) |
constructs a ReportFormula by BindType
Definition at line 69 of file reportformula.cxx.
References Expression, Field, m_eType, m_eType, m_sCompleteFormula, m_sUndecoratedContent, and u.
rptui::ReportFormula::~ReportFormula | ( | ) |
Definition at line 96 of file reportformula.cxx.
OUString rptui::ReportFormula::getBracketedFieldOrExpression | ( | ) | const |
returns a bracketed field name of the formula denotes a field reference, or the undecorated expression if the formula denotes an expression.
Effectively, this means the method returns the complete formula, stripped by the prefix which indicates a field or an expression.
Definition at line 100 of file reportformula.cxx.
References Field, getType(), and getUndecoratedContent().
Referenced by rptui::Condition::fillFormatCondition(), rptui::ConditionUpdater::impl_adjustFormatConditions_nothrow(), and rptui::Condition::impl_setCondition().
|
inline |
returns the complete formula represented by the object
Definition at line 67 of file reportformula.hxx.
Referenced by rptui::OReportController::addPairControls(), rptui::OReportController::createControl(), rptui::Condition::fillFormatCondition(), rptui::ConditionUpdater::impl_adjustFormatConditions_nothrow(), rptui::GeometryHandler::impl_convertToFormula(), and rptui::IMPL_LINK_NOARG().
OUString rptui::ReportFormula::getEqualUndecoratedContent | ( | ) | const |
Definition at line 115 of file reportformula.cxx.
References getUndecoratedContent().
|
inline |
convenience alias for getUndecoratedContent
, which asserts (in a non-product build) when used on a field
Definition at line 107 of file reportformula.hxx.
References Expression, getType(), and getUndecoratedContent().
Referenced by rptui::ConditionUpdater::impl_adjustFormatConditions_nothrow(), and rptui::Condition::impl_setCondition().
|
inline |
convenience alias for getUndecoratedContent
, which asserts (in a non-product build) when used on an expression
Definition at line 100 of file reportformula.hxx.
References Field, getType(), and getUndecoratedContent().
|
inline |
returns the type of the binding represented by the formula
Definition at line 63 of file reportformula.hxx.
References m_eType.
Referenced by getBracketedFieldOrExpression(), getExpression(), getFieldName(), rptui::Condition::impl_setCondition(), and isValid().
|
inline |
gets the undecorated formula content
If the formula denotes a field binding, the undecorated content is the field name.
If the formula denotes an expression, then the undecorated content is the expression itself.
Definition at line 77 of file reportformula.hxx.
Referenced by getBracketedFieldOrExpression(), getEqualUndecoratedContent(), getExpression(), getFieldName(), rptui::IMPL_LINK_NOARG(), rptui::lcl_getName(), and rptui::openDialogFormula_nothrow().
bool rptui::ReportFormula::isValid | ( | ) | const |
returns whether the object denotes a valid formula
Definition at line 113 of file reportformula.cxx.
References getType(), and Invalid.
Referenced by rptui::GeometryHandler::impl_convertToFormula(), and rptui::lcl_getName().
|
private |
Definition at line 47 of file reportformula.hxx.
Referenced by ReportFormula().
|
private |
Definition at line 48 of file reportformula.hxx.
Referenced by ReportFormula().
|
private |
Definition at line 49 of file reportformula.hxx.
Referenced by ReportFormula().