LibreOffice Module forms (master) 1
Classes | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
frm::OFormNavigationHelper Class Referenceabstract

#include <formnavigation.hxx>

Inheritance diagram for frm::OFormNavigationHelper:
[legend]
Collaboration diagram for frm::OFormNavigationHelper:
[legend]

Classes

struct  FeatureInfo
 

Protected Member Functions

 OFormNavigationHelper (const css::uno::Reference< css::uno::XComponentContext > &_rxORB)
 
virtual ~OFormNavigationHelper ()
 
void dispose ()
 
virtual void SAL_CALL registerDispatchProviderInterceptor (const css::uno::Reference< css::frame::XDispatchProviderInterceptor > &Interceptor) override
 
virtual void SAL_CALL releaseDispatchProviderInterceptor (const css::uno::Reference< css::frame::XDispatchProviderInterceptor > &Interceptor) override
 
virtual void SAL_CALL statusChanged (const css::frame::FeatureStateEvent &State) override
 
virtual void SAL_CALL disposing (const css::lang::EventObject &Source) override
 
virtual void dispatch (sal_Int16 _nFeatureId) const override
 dispatches a feature More...
 
virtual void dispatchWithArgument (sal_Int16 _nFeatureId, const char *_pParamName, const css::uno::Any &_rParamValue) const override
 dispatches a feature, with an additional named parameter More...
 
virtual bool isEnabled (sal_Int16 _nFeatureId) const override
 checks whether a given feature is enabled More...
 
virtual bool getBooleanState (sal_Int16 _nFeatureId) const override
 returns the boolean state of a feature More...
 
virtual OUString getStringState (sal_Int16 _nFeatureId) const override
 returns the string state of a feature More...
 
virtual sal_Int32 getIntegerState (sal_Int16 _nFeatureId) const override
 returns the integer state of a feature More...
 
virtual void interceptorsChanged ()
 is called when the interceptors have. More...
 
virtual void featureStateChanged (sal_Int16 _nFeatureId, bool _bEnabled)
 called when the status of a feature changed More...
 
virtual void allFeatureStatesChanged ()
 notification for (potential) changes in the state of all features More...
 
virtual void getSupportedFeatures (::std::vector< sal_Int16 > &_rFeatureIds)=0
 retrieves the list of supported features More...
 
void updateDispatches ()
 update all our dispatches which are controlled by our dispatch interceptors More...
 
void connectDispatchers ()
 connect to the dispatch interceptors More...
 
void disconnectDispatchers ()
 disconnect from the dispatch interceptors More...
 
css::uno::Reference< css::frame::XDispatch > queryDispatch (const css::util::URL &_rURL)
 queries the interceptor chain for a dispatcher for the given URL More...
 
void invalidateSupportedFeaturesSet ()
 invalidates the set of supported features More...
 
- Protected Member Functions inherited from cppu::ImplHelper2< class Ifc1, class Ifc2 >
 ~ImplHelper2 () SAL_NOEXCEPT
 
- Protected Member Functions inherited from frm::IFeatureDispatcher
 ~IFeatureDispatcher ()
 

Private Types

typedef ::std::map< sal_Int16, FeatureInfoFeatureMap
 

Private Member Functions

void initializeSupportedFeatures ()
 initialize m_aSupportedFeatures, if necessary More...
 

Private Attributes

css::uno::Reference< css::uno::XComponentContext > m_xORB
 
ControlFeatureInterception m_aFeatureInterception
 
FeatureMap m_aSupportedFeatures
 
sal_Int32 m_nConnectedFeatures
 

Additional Inherited Members

- Public Member Functions inherited from cppu::ImplHelper2< class Ifc1, class Ifc2 >
virtual css::uno::Any SAL_CALL queryInterface (css::uno::Type const &rType) SAL_OVERRIDE
 
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes () SAL_OVERRIDE
 
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId () SAL_OVERRIDE
 
virtual void dispatch (sal_Int16 _nFeatureId) const =0
 dispatches a feature More...
 
virtual void dispatchWithArgument (sal_Int16 _nFeatureId, const char *_pParamName, const css::uno::Any &_rParamValue) const =0
 dispatches a feature, with an additional named parameter More...
 
virtual bool isEnabled (sal_Int16 _nFeatureId) const =0
 checks whether a given feature is enabled More...
 
virtual bool getBooleanState (sal_Int16 _nFeatureId) const =0
 returns the boolean state of a feature More...
 
virtual OUString getStringState (sal_Int16 _nFeatureId) const =0
 returns the string state of a feature More...
 
virtual sal_Int32 getIntegerState (sal_Int16 _nFeatureId) const =0
 returns the integer state of a feature More...
 

Detailed Description

Definition at line 46 of file formnavigation.hxx.

Member Typedef Documentation

◆ FeatureMap

Definition at line 60 of file formnavigation.hxx.

Constructor & Destructor Documentation

◆ OFormNavigationHelper()

frm::OFormNavigationHelper::OFormNavigationHelper ( const css::uno::Reference< css::uno::XComponentContext > &  _rxORB)
protected

Definition at line 44 of file formnavigation.cxx.

◆ ~OFormNavigationHelper()

frm::OFormNavigationHelper::~OFormNavigationHelper ( )
protectedvirtual

Definition at line 52 of file formnavigation.cxx.

Member Function Documentation

◆ allFeatureStatesChanged()

void frm::OFormNavigationHelper::allFeatureStatesChanged ( )
protectedvirtual

notification for (potential) changes in the state of all features

The base class implementation does nothing. Derived classes could force their peer to update it's state, depending on the result of calls to <member>IFeatureDispatcher::isEnabled</member>.

Reimplemented in frm::OButtonControl, and frm::ONavigationBarPeer.

Definition at line 76 of file formnavigation.cxx.

Referenced by frm::ONavigationBarPeer::allFeatureStatesChanged(), connectDispatchers(), disconnectDispatchers(), and updateDispatches().

◆ connectDispatchers()

void frm::OFormNavigationHelper::connectDispatchers ( )
protected

◆ disconnectDispatchers()

void frm::OFormNavigationHelper::disconnectDispatchers ( )
protected

disconnect from the dispatch interceptors

Definition at line 215 of file formnavigation.cxx.

References allFeatureStatesChanged(), m_aSupportedFeatures, and m_nConnectedFeatures.

Referenced by dispose(), invalidateSupportedFeaturesSet(), and frm::ONavigationBarPeer::setDesignMode().

◆ dispatch()

void frm::OFormNavigationHelper::dispatch ( sal_Int16  _nFeatureId) const
overrideprotectedvirtual

dispatches a feature

Parameters
_nFeatureIdthe id of the feature to dispatch

Implements frm::IFeatureDispatcher.

Definition at line 286 of file formnavigation.cxx.

References m_aSupportedFeatures.

Referenced by frm::OButtonControl::actionPerformed_Impl().

◆ dispatchWithArgument()

void frm::OFormNavigationHelper::dispatchWithArgument ( sal_Int16  _nFeatureId,
const char *  _pParamName,
const css::uno::Any &  _rParamValue 
) const
overrideprotectedvirtual

dispatches a feature, with an additional named parameter

Parameters
_nFeatureIdthe id of the feature to dispatch
_pParamAsciiNamethe Ascii name of the parameter of the dispatch call
_rParamValuethe value of the parameter of the dispatch call

Implements frm::IFeatureDispatcher.

Definition at line 269 of file formnavigation.cxx.

References m_aSupportedFeatures, and comphelper::makePropertyValue().

◆ dispose()

void frm::OFormNavigationHelper::dispose ( void  )
protected

◆ disposing()

void SAL_CALL frm::OFormNavigationHelper::disposing ( const css::lang::EventObject &  Source)
overrideprotectedvirtual

◆ featureStateChanged()

void frm::OFormNavigationHelper::featureStateChanged ( sal_Int16  _nFeatureId,
bool  _bEnabled 
)
protectedvirtual

called when the status of a feature changed

The default implementation does nothing.

If the feature in question does support more state information that just the enabled/disabled state, then this additional information is to be retrieved in a separate call.

Parameters
_nFeatureIdthe id of the feature
_bEnableddetermines if the features is enabled or disabled
See also
getBooleanState

Reimplemented in frm::OButtonControl, and frm::ONavigationBarPeer.

Definition at line 70 of file formnavigation.cxx.

Referenced by disposing(), frm::ONavigationBarPeer::featureStateChanged(), and statusChanged().

◆ getBooleanState()

bool frm::OFormNavigationHelper::getBooleanState ( sal_Int16  _nFeatureId) const
overrideprotectedvirtual

returns the boolean state of a feature

Certain features may support more status information than only the enabled/disabled state. The type of such additional information is fixed relative to a given feature, but may differ between different features.

This method allows retrieving status information about features which have an additional boolean information associated with it.

Implements frm::IFeatureDispatcher.

Definition at line 310 of file formnavigation.cxx.

References m_aSupportedFeatures.

Referenced by frm::ONavigationBarPeer::featureStateChanged().

◆ getIntegerState()

sal_Int32 frm::OFormNavigationHelper::getIntegerState ( sal_Int16  _nFeatureId) const
overrideprotectedvirtual

returns the integer state of a feature

Certain features may support more status information than only the enabled/disabled state. The type of such additional information is fixed relative to a given feature, but may differ between different features.

This method allows retrieving status information about features which have an additional integer information associated with it.

Implements frm::IFeatureDispatcher.

Definition at line 334 of file formnavigation.cxx.

References m_aSupportedFeatures, and nState.

Referenced by frm::ONavigationBarPeer::featureStateChanged().

◆ getStringState()

OUString frm::OFormNavigationHelper::getStringState ( sal_Int16  _nFeatureId) const
overrideprotectedvirtual

returns the string state of a feature

Certain features may support more status information than only the enabled/disabled state. The type of such additional information is fixed relative to a given feature, but may differ between different features.

This method allows retrieving status information about features which have an additional string information associated with it.

Implements frm::IFeatureDispatcher.

Definition at line 322 of file formnavigation.cxx.

References m_aSupportedFeatures.

Referenced by frm::ONavigationBarPeer::featureStateChanged().

◆ getSupportedFeatures()

virtual void frm::OFormNavigationHelper::getSupportedFeatures ( ::std::vector< sal_Int16 > &  _rFeatureIds)
protectedpure virtual

retrieves the list of supported features

To be overridden by derived classes

Parameters
_rFeatureIdsthe array of features to support. Out parameter to fill by the derivee's implementation

Implemented in frm::OButtonControl, and frm::ONavigationBarPeer.

Referenced by initializeSupportedFeatures().

◆ initializeSupportedFeatures()

void frm::OFormNavigationHelper::initializeSupportedFeatures ( )
private

◆ interceptorsChanged()

void frm::OFormNavigationHelper::interceptorsChanged ( )
protectedvirtual

is called when the interceptors have.

The default implementations simply calls <member>updateDispatches</member>, derived classes can prevent this in certain cases, or do additional handling.

Reimplemented in frm::ONavigationBarPeer.

Definition at line 64 of file formnavigation.cxx.

References updateDispatches().

Referenced by frm::ONavigationBarPeer::interceptorsChanged(), registerDispatchProviderInterceptor(), and releaseDispatchProviderInterceptor().

◆ invalidateSupportedFeaturesSet()

void frm::OFormNavigationHelper::invalidateSupportedFeaturesSet ( )
protected

invalidates the set of supported features

This will invalidate all structures which are tied to the set of supported features. All dispatches will be disconnected.
No automatic re-connection to potential external dispatchers is done, instead, you have to call updateDispatches explicitly, if necessary.

Definition at line 346 of file formnavigation.cxx.

References disconnectDispatchers(), and m_aSupportedFeatures.

◆ isEnabled()

bool frm::OFormNavigationHelper::isEnabled ( sal_Int16  _nFeatureId) const
overrideprotectedvirtual

checks whether a given feature is enabled

Implements frm::IFeatureDispatcher.

Reimplemented in frm::OButtonControl, and frm::ONavigationBarPeer.

Definition at line 300 of file formnavigation.cxx.

References m_aSupportedFeatures.

Referenced by frm::ONavigationBarPeer::isEnabled().

◆ queryDispatch()

Reference< XDispatch > frm::OFormNavigationHelper::queryDispatch ( const css::util::URL &  _rURL)
protected

queries the interceptor chain for a dispatcher for the given URL

Definition at line 263 of file formnavigation.cxx.

References m_aFeatureInterception, and frm::ControlFeatureInterception::queryDispatch().

Referenced by connectDispatchers(), and updateDispatches().

◆ registerDispatchProviderInterceptor()

void SAL_CALL frm::OFormNavigationHelper::registerDispatchProviderInterceptor ( const css::uno::Reference< css::frame::XDispatchProviderInterceptor > &  Interceptor)
overrideprotectedvirtual

◆ releaseDispatchProviderInterceptor()

void SAL_CALL frm::OFormNavigationHelper::releaseDispatchProviderInterceptor ( const css::uno::Reference< css::frame::XDispatchProviderInterceptor > &  Interceptor)
overrideprotectedvirtual

◆ statusChanged()

void SAL_CALL frm::OFormNavigationHelper::statusChanged ( const css::frame::FeatureStateEvent &  State)
overrideprotectedvirtual

Definition at line 96 of file formnavigation.cxx.

References featureStateChanged(), and m_aSupportedFeatures.

◆ updateDispatches()

void frm::OFormNavigationHelper::updateDispatches ( )
protected

update all our dispatches which are controlled by our dispatch interceptors

Definition at line 144 of file formnavigation.cxx.

References allFeatureStatesChanged(), connectDispatchers(), initializeSupportedFeatures(), m_aSupportedFeatures, m_nConnectedFeatures, and queryDispatch().

Referenced by connectDispatchers(), and interceptorsChanged().

Member Data Documentation

◆ m_aFeatureInterception

ControlFeatureInterception frm::OFormNavigationHelper::m_aFeatureInterception
private

◆ m_aSupportedFeatures

FeatureMap frm::OFormNavigationHelper::m_aSupportedFeatures
private

◆ m_nConnectedFeatures

sal_Int32 frm::OFormNavigationHelper::m_nConnectedFeatures
private

◆ m_xORB

css::uno::Reference< css::uno::XComponentContext > frm::OFormNavigationHelper::m_xORB
private

Definition at line 64 of file formnavigation.hxx.

Referenced by initializeSupportedFeatures().


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