LibreOffice Module extensions (master) 1
Public Member Functions | Static Public Member Functions | List of all members
pcr::SubmissionHelper Class Reference

#include <submissionhandler.hxx>

Inheritance diagram for pcr::SubmissionHelper:
[legend]
Collaboration diagram for pcr::SubmissionHelper:
[legend]

Public Member Functions

 SubmissionHelper (osl::Mutex &_rMutex, const css::uno::Reference< css::beans::XPropertySet > &_rxIntrospectee, const css::uno::Reference< css::frame::XModel > &_rxContextDocument)
 
- Public Member Functions inherited from pcr::EFormsHelper
 EFormsHelper (::osl::Mutex &_rMutex, const css::uno::Reference< css::beans::XPropertySet > &_rxControlModel, const css::uno::Reference< css::frame::XModel > &_rxContextDocument)
 
void registerBindingListener (const css::uno::Reference< css::beans::XPropertyChangeListener > &_rxBindingListener)
 registers a listener to be notified when any aspect of the binding changes. More...
 
void revokeBindingListener (const css::uno::Reference< css::beans::XPropertyChangeListener > &_rxBindingListener)
 revokes the binding listener which has previously been registered More...
 
bool canBindToDataType (sal_Int32 _nDataType=-1) const
 checks whether it's possible to bind the control model to a given XSD data type More...
 
bool canBindToAnyDataType () const
 checks whether the control model can be bound to any XSD data type More...
 
bool isListEntrySink () const
 checks whether the control model is a source for list entries, as supplied by XML data bindings More...
 
void getFormModelNames (std::vector< OUString > &_rModelNames) const
 retrieves the names of all XForms models in the document the control lives in More...
 
void getBindingNames (const OUString &_rModelName, std::vector< OUString > &_rBindingNames) const
 retrieves the names of all bindings for a given model More...
 
css::uno::Reference< css::xforms::XModel > getFormModelByName (const OUString &_rModelName) const
 retrieves the XForms model (within the control model's document) with the given name More...
 
css::uno::Reference< css::xforms::XModel > getCurrentFormModel () const
 retrieves the model which the active binding of the control model belongs to More...
 
OUString getCurrentFormModelName () const
 retrieves the name of the model which the active binding of the control model belongs to More...
 
css::uno::Reference< css::beans::XPropertySetgetCurrentBinding () const
 retrieves the binding instance which is currently attached to the control model More...
 
OUString getCurrentBindingName () const
 retrieves the name of the binding instance which is currently attached to the control model More...
 
void setBinding (const css::uno::Reference< css::beans::XPropertySet > &_rxBinding)
 sets a new binding at the control model More...
 
css::uno::Reference< css::form::binding::XListEntrySource > getCurrentListSourceBinding () const
 retrieves the binding instance which is currently used as list source for the control model More...
 
void setListSourceBinding (const css::uno::Reference< css::form::binding::XListEntrySource > &_rxListSource)
 sets a new list source at the control model More...
 
css::uno::Reference< css::beans::XPropertySetgetOrCreateBindingForModel (const OUString &_rTargetModel, const OUString &_rBindingName) const
 retrieves a given binding for a given model, or creates a new one More...
 
css::uno::Reference< css::beans::XPropertySetgetModelElementFromUIName (const ModelElementType _eType, const OUString &_rUIName) const
 retrieves the submission object for an UI name More...
 
void getAllElementUINames (const ModelElementType _eType, std::vector< OUString > &_rElementNames, bool _bPrepentEmptyEntry)
 retrieves the UI names of all elements of all models in our document More...
 

Static Public Member Functions

static bool canTriggerSubmissions (const css::uno::Reference< css::beans::XPropertySet > &_rxControlModel, const css::uno::Reference< css::frame::XModel > &_rxContextDocument)
 determines whether the given control model is able to trigger submissions More...
 
- Static Public Member Functions inherited from pcr::EFormsHelper
static bool isEForm (const css::uno::Reference< css::frame::XModel > &_rxContextDocument)
 determines whether the given document is an eForm More...
 
static OUString getModelElementUIName (const ModelElementType _eType, const css::uno::Reference< css::beans::XPropertySet > &_rxElement)
 retrieves the name of a model's sub-element, as to be shown in the UI More...
 

Additional Inherited Members

- Public Types inherited from pcr::EFormsHelper
enum  ModelElementType {
  Submission ,
  Binding
}
 types of sub-elements of a model More...
 
- Protected Member Functions inherited from pcr::EFormsHelper
void firePropertyChanges (const css::uno::Reference< css::beans::XPropertySet > &_rxOldProps, const css::uno::Reference< css::beans::XPropertySet > &_rxNewProps, std::set< OUString > &_rFilter) const
 
void firePropertyChange (const OUString &_rName, const css::uno::Any &_rOldValue, const css::uno::Any &_rNewValue) const
 fires a change in a single property, if the property value changed, and if we have a listener interested in property changes More...
 
- Protected Attributes inherited from pcr::EFormsHelper
css::uno::Reference< css::beans::XPropertySetm_xControlModel
 
css::uno::Reference< css::form::binding::XBindableValue > m_xBindableControl
 
css::uno::Reference< css::xforms::XFormsSupplier > m_xDocument
 
PropertyChangeListeners m_aPropertyListeners
 
MapStringToPropertySet m_aSubmissionUINames
 
MapStringToPropertySet m_aBindingUINames
 

Detailed Description

Definition at line 41 of file submissionhandler.hxx.

Constructor & Destructor Documentation

◆ SubmissionHelper()

pcr::SubmissionHelper::SubmissionHelper ( osl::Mutex &  _rMutex,
const css::uno::Reference< css::beans::XPropertySet > &  _rxIntrospectee,
const css::uno::Reference< css::frame::XModel > &  _rxContextDocument 
)

Definition at line 54 of file submissionhandler.cxx.

References canTriggerSubmissions().

Member Function Documentation

◆ canTriggerSubmissions()

bool pcr::SubmissionHelper::canTriggerSubmissions ( const css::uno::Reference< css::beans::XPropertySet > &  _rxControlModel,
const css::uno::Reference< css::frame::XModel > &  _rxContextDocument 
)
static

determines whether the given control model is able to trigger submissions

Instances of the <type>SubmissionHelper</type> class should not be instantiated for components where this method returned <FALSE>

Definition at line 62 of file submissionhandler.cxx.

References Exception, pcr::EFormsHelper::isEForm(), and TOOLS_WARN_EXCEPTION.

Referenced by pcr::SubmissionPropertyHandler::onNewComponent(), and SubmissionHelper().


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