LibreOffice Module svx (master) 1
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
svx::FormControllerHelper Class Referencefinal

is a helper class which manages form controller functionality (such as moveNext etc.). More...

#include <formcontrolling.hxx>

Inheritance diagram for svx::FormControllerHelper:
[legend]
Collaboration diagram for svx::FormControllerHelper:
[legend]

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
 
FormControllerHelperoperator= (const FormControllerHelper &)=delete
 

Private Attributes

IControllerFeatureInvalidationm_pInvalidationCallback
 
css::uno::Reference< css::form::runtime::XFormOperations > m_xFormOperations
 
css::uno::Any m_aOperationError
 

Detailed Description

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.

Member Enumeration Documentation

◆ FormOperation

Enumerator
EXECUTE 
EXECUTE_ARGS 
COMMIT_CONTROL 
COMMIT_RECORD 

Definition at line 190 of file formcontrolling.hxx.

Constructor & Destructor Documentation

◆ FormControllerHelper() [1/2]

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

Parameters
_rxControllerThe form controller which the helper should be responsible for. Must not be <NULL>, and must have a valid model (form).
_pInvalidationCallbackthe callback for invalidating feature states

◆ ~FormControllerHelper()

svx::FormControllerHelper::~FormControllerHelper ( )
overrideprivatevirtual

dtor

Definition at line 234 of file formcontrolling.cxx.

References DBG_UNHANDLED_EXCEPTION, dispose(), and Exception.

◆ FormControllerHelper() [2/2]

svx::FormControllerHelper::FormControllerHelper ( const FormControllerHelper )
privatedelete

Member Function Documentation

◆ canDoFormFilter()

bool svx::FormControllerHelper::canDoFormFilter ( ) const

◆ commitCurrentControl()

bool svx::FormControllerHelper::commitCurrentControl ( ) const

◆ commitCurrentRecord()

bool svx::FormControllerHelper::commitCurrentRecord ( ) const

◆ dispose()

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

◆ disposing()

void SAL_CALL svx::FormControllerHelper::disposing ( const css::lang::EventObject &  Source)
overrideprivatevirtual

Definition at line 442 of file formcontrolling.cxx.

◆ errorOccured()

void SAL_CALL svx::FormControllerHelper::errorOccured ( const css::sdb::SQLErrorEvent &  Event)
overrideprivatevirtual

Definition at line 435 of file formcontrolling.cxx.

References m_aOperationError.

◆ execute() [1/2]

void svx::FormControllerHelper::execute ( sal_Int32  _nSlotId) const

◆ execute() [2/2]

void svx::FormControllerHelper::execute ( sal_Int32  _nSlotId,
const OUString &  _rParamName,
const css::uno::Any &  _rParamValue 
) const

◆ getCursor()

Reference< XRowSet > svx::FormControllerHelper::getCursor ( ) const

Definition at line 264 of file formcontrolling.cxx.

References m_xFormOperations.

Referenced by FmFormShell::Execute().

◆ getState()

void svx::FormControllerHelper::getState ( sal_Int32  _nSlotId,
css::form::runtime::FeatureState &  _out_rState 
) const

◆ impl_operateForm_nothrow() [1/2]

bool svx::FormControllerHelper::impl_operateForm_nothrow ( const FormOperation  _eWhat) const
inlineprivate

Definition at line 197 of file formcontrolling.hxx.

References impl_operateForm_nothrow().

◆ impl_operateForm_nothrow() [2/2]

bool svx::FormControllerHelper::impl_operateForm_nothrow ( const FormOperation  _eWhat,
const sal_Int16  _nFeature,
const css::uno::Sequence< css::beans::NamedValue > &  _rArguments 
) const
private

◆ invalidateAllFeatures()

void SAL_CALL svx::FormControllerHelper::invalidateAllFeatures ( )
overrideprivatevirtual

◆ invalidateFeatures()

void SAL_CALL svx::FormControllerHelper::invalidateFeatures ( const css::uno::Sequence< ::sal_Int16 > &  Features)
overrideprivatevirtual

◆ isEnabled()

bool svx::FormControllerHelper::isEnabled ( sal_Int32  _nSlotId) const

◆ isInsertionRow()

bool svx::FormControllerHelper::isInsertionRow ( ) const

Definition at line 448 of file formcontrolling.cxx.

References m_xFormOperations.

◆ isModifiedRow()

bool svx::FormControllerHelper::isModifiedRow ( ) const

Definition at line 457 of file formcontrolling.cxx.

References m_xFormOperations.

Referenced by FmFormShell::PrepareClose().

◆ operator=()

FormControllerHelper & svx::FormControllerHelper::operator= ( const FormControllerHelper )
privatedelete

Member Data Documentation

◆ m_aOperationError

css::uno::Any svx::FormControllerHelper::m_aOperationError
private

Definition at line 137 of file formcontrolling.hxx.

Referenced by errorOccured().

◆ m_pInvalidationCallback

IControllerFeatureInvalidation* svx::FormControllerHelper::m_pInvalidationCallback
private

Definition at line 133 of file formcontrolling.hxx.

Referenced by invalidateAllFeatures(), and invalidateFeatures().

◆ m_xFormOperations

css::uno::Reference< css::form::runtime::XFormOperations > svx::FormControllerHelper::m_xFormOperations
private

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