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... | |
Protected 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 |
Protected Attributes | |
IControllerFeatureInvalidation * | m_pInvalidationCallback |
css::uno::Reference< css::form::runtime::XFormOperations > | m_xFormOperations |
css::uno::Any | m_aOperationError |
Private Types | |
enum | FormOperation { EXECUTE, EXECUTE_ARGS, COMMIT_CONTROL, COMMIT_RECORD } |
Private Member Functions | |
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 |
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 192 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 |
|
overrideprotectedvirtual |
dtor
Definition at line 233 of file formcontrolling.cxx.
References DBG_UNHANDLED_EXCEPTION, dispose(), and Exception.
|
privatedelete |
bool svx::FormControllerHelper::canDoFormFilter | ( | ) | const |
Definition at line 463 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 279 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 285 of file formcontrolling.cxx.
References COMMIT_RECORD, and impl_operateForm_nothrow().
Referenced by FmFormShell::Execute(), and FmFormShell::PrepareClose().
disposes this instance.
After this method has been called, the instance is not functional anymore
Definition at line 247 of file formcontrolling.cxx.
References m_xFormOperations.
Referenced by ~FormControllerHelper().
|
overrideprotectedvirtual |
Definition at line 440 of file formcontrolling.cxx.
|
overrideprotectedvirtual |
Definition at line 433 of file formcontrolling.cxx.
References m_aOperationError.
void svx::FormControllerHelper::execute | ( | sal_Int32 | _nSlotId | ) | const |
Definition at line 366 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 263 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 272 of file formcontrolling.cxx.
References svx::FeatureSlotTranslation::getFormFeatureForSlotId(), and m_xFormOperations.
|
private |
Referenced by commitCurrentControl(), commitCurrentRecord(), execute(), and impl_operateForm_nothrow().
|
inlineprivate |
Definition at line 199 of file formcontrolling.hxx.
References impl_operateForm_nothrow().
|
overrideprotectedvirtual |
Definition at line 391 of file formcontrolling.cxx.
References svx::IControllerFeatureInvalidation::invalidateFeatures(), m_pInvalidationCallback, and SAL_N_ELEMENTS.
|
overrideprotectedvirtual |
Definition at line 373 of file formcontrolling.cxx.
References svx::IControllerFeatureInvalidation::invalidateFeatures(), and m_pInvalidationCallback.
bool svx::FormControllerHelper::isEnabled | ( | sal_Int32 | _nSlotId | ) | const |
Definition at line 255 of file formcontrolling.cxx.
References svx::FeatureSlotTranslation::getFormFeatureForSlotId(), and m_xFormOperations.
bool svx::FormControllerHelper::isInsertionRow | ( | ) | const |
Definition at line 446 of file formcontrolling.cxx.
References m_xFormOperations.
bool svx::FormControllerHelper::isModifiedRow | ( | ) | const |
Definition at line 455 of file formcontrolling.cxx.
References m_xFormOperations.
Referenced by FmFormShell::PrepareClose().
|
privatedelete |
|
protected |
Definition at line 138 of file formcontrolling.hxx.
Referenced by errorOccured().
|
protected |
Definition at line 134 of file formcontrolling.hxx.
Referenced by invalidateAllFeatures(), and invalidateFeatures().
|
protected |
Definition at line 136 of file formcontrolling.hxx.
Referenced by canDoFormFilter(), dispose(), getCursor(), getState(), isEnabled(), isInsertionRow(), and isModifiedRow().