LibreOffice Module forms (master) 1
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
xforms::Binding Class Reference

#include <binding.hxx>

Inheritance diagram for xforms::Binding:
[legend]
Collaboration diagram for xforms::Binding:
[legend]

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::EvaluationContextgetMIPEvaluationContexts ()
 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_Int8getUnoTunnelId ()
 

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::ModelgetModelImpl () 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...
 

Detailed Description

Definition at line 86 of file binding.hxx.

Member Typedef Documentation

◆ ModifyListeners_t

typedef std::vector<css::uno::Reference<css::util::XModifyListener> > xforms::Binding::ModifyListeners_t

Definition at line 89 of file binding.hxx.

◆ XListEntryListeners_t

typedef std::vector<css::uno::Reference<css::form::binding::XListEntryListener> > xforms::Binding::XListEntryListeners_t

Definition at line 91 of file binding.hxx.

◆ XValidityConstraintListeners_t

typedef std::vector<css::uno::Reference<css::form::validation::XValidityConstraintListener> > xforms::Binding::XValidityConstraintListeners_t

Definition at line 90 of file binding.hxx.

Constructor & Destructor Documentation

◆ Binding()

Binding::Binding ( )

Definition at line 109 of file binding.cxx.

References initializePropertySet().

Referenced by createClone().

◆ ~Binding()

Binding::~Binding ( )
overridevirtual

Definition at line 119 of file binding.cxx.

References _setModel().

Member Function Documentation

◆ _checkBindingID()

void Binding::_checkBindingID ( )
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().

◆ _getMIPEvaluationContexts()

std::vector< EvaluationContext > Binding::_getMIPEvaluationContexts ( ) const
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().

◆ _getNamespaces()

css::uno::Reference< css::container::XNameContainer > Binding::_getNamespaces ( ) const
private

implement get*Namespaces()

Definition at line 856 of file binding.cxx.

References getModelImpl(), xforms::Model::getNamespaces(), lcl_copyNamespaces(), and mxNamespaces.

Referenced by getModelNamespaces().

◆ _setModel()

void Binding::_setModel ( const css::uno::Reference< css::xforms::XModel > &  xModel)

◆ _setNamespaces()

void Binding::_setNamespaces ( const css::uno::Reference< css::container::XNameContainer > &  rNamespaces,
bool  bBinding 
)
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().

◆ addListEntryListener()

void Binding::addListEntryListener ( const css::uno::Reference< css::form::binding::XListEntryListener > &  xListener)
overridevirtual

Definition at line 1072 of file binding.cxx.

References maListEntryListeners.

◆ addModifyListener()

void Binding::addModifyListener ( const css::uno::Reference< css::util::XModifyListener > &  xListener)
overridevirtual

Definition at line 1247 of file binding.cxx.

References maModifyListeners, and valueModified().

◆ addValidityConstraintListener()

void Binding::addValidityConstraintListener ( const css::uno::Reference< css::form::validation::XValidityConstraintListener > &  xListener)
overridevirtual

Definition at line 1114 of file binding.cxx.

References maValidityListeners.

◆ bind()

void Binding::bind ( bool  bForceRebind = false)
private

◆ bindingModified()

void Binding::bindingModified ( )
private

◆ checkLive()

void Binding::checkLive ( )
private

check whether object is live, and throw suitable exception if not (to be used be API methods before acting on the object)

Exceptions
css::uno::RuntimeException

Definition at line 440 of file binding.cxx.

References isLive().

Referenced by explainInvalid(), getAllListEntries(), getListEntry(), getListEntryCount(), getValue(), isValid(), and setValue().

◆ clear()

void Binding::clear ( )
private

◆ createClone()

css::uno::Reference< css::util::XCloneable > SAL_CALL Binding::createClone ( )
overridevirtual

Definition at line 1177 of file binding.cxx.

References Binding(), xforms::Model::cloneBinding(), xforms::copy(), and getModelImpl().

◆ deferNotifications()

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().

◆ distributeMIP()

void Binding::distributeMIP ( const css::uno::Reference< css::xml::dom::XNode > &  rxNode)
private

distribute MIPs from current node recursively to children

Definition at line 668 of file binding.cxx.

References distributeMIP().

Referenced by distributeMIP(), and valueModified().

◆ explainInvalid() [1/2]

OUString Binding::explainInvalid ( )

◆ explainInvalid() [2/2]

OUString Binding::explainInvalid ( const css::uno::Any &  )
overridevirtual

Definition at line 1104 of file binding.cxx.

References checkLive(), and explainInvalid().

◆ explainInvalid_DataType()

OUString Binding::explainInvalid_DataType ( )
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().

◆ getAllListEntries()

Sequence< OUString > Binding::getAllListEntries ( )
overridevirtual

◆ getBindingExpression()

OUString Binding::getBindingExpression ( ) const

◆ getBindingID()

OUString xforms::Binding::getBindingID ( ) const
inline

get ID of XForms model

Definition at line 171 of file binding.hxx.

References msBindingID.

Referenced by getName(), and initializePropertySet().

◆ getBindingNamespaces()

css::uno::Reference< css::container::XNameContainer > xforms::Binding::getBindingNamespaces ( ) const
inline

set type name MIP (static)

Definition at line 202 of file binding.hxx.

References mxNamespaces.

Referenced by _getMIPEvaluationContexts(), getEvaluationContext(), and initializePropertySet().

◆ getCalculateExpression()

OUString Binding::getCalculateExpression ( ) const

set constraint MIP

Definition at line 377 of file binding.cxx.

References xforms::ComputedExpression::getExpression(), and maCalculate.

Referenced by initializePropertySet().

◆ getConstraintExpression()

OUString Binding::getConstraintExpression ( ) const

set required MIP

Definition at line 360 of file binding.cxx.

References xforms::ComputedExpression::getExpression(), and maConstraint.

Referenced by initializePropertySet().

◆ getDataType()

css::uno::Reference< css::xsd::XDataType > Binding::getDataType ( ) const
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().

◆ getEvaluationContext()

EvaluationContext Binding::getEvaluationContext ( ) const

◆ getExternalData()

bool Binding::getExternalData ( ) const

Definition at line 420 of file binding.cxx.

References DBG_UNHANDLED_EXCEPTION, Exception, and mxModel.

Referenced by initializePropertySet().

◆ getListEntry()

OUString Binding::getListEntry ( sal_Int32  nPosition)
overridevirtual

◆ getListEntryCount()

sal_Int32 Binding::getListEntryCount ( )
overridevirtual

◆ getLocalMIP()

MIP Binding::getLocalMIP ( ) const
private

◆ getMIPEvaluationContexts()

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().

◆ getModel()

css::uno::Reference< css::xforms::XModel > xforms::Binding::getModel ( ) const
inline

Definition at line 165 of file binding.hxx.

References mxModel.

Referenced by _checkBindingID(), _getMIPEvaluationContexts(), getDataType(), and initializePropertySet().

◆ getModelID()

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().

◆ getModelImpl()

Model * Binding::getModelImpl ( ) const
private

◆ getModelNamespaces()

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().

◆ getName()

OUString Binding::getName ( )
overridevirtual

Definition at line 1271 of file binding.cxx.

References getBindingID().

◆ getReadOnly()

bool Binding::getReadOnly ( ) const

get model nmsp.

Definition at line 410 of file binding.cxx.

References xforms::MIP::isReadonly(), and maMIP.

Referenced by initializePropertySet().

◆ getReadonlyExpression()

OUString Binding::getReadonlyExpression ( ) const

set binding exp.

Definition at line 327 of file binding.cxx.

References xforms::ComputedExpression::getExpression(), and maReadonly.

Referenced by initializePropertySet().

◆ getRelevant()

bool Binding::getRelevant ( ) const

Definition at line 415 of file binding.cxx.

References xforms::MIP::isRelevant(), and maMIP.

Referenced by initializePropertySet().

◆ getRelevantExpression()

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().

◆ getRequiredExpression()

OUString Binding::getRequiredExpression ( ) const

set relevant MIP

Definition at line 349 of file binding.cxx.

References xforms::ComputedExpression::getExpression(), and maRequired.

Referenced by initializePropertySet().

◆ getSomething()

sal_Int64 Binding::getSomething ( const css::uno::Sequence< sal_Int8 > &  xId)
overridevirtual

Definition at line 1168 of file binding.cxx.

References comphelper::getSomethingImpl().

◆ getSupportedValueTypes()

css::uno::Sequence< css::uno::Type > Binding::getSupportedValueTypes ( )
overridevirtual

Definition at line 951 of file binding.cxx.

References xforms::Convert::get(), and xforms::Convert::getTypes().

◆ getType()

OUString xforms::Binding::getType ( ) const
inline

set calculate MIP

Definition at line 194 of file binding.hxx.

References msTypeName.

Referenced by initializePropertySet().

◆ getUnoTunnelId()

css::uno::Sequence< sal_Int8 > Binding::getUnoTunnelId ( )
static

Definition at line 304 of file binding.cxx.

References comphelper::UnoIdInit::getSeq().

◆ getValue()

css::uno::Any Binding::getValue ( const css::uno::Type &  aType)
overridevirtual

◆ getXNodeList()

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().

◆ handleEvent()

void Binding::handleEvent ( const css::uno::Reference< css::xml::dom::events::XEvent > &  xEvent)
overridevirtual

Definition at line 1137 of file binding.cxx.

References bind(), mbValueModified, mnDeferModifyNotifications, sType, and valueModified().

◆ initializePropertySet()

void Binding::initializePropertySet ( )
private

◆ isLive()

bool Binding::isLive ( ) const
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().

◆ isSimpleBinding()

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().

◆ isSimpleBindingExpression()

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().

◆ isUseful()

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().

◆ isValid() [1/2]

bool Binding::isValid ( ) const

◆ isValid() [2/2]

sal_Bool Binding::isValid ( const css::uno::Any &  )
overridevirtual

Definition at line 1095 of file binding.cxx.

References checkLive(), and isValid().

◆ isValid_DataType()

bool Binding::isValid_DataType ( ) const
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().

◆ removeListEntryListener()

void Binding::removeListEntryListener ( const css::uno::Reference< css::form::binding::XListEntryListener > &  xListener)
overridevirtual

Definition at line 1082 of file binding.cxx.

References maListEntryListeners.

◆ removeModifyListener()

void Binding::removeModifyListener ( const css::uno::Reference< css::util::XModifyListener > &  xListener)
overridevirtual

Definition at line 1261 of file binding.cxx.

References maModifyListeners.

◆ removeValidityConstraintListener()

void Binding::removeValidityConstraintListener ( const css::uno::Reference< css::form::validation::XValidityConstraintListener > &  xListener)
overridevirtual

Definition at line 1123 of file binding.cxx.

References maValidityListeners.

◆ setBindingExpression()

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().

◆ setBindingID()

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().

◆ setBindingNamespaces()

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().

◆ setCalculateExpression()

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().

◆ setConstraintExpression()

void Binding::setConstraintExpression ( const OUString &  sConstraint)

◆ setModelNamespaces()

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().

◆ setName()

void SAL_CALL Binding::setName ( const OUString &  rName)
overridevirtual

Definition at line 1276 of file binding.cxx.

References Any, and HANDLE_BindingID.

◆ setReadonlyExpression()

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().

◆ setRelevantExpression()

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().

◆ setRequiredExpression()

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().

◆ setType()

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().

◆ setValue()

void Binding::setValue ( const css::uno::Any &  aValue)
overridevirtual

◆ supportsType()

sal_Bool Binding::supportsType ( const css::uno::Type &  aType)
overridevirtual

Definition at line 956 of file binding.cxx.

References xforms::Convert::get(), and xforms::Convert::hasType().

Referenced by getValue(), and setValue().

◆ update()

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().

◆ valueModified()

void Binding::valueModified ( )
private

Member Data Documentation

◆ maBindingExpression

PathExpression xforms::Binding::maBindingExpression
private

◆ maCalculate

ComputedExpression xforms::Binding::maCalculate
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().

◆ maConstraint

BoolExpression xforms::Binding::maConstraint
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().

◆ maEventNodes

std::vector<css::uno::Reference<css::xml::dom::XNode> > xforms::Binding::maEventNodes
private

nodes on which we are listening for events

Definition at line 139 of file binding.hxx.

Referenced by bind(), and clear().

◆ maListEntryListeners

XListEntryListeners_t xforms::Binding::maListEntryListeners
private

list entry listener

Definition at line 133 of file binding.hxx.

Referenced by addListEntryListener(), isUseful(), removeListEntryListener(), and valueModified().

◆ maMIP

MIP xforms::Binding::maMIP
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().

◆ maModifyListeners

ModifyListeners_t xforms::Binding::maModifyListeners
private

modify listeners

Definition at line 130 of file binding.hxx.

Referenced by addModifyListener(), isUseful(), removeModifyListener(), and valueModified().

◆ maReadonly

BoolExpression xforms::Binding::maReadonly
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().

◆ maRelevant

BoolExpression xforms::Binding::maRelevant
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().

◆ maRequired

BoolExpression xforms::Binding::maRequired
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().

◆ maValidityListeners

XValidityConstraintListeners_t xforms::Binding::maValidityListeners
private

validity listeners;

Definition at line 136 of file binding.hxx.

Referenced by addValidityConstraintListener(), isUseful(), removeValidityConstraintListener(), and valueModified().

◆ mbBindingModified

bool xforms::Binding::mbBindingModified
private

if true, valueModified needs to be called

Definition at line 151 of file binding.hxx.

Referenced by bindingModified(), and deferNotifications().

◆ mbInCalculate

bool xforms::Binding::mbInCalculate
private

flag to detect recursions in calculate

Definition at line 145 of file binding.hxx.

Referenced by bind().

◆ mbValueModified

bool xforms::Binding::mbValueModified
private

Definition at line 150 of file binding.hxx.

Referenced by deferNotifications(), handleEvent(), and valueModified().

◆ mnDeferModifyNotifications

sal_Int32 xforms::Binding::mnDeferModifyNotifications
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().

◆ msBindingID

OUString xforms::Binding::msBindingID
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().

◆ msExplainConstraint

OUString xforms::Binding::msExplainConstraint
private

user-readable explanation of the constraint

Definition at line 118 of file binding.hxx.

Referenced by getLocalMIP(), and setConstraintExpression().

◆ msTypeName

OUString xforms::Binding::msTypeName
private

a type name

Definition at line 127 of file binding.hxx.

Referenced by getLocalMIP(), getType(), isUseful(), and setType().

◆ mxModel

css::uno::Reference<css::xforms::XModel> xforms::Binding::mxModel
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().

◆ mxNamespaces

css::uno::Reference<css::container::XNameContainer> xforms::Binding::mxNamespaces
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().


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