LibreOffice Module forms (master) 1
|
#include <binding.hxx>
Public Types | |
typedef std::vector< css::uno::Reference< css::util::XModifyListener > > | ModifyListeners_t |
typedef std::vector< css::uno::Reference< css::form::validation::XValidityConstraintListener > > | XValidityConstraintListeners_t |
typedef std::vector< css::uno::Reference< css::form::binding::XListEntryListener > > | XListEntryListeners_t |
Public Member Functions | |
Binding () | |
virtual | ~Binding () override |
css::uno::Reference< css::xforms::XModel > | getModel () const |
void | _setModel (const css::uno::Reference< css::xforms::XModel > &) |
get XForms model More... | |
OUString | getModelID () const |
set XForms model (only called by Model) More... | |
OUString | getBindingID () const |
get ID of XForms model More... | |
void | setBindingID (const OUString &) |
get ID for this binding More... | |
OUString | getBindingExpression () const |
set ID for this binding More... | |
void | setBindingExpression (const OUString &) |
get binding expression More... | |
OUString | getReadonlyExpression () const |
set binding exp. More... | |
void | setReadonlyExpression (const OUString &) |
get read-only MIP More... | |
OUString | getRelevantExpression () const |
set read-only MIP More... | |
void | setRelevantExpression (const OUString &) |
get relevant MIP More... | |
OUString | getRequiredExpression () const |
set relevant MIP More... | |
void | setRequiredExpression (const OUString &) |
get required MIP More... | |
OUString | getConstraintExpression () const |
set required MIP More... | |
void | setConstraintExpression (const OUString &) |
get constraint MIP More... | |
OUString | getCalculateExpression () const |
set constraint MIP More... | |
void | setCalculateExpression (const OUString &) |
get calculate MIP More... | |
OUString | getType () const |
set calculate MIP More... | |
void | setType (const OUString &) |
get type name MIP (static) More... | |
css::uno::Reference< css::container::XNameContainer > | getBindingNamespaces () const |
set type name MIP (static) More... | |
void | setBindingNamespaces (const css::uno::Reference< css::container::XNameContainer > &) |
css::uno::Reference< css::container::XNameContainer > | getModelNamespaces () const |
get binding nmsp. More... | |
void | setModelNamespaces (const css::uno::Reference< css::container::XNameContainer > &) |
set model namespaces More... | |
bool | getReadOnly () const |
get model nmsp. More... | |
bool | getRelevant () const |
bool | getExternalData () const |
xforms::EvaluationContext | getEvaluationContext () const |
get this binding's context node More... | |
std::vector< xforms::EvaluationContext > | getMIPEvaluationContexts () |
get evaluation contexts for this binding's MIPs More... | |
css::uno::Reference< css::xml::dom::XNodeList > | getXNodeList () |
get nodeset the bind is bound to More... | |
bool | isSimpleBinding () const |
heuristically determine whether this binding is simple binding (here: simple binding == does not depend on other parts of the instance, it's not a 'dynamic' binding) More... | |
bool | isSimpleBindingExpression () const |
heuristically determine whether this binding's binding expression is simple More... | |
void | update () |
update this binding (e.g. called by model for refresh ) More... | |
void | deferNotifications (bool) |
prevent change notifications being sent to controls More... | |
bool | isValid () const |
is this binding valid? (are constraint, type and required MIPs ok?) More... | |
bool | isUseful () const |
determine whether this binding currently performs a useful function, r whether is may be discarded More... | |
OUString | explainInvalid () |
explain why binding is invalid More... | |
virtual css::uno::Sequence< css::uno::Type > SAL_CALL | getSupportedValueTypes () override |
virtual sal_Bool SAL_CALL | supportsType (const css::uno::Type &aType) override |
virtual css::uno::Any SAL_CALL | getValue (const css::uno::Type &aType) override |
virtual void SAL_CALL | setValue (const css::uno::Any &aValue) override |
virtual sal_Int32 SAL_CALL | getListEntryCount () override |
virtual OUString SAL_CALL | getListEntry (sal_Int32 nPosition) override |
virtual css::uno::Sequence< OUString > SAL_CALL | getAllListEntries () override |
virtual void SAL_CALL | addListEntryListener (const css::uno::Reference< css::form::binding::XListEntryListener > &) override |
virtual void SAL_CALL | removeListEntryListener (const css::uno::Reference< css::form::binding::XListEntryListener > &) override |
virtual sal_Bool SAL_CALL | isValid (const css::uno::Any &) override |
virtual OUString SAL_CALL | explainInvalid (const css::uno::Any &) override |
virtual void SAL_CALL | addValidityConstraintListener (const css::uno::Reference< css::form::validation::XValidityConstraintListener > &xListener) override |
virtual void SAL_CALL | removeValidityConstraintListener (const css::uno::Reference< css::form::validation::XValidityConstraintListener > &xListener) override |
virtual void SAL_CALL | addModifyListener (const css::uno::Reference< css::util::XModifyListener > &xListener) override |
virtual void SAL_CALL | removeModifyListener (const css::uno::Reference< css::util::XModifyListener > &xListener) override |
virtual OUString SAL_CALL | getName () override |
virtual void SAL_CALL | setName (const OUString &) override |
virtual void SAL_CALL | handleEvent (const css::uno::Reference< css::xml::dom::events::XEvent > &xEvent) override |
virtual sal_Int64 SAL_CALL | getSomething (const css::uno::Sequence< sal_Int8 > &) override |
virtual css::uno::Reference< css::util::XCloneable > SAL_CALL | createClone () override |
Static Public Member Functions | |
static css::uno::Sequence< sal_Int8 > | getUnoTunnelId () |
Private Member Functions | |
void | initializePropertySet () |
if true, bindingModified needs to be called More... | |
void | checkLive () |
check whether object is live, and throw suitable exception if not (to be used be API methods before acting on the object) More... | |
bool | isLive () const |
determine whether object is live live: has model, and model has been initialized More... | |
xforms::Model * | getModelImpl () const |
get the model implementation More... | |
std::vector< xforms::EvaluationContext > | _getMIPEvaluationContexts () const |
get MIP evaluation contexts (only valid if control has already been bound) More... | |
void | bind (bool bForceRebind=false) |
bind this binding, and pre-compute the affected nodes More... | |
void | valueModified () |
the binding value has been changed: trigger a modified event on all modified listeners More... | |
void | bindingModified () |
the binding itself has changed: force rebind, then call valueModified() More... | |
MIP | getLocalMIP () const |
set MIPs defined by this binding on MIP item More... | |
css::uno::Reference< css::xsd::XDataType > | getDataType () const |
get the data type that applies to this binding More... | |
bool | isValid_DataType () const |
determine whether binding is valid according to the given data type More... | |
OUString | explainInvalid_DataType () |
explain validity of binding with respect to the given data type More... | |
void | clear () |
'clear' this binding - remove all listeners, etc. More... | |
void | distributeMIP (const css::uno::Reference< css::xml::dom::XNode > &rxNode) |
distribute MIPs from current node recursively to children More... | |
css::uno::Reference< css::container::XNameContainer > | _getNamespaces () const |
implement get*Namespaces() More... | |
void | _setNamespaces (const css::uno::Reference< css::container::XNameContainer > &, bool bBinding) |
implement set*Namespaces() More... | |
void | _checkBindingID () |
set a useful default binding ID (if none is set) More... | |
Private Attributes | |
css::uno::Reference< css::xforms::XModel > | mxModel |
the Model to which this Binding belongs; may be NULL More... | |
OUString | msBindingID |
binding-ID. A document-wide unique ID for this binding element. More... | |
PathExpression | maBindingExpression |
an XPath-expression to be instantiated on the data instance More... | |
BoolExpression | maReadonly |
an XPath-expression to determine read-only status More... | |
BoolExpression | maRelevant |
an XPath-expression to determine relevance More... | |
BoolExpression | maRequired |
an XPath-expression to determine if item is required More... | |
BoolExpression | maConstraint |
an XPath-expression to determine if item is valid More... | |
OUString | msExplainConstraint |
user-readable explanation of the constraint More... | |
ComputedExpression | maCalculate |
an XPath-expression to calculate values More... | |
css::uno::Reference< css::container::XNameContainer > | mxNamespaces |
the XML namespaces used for XML names/XPath-expressions in this binding More... | |
OUString | msTypeName |
a type name More... | |
ModifyListeners_t | maModifyListeners |
modify listeners More... | |
XListEntryListeners_t | maListEntryListeners |
list entry listener More... | |
XValidityConstraintListeners_t | maValidityListeners |
validity listeners; More... | |
std::vector< css::uno::Reference< css::xml::dom::XNode > > | maEventNodes |
nodes on which we are listening for events More... | |
MIP | maMIP |
the current MIP object for the first node we are bound to More... | |
bool | mbInCalculate |
flag to detect recursions in calculate More... | |
sal_Int32 | mnDeferModifyNotifications |
if >0, valueModified() and bindingModified() will only set flags More... | |
bool | mbValueModified |
bool | mbBindingModified |
if true, valueModified needs to be called More... | |
Definition at line 86 of file binding.hxx.
typedef std::vector<css::uno::Reference<css::util::XModifyListener> > xforms::Binding::ModifyListeners_t |
Definition at line 89 of file binding.hxx.
typedef std::vector<css::uno::Reference<css::form::binding::XListEntryListener> > xforms::Binding::XListEntryListeners_t |
Definition at line 91 of file binding.hxx.
typedef std::vector<css::uno::Reference<css::form::validation::XValidityConstraintListener> > xforms::Binding::XValidityConstraintListeners_t |
Definition at line 90 of file binding.hxx.
Binding::Binding | ( | ) |
Definition at line 109 of file binding.cxx.
References initializePropertySet().
Referenced by createClone().
|
overridevirtual |
Definition at line 119 of file binding.cxx.
References _setModel().
|
private |
set a useful default binding ID (if none is set)
Definition at line 925 of file binding.cxx.
References getModel(), xforms::getResource(), msBindingID, setBindingID(), and sName.
Referenced by _setModel().
|
private |
get MIP evaluation contexts (only valid if control has already been bound)
Definition at line 495 of file binding.cxx.
References getBindingNamespaces(), getModel(), getModelImpl(), xforms::PathExpression::getNodeList(), and maBindingExpression.
Referenced by bind(), and getMIPEvaluationContexts().
|
private |
implement get*Namespaces()
Definition at line 856 of file binding.cxx.
References getModelImpl(), xforms::Model::getNamespaces(), lcl_copyNamespaces(), and mxNamespaces.
Referenced by getModelNamespaces().
void Binding::_setModel | ( | const css::uno::Reference< css::xforms::XModel > & | xModel | ) |
get XForms model
Definition at line 124 of file binding.cxx.
References _checkBindingID(), clear(), getModelNamespaces(), HANDLE_ExternalData, HANDLE_Model, HANDLE_ModelID, mxModel, setBindingNamespaces(), and xModel.
Referenced by ~Binding().
|
private |
implement set*Namespaces()
Definition at line 871 of file binding.cxx.
References Any, bindingModified(), getModelImpl(), xforms::Model::getNamespaces(), i, lcl_removeOtherNamespaces(), and mxNamespaces.
Referenced by setBindingNamespaces(), and setModelNamespaces().
|
overridevirtual |
Definition at line 1072 of file binding.cxx.
References maListEntryListeners.
|
overridevirtual |
Definition at line 1247 of file binding.cxx.
References maModifyListeners, and valueModified().
|
overridevirtual |
Definition at line 1114 of file binding.cxx.
References maValidityListeners.
|
private |
bind this binding, and pre-compute the affected nodes
Definition at line 513 of file binding.cxx.
References _getMIPEvaluationContexts(), xforms::Model::addMIP(), xforms::ComputedExpression::evaluate(), xforms::PathExpression::evaluate(), getEvaluationContext(), xforms::ComputedExpression::getExpression(), getLocalMIP(), getModelImpl(), xforms::PathExpression::getNode(), xforms::PathExpression::getNodeList(), xforms::ComputedExpression::getString(), xforms::ComputedExpression::isEmptyExpression(), isSimpleBinding(), isValidQName(), lcl_addListenerToNode(), lcl_removeListenerFromNode(), maBindingExpression, maCalculate, maConstraint, maEventNodes, maReadonly, maRelevant, maRequired, mbInCalculate, xforms::EvaluationContext::mxContextNode, mxModel, xforms::EvaluationContext::mxNamespaces, xforms::Model::removeMIPs(), and xforms::Model::setSimpleContent().
Referenced by bindingModified(), getMIPEvaluationContexts(), getXNodeList(), and handleEvent().
|
private |
the binding itself has changed: force rebind, then call valueModified()
Definition at line 694 of file binding.cxx.
References bind(), isLive(), mbBindingModified, mnDeferModifyNotifications, and valueModified().
Referenced by _setNamespaces(), deferNotifications(), setBindingExpression(), setCalculateExpression(), setConstraintExpression(), setReadonlyExpression(), setRelevantExpression(), setRequiredExpression(), setType(), and update().
|
private |
check whether object is live, and throw suitable exception if not (to be used be API methods before acting on the object)
css::uno::RuntimeException |
Definition at line 440 of file binding.cxx.
References isLive().
Referenced by explainInvalid(), getAllListEntries(), getListEntry(), getListEntryCount(), getValue(), isValid(), and setValue().
|
private |
'clear' this binding - remove all listeners, etc.
Definition at line 768 of file binding.cxx.
References xforms::ComputedExpression::clear(), getModelImpl(), lcl_removeListenerFromNode(), maBindingExpression, maCalculate, maConstraint, maEventNodes, maReadonly, maRelevant, maRequired, and xforms::Model::removeMIPs().
Referenced by _setModel().
|
overridevirtual |
Definition at line 1177 of file binding.cxx.
References Binding(), xforms::Model::cloneBinding(), xforms::copy(), and getModelImpl().
void Binding::deferNotifications | ( | bool | bDefer | ) |
prevent change notifications being sent to controls
Definition at line 188 of file binding.cxx.
References bindingModified(), mbBindingModified, mbValueModified, mnDeferModifyNotifications, and valueModified().
Referenced by xforms::Model::deferNotifications().
|
private |
distribute MIPs from current node recursively to children
Definition at line 668 of file binding.cxx.
References distributeMIP().
Referenced by distributeMIP(), and valueModified().
OUString Binding::explainInvalid | ( | ) |
explain why binding is invalid
Definition at line 249 of file binding.cxx.
References explainInvalid_DataType(), xforms::MIP::getConstraintExplanation(), xforms::ComputedExpression::getExpression(), xforms::PathExpression::getNode(), xforms::getResource(), xforms::ComputedExpression::getString(), xforms::MIP::getTypeName(), xforms::ComputedExpression::hasValue(), xforms::MIP::isConstraint(), xforms::MIP::isRequired(), isValid(), isValid_DataType(), maBindingExpression, and maMIP.
Referenced by explainInvalid().
|
overridevirtual |
Definition at line 1104 of file binding.cxx.
References checkLive(), and explainInvalid().
|
private |
explain validity of binding with respect to the given data type
Definition at line 760 of file binding.cxx.
References getDataType(), xforms::ComputedExpression::getString(), and maBindingExpression.
Referenced by explainInvalid().
|
overridevirtual |
Definition at line 1055 of file binding.cxx.
References checkLive(), xforms::PathExpression::getNodeList(), lcl_getString(), maBindingExpression, and n.
OUString Binding::getBindingExpression | ( | ) | const |
set ID for this binding
Definition at line 316 of file binding.cxx.
References xforms::ComputedExpression::getExpression(), and maBindingExpression.
Referenced by xforms::Submission::doSubmit(), initializePropertySet(), and xforms::Model::renameNode().
|
inline |
get ID of XForms model
Definition at line 171 of file binding.hxx.
References msBindingID.
Referenced by getName(), and initializePropertySet().
|
inline |
set type name MIP (static)
Definition at line 202 of file binding.hxx.
References mxNamespaces.
Referenced by _getMIPEvaluationContexts(), getEvaluationContext(), and initializePropertySet().
OUString Binding::getCalculateExpression | ( | ) | const |
set constraint MIP
Definition at line 377 of file binding.cxx.
References xforms::ComputedExpression::getExpression(), and maCalculate.
Referenced by initializePropertySet().
OUString Binding::getConstraintExpression | ( | ) | const |
set required MIP
Definition at line 360 of file binding.cxx.
References xforms::ComputedExpression::getExpression(), and maConstraint.
Referenced by initializePropertySet().
|
private |
get the data type that applies to this binding
Definition at line 739 of file binding.cxx.
References getModel(), xforms::MIP::getTypeName(), and maMIP.
Referenced by explainInvalid_DataType(), and isValid_DataType().
EvaluationContext Binding::getEvaluationContext | ( | ) | const |
get this binding's context node
Definition at line 286 of file binding.cxx.
References getBindingNamespaces(), xforms::Model::getEvaluationContext(), getModelImpl(), and xforms::EvaluationContext::mxNamespaces.
Referenced by bind(), xforms::Submission::doSubmit(), and xforms::Model::getResultForExpression().
bool Binding::getExternalData | ( | ) | const |
Definition at line 420 of file binding.cxx.
References DBG_UNHANDLED_EXCEPTION, Exception, and mxModel.
Referenced by initializePropertySet().
|
overridevirtual |
Definition at line 1043 of file binding.cxx.
References checkLive(), xforms::PathExpression::getNodeList(), lcl_getString(), maBindingExpression, and o3tl::make_unsigned().
|
overridevirtual |
Definition at line 1009 of file binding.cxx.
References checkLive(), xforms::PathExpression::getNodeList(), and maBindingExpression.
|
private |
set MIPs defined by this binding on MIP item
Definition at line 714 of file binding.cxx.
References xforms::ComputedExpression::getBool(), xforms::ComputedExpression::hasValue(), xforms::MIP::isConstraint(), xforms::ComputedExpression::isEmptyExpression(), maCalculate, maConstraint, maReadonly, maRelevant, maRequired, msExplainConstraint, msTypeName, xforms::MIP::setConstraint(), xforms::MIP::setConstraintExplanation(), xforms::MIP::setHasCalculate(), xforms::MIP::setReadonly(), xforms::MIP::setRelevant(), xforms::MIP::setRequired(), and xforms::MIP::setTypeName().
Referenced by bind().
std::vector< EvaluationContext > Binding::getMIPEvaluationContexts | ( | ) |
get evaluation contexts for this binding's MIPs
Definition at line 294 of file binding.cxx.
References _getMIPEvaluationContexts(), bind(), and getModelImpl().
Referenced by xforms::Model::getResultForExpression().
|
inline |
Definition at line 165 of file binding.hxx.
References mxModel.
Referenced by _checkBindingID(), _getMIPEvaluationContexts(), getDataType(), and initializePropertySet().
OUString Binding::getModelID | ( | ) | const |
set XForms model (only called by Model)
Definition at line 143 of file binding.cxx.
References xforms::Model::getID(), and getModelImpl().
Referenced by initializePropertySet().
|
private |
get the model implementation
Definition at line 452 of file binding.cxx.
References mxModel.
Referenced by _getMIPEvaluationContexts(), _getNamespaces(), _setNamespaces(), bind(), clear(), createClone(), getEvaluationContext(), getMIPEvaluationContexts(), getModelID(), isLive(), isUseful(), setValue(), and valueModified().
css::uno::Reference< css::container::XNameContainer > Binding::getModelNamespaces | ( | ) | const |
get binding nmsp.
Definition at line 400 of file binding.cxx.
References _getNamespaces().
Referenced by _setModel(), and initializePropertySet().
|
overridevirtual |
Definition at line 1271 of file binding.cxx.
References getBindingID().
bool Binding::getReadOnly | ( | ) | const |
get model nmsp.
Definition at line 410 of file binding.cxx.
References xforms::MIP::isReadonly(), and maMIP.
Referenced by initializePropertySet().
OUString Binding::getReadonlyExpression | ( | ) | const |
set binding exp.
Definition at line 327 of file binding.cxx.
References xforms::ComputedExpression::getExpression(), and maReadonly.
Referenced by initializePropertySet().
bool Binding::getRelevant | ( | ) | const |
Definition at line 415 of file binding.cxx.
References xforms::MIP::isRelevant(), and maMIP.
Referenced by initializePropertySet().
OUString Binding::getRelevantExpression | ( | ) | const |
set read-only MIP
Definition at line 338 of file binding.cxx.
References xforms::ComputedExpression::getExpression(), and maRelevant.
Referenced by initializePropertySet().
OUString Binding::getRequiredExpression | ( | ) | const |
set relevant MIP
Definition at line 349 of file binding.cxx.
References xforms::ComputedExpression::getExpression(), and maRequired.
Referenced by initializePropertySet().
|
overridevirtual |
Definition at line 1168 of file binding.cxx.
References comphelper::getSomethingImpl().
|
overridevirtual |
Definition at line 951 of file binding.cxx.
References xforms::Convert::get(), and xforms::Convert::getTypes().
|
inline |
set calculate MIP
Definition at line 194 of file binding.hxx.
References msTypeName.
Referenced by initializePropertySet().
|
static |
Definition at line 304 of file binding.cxx.
References comphelper::UnoIdInit::getSeq().
|
overridevirtual |
Definition at line 961 of file binding.cxx.
References checkLive(), xforms::Convert::get(), xforms::ComputedExpression::getString(), xforms::ComputedExpression::hasValue(), maBindingExpression, result, supportsType(), and xforms::Convert::toAny().
css::uno::Reference< css::xml::dom::XNodeList > Binding::getXNodeList | ( | ) |
get nodeset the bind is bound to
Definition at line 150 of file binding.cxx.
References bind(), xforms::PathExpression::getXNodeList(), xforms::ComputedExpression::hasValue(), and maBindingExpression.
Referenced by xforms::Model::getBindingForNode().
|
overridevirtual |
Definition at line 1137 of file binding.cxx.
References bind(), mbValueModified, mnDeferModifyNotifications, sType, and valueModified().
|
private |
if true, bindingModified needs to be called
Definition at line 1195 of file binding.cxx.
References getBindingExpression(), getBindingID(), getBindingNamespaces(), getCalculateExpression(), getConstraintExpression(), getExternalData(), getModel(), getModelID(), getModelNamespaces(), getReadOnly(), getReadonlyExpression(), getRelevant(), getRelevantExpression(), getRequiredExpression(), getType(), HANDLE_BindingExpression, HANDLE_BindingID, HANDLE_BindingNamespaces, HANDLE_CalculateExpression, HANDLE_ConstraintExpression, HANDLE_ExternalData, HANDLE_Model, HANDLE_ModelID, HANDLE_ModelNamespaces, HANDLE_ReadOnly, HANDLE_ReadonlyExpression, HANDLE_Relevant, HANDLE_RelevantExpression, HANDLE_RequiredExpression, HANDLE_Type, setBindingExpression(), setBindingID(), setBindingNamespaces(), setCalculateExpression(), setConstraintExpression(), setModelNamespaces(), setReadonlyExpression(), setRelevantExpression(), setRequiredExpression(), and setType().
Referenced by Binding().
|
private |
determine whether object is live live: has model, and model has been initialized
Definition at line 446 of file binding.cxx.
References getModelImpl(), and xforms::Model::isInitialized().
Referenced by bindingModified(), and checkLive().
bool Binding::isSimpleBinding | ( | ) | const |
heuristically determine whether this binding is simple binding (here: simple binding == does not depend on other parts of the instance, it's not a 'dynamic' binding)
Definition at line 159 of file binding.cxx.
References xforms::ComputedExpression::isSimpleExpression(), maBindingExpression, maCalculate, maConstraint, maReadonly, maRelevant, and maRequired.
Referenced by bind().
bool Binding::isSimpleBindingExpression | ( | ) | const |
heuristically determine whether this binding's binding expression is simple
Definition at line 169 of file binding.cxx.
References xforms::ComputedExpression::isSimpleExpression(), and maBindingExpression.
Referenced by xforms::Model::getBindingForNode().
bool Binding::isUseful | ( | ) | const |
determine whether this binding currently performs a useful function, r whether is may be discarded
Definition at line 224 of file binding.cxx.
References getModelImpl(), xforms::ComputedExpression::isEmptyExpression(), maCalculate, maConstraint, maListEntryListeners, maModifyListeners, maReadonly, maRelevant, maRequired, maValidityListeners, and msTypeName.
Referenced by xforms::Model::removeBindingIfUseless().
bool Binding::isValid | ( | ) | const |
is this binding valid? (are constraint, type and required MIPs ok?)
Definition at line 206 of file binding.cxx.
References xforms::PathExpression::getNode(), xforms::ComputedExpression::getString(), xforms::ComputedExpression::hasValue(), xforms::MIP::isConstraint(), xforms::MIP::isRequired(), isValid_DataType(), maBindingExpression, and maMIP.
Referenced by explainInvalid(), xforms::Model::isValid(), and isValid().
|
overridevirtual |
Definition at line 1095 of file binding.cxx.
References checkLive(), and isValid().
|
private |
determine whether binding is valid according to the given data type
Definition at line 753 of file binding.cxx.
References getDataType(), xforms::ComputedExpression::getString(), and maBindingExpression.
Referenced by explainInvalid(), and isValid().
|
overridevirtual |
Definition at line 1082 of file binding.cxx.
References maListEntryListeners.
|
overridevirtual |
Definition at line 1261 of file binding.cxx.
References maModifyListeners.
|
overridevirtual |
Definition at line 1123 of file binding.cxx.
References maValidityListeners.
void Binding::setBindingExpression | ( | const OUString & | sBindingExpression | ) |
get binding expression
Definition at line 321 of file binding.cxx.
References bindingModified(), maBindingExpression, and xforms::PathExpression::setExpression().
Referenced by initializePropertySet(), and xforms::Model::renameNode().
void Binding::setBindingID | ( | const OUString & | sBindingID | ) |
get ID for this binding
Definition at line 311 of file binding.cxx.
References msBindingID.
Referenced by _checkBindingID(), and initializePropertySet().
void Binding::setBindingNamespaces | ( | const css::uno::Reference< css::container::XNameContainer > & | rNamespaces | ) |
Definition at line 395 of file binding.cxx.
References _setNamespaces().
Referenced by _setModel(), and initializePropertySet().
void Binding::setCalculateExpression | ( | const OUString & | sCalculate | ) |
get calculate MIP
Definition at line 382 of file binding.cxx.
References bindingModified(), maCalculate, and xforms::ComputedExpression::setExpression().
Referenced by initializePropertySet().
void Binding::setConstraintExpression | ( | const OUString & | sConstraint | ) |
get constraint MIP
Definition at line 365 of file binding.cxx.
References bindingModified(), xforms::getResource(), maConstraint, msExplainConstraint, and xforms::BoolExpression::setExpression().
Referenced by initializePropertySet().
void Binding::setModelNamespaces | ( | const css::uno::Reference< css::container::XNameContainer > & | rNamespaces | ) |
set model namespaces
Definition at line 405 of file binding.cxx.
References _setNamespaces().
Referenced by initializePropertySet().
|
overridevirtual |
Definition at line 1276 of file binding.cxx.
References Any, and HANDLE_BindingID.
void Binding::setReadonlyExpression | ( | const OUString & | sReadonly | ) |
get read-only MIP
Definition at line 332 of file binding.cxx.
References bindingModified(), maReadonly, and xforms::BoolExpression::setExpression().
Referenced by initializePropertySet().
void Binding::setRelevantExpression | ( | const OUString & | sRelevant | ) |
get relevant MIP
Definition at line 343 of file binding.cxx.
References bindingModified(), maRelevant, and xforms::BoolExpression::setExpression().
Referenced by initializePropertySet().
void Binding::setRequiredExpression | ( | const OUString & | sRequired | ) |
get required MIP
Definition at line 354 of file binding.cxx.
References bindingModified(), maRequired, and xforms::BoolExpression::setExpression().
Referenced by initializePropertySet().
void Binding::setType | ( | const OUString & | sTypeName | ) |
get type name MIP (static)
Definition at line 389 of file binding.cxx.
References bindingModified(), and msTypeName.
Referenced by initializePropertySet().
|
overridevirtual |
Definition at line 981 of file binding.cxx.
References checkLive(), xforms::Convert::get(), getModelImpl(), xforms::PathExpression::getNode(), xforms::ComputedExpression::hasValue(), maBindingExpression, xforms::Model::setSimpleContent(), supportsType(), and xforms::Convert::toXSD().
|
overridevirtual |
Definition at line 956 of file binding.cxx.
References xforms::Convert::get(), and xforms::Convert::hasType().
Referenced by getValue(), and setValue().
void Binding::update | ( | ) |
update this binding (e.g. called by model for refresh )
Definition at line 174 of file binding.cxx.
References bindingModified(), xforms::ComputedExpression::clear(), maBindingExpression, maCalculate, maConstraint, maReadonly, maRelevant, and maRequired.
Referenced by xforms::Model::rebind().
|
private |
the binding value has been changed: trigger a modified event on all modified listeners
Definition at line 628 of file binding.cxx.
References distributeMIP(), getModelImpl(), xforms::PathExpression::getNode(), HANDLE_ReadOnly, HANDLE_Relevant, lcl_listentry(), lcl_modified(), lcl_validate(), maBindingExpression, maListEntryListeners, maMIP, maModifyListeners, maValidityListeners, mbValueModified, mnDeferModifyNotifications, xforms::Model::queryMIP(), and XPropertySet.
Referenced by addModifyListener(), bindingModified(), deferNotifications(), and handleEvent().
|
private |
an XPath-expression to be instantiated on the data instance
Definition at line 103 of file binding.hxx.
Referenced by _getMIPEvaluationContexts(), bind(), clear(), explainInvalid(), explainInvalid_DataType(), getAllListEntries(), getBindingExpression(), getListEntry(), getListEntryCount(), getValue(), getXNodeList(), isSimpleBinding(), isSimpleBindingExpression(), isValid(), isValid_DataType(), setBindingExpression(), setValue(), update(), and valueModified().
|
private |
an XPath-expression to calculate values
Definition at line 121 of file binding.hxx.
Referenced by bind(), clear(), getCalculateExpression(), getLocalMIP(), isSimpleBinding(), isUseful(), setCalculateExpression(), and update().
|
private |
an XPath-expression to determine if item is valid
Definition at line 115 of file binding.hxx.
Referenced by bind(), clear(), getConstraintExpression(), getLocalMIP(), isSimpleBinding(), isUseful(), setConstraintExpression(), and update().
|
private |
nodes on which we are listening for events
Definition at line 139 of file binding.hxx.
|
private |
list entry listener
Definition at line 133 of file binding.hxx.
Referenced by addListEntryListener(), isUseful(), removeListEntryListener(), and valueModified().
|
private |
the current MIP object for the first node we are bound to
Definition at line 142 of file binding.hxx.
Referenced by explainInvalid(), getDataType(), getReadOnly(), getRelevant(), isValid(), and valueModified().
|
private |
modify listeners
Definition at line 130 of file binding.hxx.
Referenced by addModifyListener(), isUseful(), removeModifyListener(), and valueModified().
|
private |
an XPath-expression to determine read-only status
Definition at line 106 of file binding.hxx.
Referenced by bind(), clear(), getLocalMIP(), getReadonlyExpression(), isSimpleBinding(), isUseful(), setReadonlyExpression(), and update().
|
private |
an XPath-expression to determine relevance
Definition at line 109 of file binding.hxx.
Referenced by bind(), clear(), getLocalMIP(), getRelevantExpression(), isSimpleBinding(), isUseful(), setRelevantExpression(), and update().
|
private |
an XPath-expression to determine if item is required
Definition at line 112 of file binding.hxx.
Referenced by bind(), clear(), getLocalMIP(), getRequiredExpression(), isSimpleBinding(), isUseful(), setRequiredExpression(), and update().
|
private |
validity listeners;
Definition at line 136 of file binding.hxx.
Referenced by addValidityConstraintListener(), isUseful(), removeValidityConstraintListener(), and valueModified().
|
private |
if true, valueModified needs to be called
Definition at line 151 of file binding.hxx.
Referenced by bindingModified(), and deferNotifications().
|
private |
flag to detect recursions in calculate
Definition at line 145 of file binding.hxx.
Referenced by bind().
|
private |
Definition at line 150 of file binding.hxx.
Referenced by deferNotifications(), handleEvent(), and valueModified().
|
private |
if >0, valueModified() and bindingModified() will only set flags
Definition at line 149 of file binding.hxx.
Referenced by bindingModified(), deferNotifications(), handleEvent(), and valueModified().
|
private |
binding-ID. A document-wide unique ID for this binding element.
Definition at line 100 of file binding.hxx.
Referenced by _checkBindingID(), getBindingID(), and setBindingID().
|
private |
user-readable explanation of the constraint
Definition at line 118 of file binding.hxx.
Referenced by getLocalMIP(), and setConstraintExpression().
|
private |
a type name
Definition at line 127 of file binding.hxx.
Referenced by getLocalMIP(), getType(), isUseful(), and setType().
|
private |
the Model to which this Binding belongs; may be NULL
Definition at line 97 of file binding.hxx.
Referenced by _setModel(), bind(), getExternalData(), getModel(), and getModelImpl().
|
private |
the XML namespaces used for XML names/XPath-expressions in this binding
Definition at line 124 of file binding.hxx.
Referenced by _getNamespaces(), _setNamespaces(), and getBindingNamespaces().