LibreOffice Module svx (master) 1
|
is a helper class which manages form controller functionality (such as moveNext etc.). More...
#include <formcontrolling.hxx>
Public Member Functions | |
FormControllerHelper (const css::uno::Reference< css::form::runtime::XFormController > &_rxController, IControllerFeatureInvalidation *_pInvalidationCallback) | |
constructs the helper from a <type scope="css::form::runtime">XFormController<type> instance More... | |
css::uno::Reference< css::sdbc::XRowSet > | getCursor () const |
void | getState (sal_Int32 _nSlotId, css::form::runtime::FeatureState &_out_rState) const |
bool | isEnabled (sal_Int32 _nSlotId) const |
void | execute (sal_Int32 _nSlotId) const |
void | execute (sal_Int32 _nSlotId, const OUString &_rParamName, const css::uno::Any &_rParamValue) const |
bool | commitCurrentRecord () const |
bool | commitCurrentControl () const |
bool | isInsertionRow () const |
bool | isModifiedRow () const |
bool | canDoFormFilter () const |
void | dispose () |
disposes this instance. More... | |
Private Types | |
enum | FormOperation { EXECUTE , EXECUTE_ARGS , COMMIT_CONTROL , COMMIT_RECORD } |
Private Member Functions | |
virtual | ~FormControllerHelper () override |
dtor More... | |
virtual void SAL_CALL | invalidateFeatures (const css::uno::Sequence< ::sal_Int16 > &Features) override |
virtual void SAL_CALL | invalidateAllFeatures () override |
virtual void SAL_CALL | errorOccured (const css::sdb::SQLErrorEvent &Event) override |
virtual void SAL_CALL | disposing (const css::lang::EventObject &Source) override |
bool | impl_operateForm_nothrow (const FormOperation _eWhat, const sal_Int16 _nFeature, const css::uno::Sequence< css::beans::NamedValue > &_rArguments) const |
bool | impl_operateForm_nothrow (const FormOperation _eWhat) const |
FormControllerHelper (const FormControllerHelper &)=delete | |
FormControllerHelper & | operator= (const FormControllerHelper &)=delete |
Private Attributes | |
IControllerFeatureInvalidation * | m_pInvalidationCallback |
css::uno::Reference< css::form::runtime::XFormOperations > | m_xFormOperations |
css::uno::Any | m_aOperationError |
is a helper class which manages form controller functionality (such as moveNext etc.).
The class helps implementing form controller functionality, by providing methods to determine the state of, and execute, various common form features.
A feature is for instance moving the form associated with the controller to a certain position, or reloading the form, and so on.
Definition at line 131 of file formcontrolling.hxx.
|
private |
Enumerator | |
---|---|
EXECUTE | |
EXECUTE_ARGS | |
COMMIT_CONTROL | |
COMMIT_RECORD |
Definition at line 190 of file formcontrolling.hxx.
svx::FormControllerHelper::FormControllerHelper | ( | const css::uno::Reference< css::form::runtime::XFormController > & | _rxController, |
IControllerFeatureInvalidation * | _pInvalidationCallback | ||
) |
constructs the helper from a <type scope="css::form::runtime">XFormController<type> instance
_rxController | The form controller which the helper should be responsible for. Must not be <NULL>, and must have a valid model (form). |
_pInvalidationCallback | the callback for invalidating feature states |
|
overrideprivatevirtual |
dtor
Definition at line 234 of file formcontrolling.cxx.
References DBG_UNHANDLED_EXCEPTION, dispose(), and Exception.
|
privatedelete |
bool svx::FormControllerHelper::canDoFormFilter | ( | ) | const |
Definition at line 465 of file formcontrolling.cxx.
References DBG_UNHANDLED_EXCEPTION, Exception, FM_PROP_ACTIVECOMMAND, FM_PROP_ESCAPE_PROCESSING, FM_PROP_INSERTONLY, and m_xFormOperations.
bool svx::FormControllerHelper::commitCurrentControl | ( | ) | const |
Definition at line 280 of file formcontrolling.cxx.
References COMMIT_CONTROL, and impl_operateForm_nothrow().
Referenced by FmFormShell::Execute(), and FmFormShell::PrepareClose().
bool svx::FormControllerHelper::commitCurrentRecord | ( | ) | const |
Definition at line 286 of file formcontrolling.cxx.
References COMMIT_RECORD, and impl_operateForm_nothrow().
Referenced by FmFormShell::Execute(), and FmFormShell::PrepareClose().
void svx::FormControllerHelper::dispose | ( | void | ) |
disposes this instance.
After this method has been called, the instance is not functional anymore
Definition at line 248 of file formcontrolling.cxx.
References m_xFormOperations.
Referenced by ~FormControllerHelper().
|
overrideprivatevirtual |
Definition at line 442 of file formcontrolling.cxx.
|
overrideprivatevirtual |
Definition at line 435 of file formcontrolling.cxx.
References m_aOperationError.
void svx::FormControllerHelper::execute | ( | sal_Int32 | _nSlotId | ) | const |
Definition at line 367 of file formcontrolling.cxx.
References EXECUTE, svx::FeatureSlotTranslation::getFormFeatureForSlotId(), and impl_operateForm_nothrow().
Referenced by FmFormShell::Execute().
void svx::FormControllerHelper::execute | ( | sal_Int32 | _nSlotId, |
const OUString & | _rParamName, | ||
const css::uno::Any & | _rParamValue | ||
) | const |
Reference< XRowSet > svx::FormControllerHelper::getCursor | ( | ) | const |
Definition at line 264 of file formcontrolling.cxx.
References m_xFormOperations.
Referenced by FmFormShell::Execute().
void svx::FormControllerHelper::getState | ( | sal_Int32 | _nSlotId, |
css::form::runtime::FeatureState & | _out_rState | ||
) | const |
Definition at line 273 of file formcontrolling.cxx.
References svx::FeatureSlotTranslation::getFormFeatureForSlotId(), and m_xFormOperations.
|
inlineprivate |
Definition at line 197 of file formcontrolling.hxx.
References impl_operateForm_nothrow().
|
private |
Referenced by commitCurrentControl(), commitCurrentRecord(), execute(), and impl_operateForm_nothrow().
|
overrideprivatevirtual |
Definition at line 392 of file formcontrolling.cxx.
References svx::IControllerFeatureInvalidation::invalidateFeatures(), m_pInvalidationCallback, and SAL_N_ELEMENTS.
|
overrideprivatevirtual |
Definition at line 374 of file formcontrolling.cxx.
References svx::IControllerFeatureInvalidation::invalidateFeatures(), and m_pInvalidationCallback.
bool svx::FormControllerHelper::isEnabled | ( | sal_Int32 | _nSlotId | ) | const |
Definition at line 256 of file formcontrolling.cxx.
References svx::FeatureSlotTranslation::getFormFeatureForSlotId(), and m_xFormOperations.
bool svx::FormControllerHelper::isInsertionRow | ( | ) | const |
Definition at line 448 of file formcontrolling.cxx.
References m_xFormOperations.
bool svx::FormControllerHelper::isModifiedRow | ( | ) | const |
Definition at line 457 of file formcontrolling.cxx.
References m_xFormOperations.
Referenced by FmFormShell::PrepareClose().
|
privatedelete |
|
private |
Definition at line 137 of file formcontrolling.hxx.
Referenced by errorOccured().
|
private |
Definition at line 133 of file formcontrolling.hxx.
Referenced by invalidateAllFeatures(), and invalidateFeatures().
|
private |
Definition at line 135 of file formcontrolling.hxx.
Referenced by canDoFormFilter(), dispose(), getCursor(), getState(), isEnabled(), isInsertionRow(), and isModifiedRow().