LibreOffice Module chart2 (master) 1
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
chart::FeatureCommandDispatchBase Class Referenceabstract

This is a base class for CommandDispatch implementations with feature support. More...

#include <FeatureCommandDispatchBase.hxx>

Inheritance diagram for chart::FeatureCommandDispatchBase:
[legend]
Collaboration diagram for chart::FeatureCommandDispatchBase:
[legend]

Public Member Functions

 FeatureCommandDispatchBase (const css::uno::Reference< css::uno::XComponentContext > &rxContext)
 
virtual ~FeatureCommandDispatchBase () override
 
virtual void initialize () override
 
virtual bool isFeatureSupported (const OUString &rCommandURL)
 
- Public Member Functions inherited from chart::CommandDispatch
 CommandDispatch (const css::uno::Reference< css::uno::XComponentContext > &xContext)
 
virtual ~CommandDispatch () override
 
virtual void initialize ()
 
- Public Member Functions inherited from comphelper::WeakComponentImplHelper< typename... Ifc >
virtual void SAL_CALL acquire () noexcept override
 
virtual void SAL_CALL release () noexcept override
 
virtual void SAL_CALL dispose () noexcept final override
 
virtual void SAL_CALL addEventListener (css::uno::Reference< css::lang::XEventListener > const &rxListener) final override
 
virtual void SAL_CALL removeEventListener (css::uno::Reference< css::lang::XEventListener > const &rxListener) final override
 
virtual css::uno::Any SAL_CALL queryInterface (css::uno::Type const &rType) override
 
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes () override
 
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId () override
 
- Public Member Functions inherited from comphelper::WeakComponentImplHelperBase
virtual ~WeakComponentImplHelperBase () override
 
virtual void SAL_CALL dispose () override
 
virtual void SAL_CALL addEventListener (css::uno::Reference< css::lang::XEventListener > const &rxListener) override
 
virtual void SAL_CALL removeEventListener (css::uno::Reference< css::lang::XEventListener > const &rxListener) override
 
virtual css::uno::Any SAL_CALL queryInterface (css::uno::Type const &rType) override
 
virtual void disposing (std::unique_lock< std::mutex > &)
 
- Public Member Functions inherited from comphelper::UnoImplBase
virtual ~UnoImplBase ()
 

Protected Member Functions

virtual void SAL_CALL dispatch (const css::util::URL &URL, const css::uno::Sequence< css::beans::PropertyValue > &Arguments) override
 
virtual void fireStatusEvent (const OUString &rURL, const css::uno::Reference< css::frame::XStatusListener > &xSingleListener) override
 sends a status event for a specific command to all registered listeners or only the one given when set. More...
 
virtual FeatureState getState (const OUString &rCommand)=0
 
virtual void execute (const OUString &rCommand, const css::uno::Sequence< css::beans::PropertyValue > &rArgs)=0
 
virtual void describeSupportedFeatures ()=0
 
void implDescribeSupportedFeature (const char *pAsciiCommandURL, ChartCommandID nId, sal_Int16 nGroup)
 describes a feature supported by the controller More...
 
- Protected Member Functions inherited from chart::CommandDispatch
virtual void fireStatusEvent (const OUString &rURL, const css::uno::Reference< css::frame::XStatusListener > &xSingleListener)=0
 sends a status event for a specific command to all registered listeners or only the one given when set. More...
 
void fireAllStatusEvents (const css::uno::Reference< css::frame::XStatusListener > &xSingleListener)
 calls fireStatusEvent( OUString, xSingleListener ) More...
 
void fireStatusEventForURL (const OUString &rURL, const css::uno::Any &rState, bool bEnabled, const css::uno::Reference< css::frame::XStatusListener > &xSingleListener)
 sends a status event for a specific command to all registered listeners or only the one given when set. More...
 
virtual void SAL_CALL dispatch (const css::util::URL &URL, const css::uno::Sequence< css::beans::PropertyValue > &Arguments) override
 
virtual void SAL_CALL addStatusListener (const css::uno::Reference< css::frame::XStatusListener > &Control, const css::util::URL &URL) override
 
virtual void SAL_CALL removeStatusListener (const css::uno::Reference< css::frame::XStatusListener > &Control, const css::util::URL &URL) override
 
virtual void disposing (std::unique_lock< std::mutex > &rGuard) override
 is called when this is disposed More...
 
virtual void SAL_CALL modified (const css::lang::EventObject &aEvent) override
 
virtual void SAL_CALL disposing (const css::lang::EventObject &Source) override
 
- Protected Member Functions inherited from comphelper::WeakComponentImplHelperBase
void throwIfDisposed (std::unique_lock< std::mutex > &)
 

Protected Attributes

SupportedFeatures m_aSupportedFeatures
 
ChartCommandID m_nFeatureId
 
- Protected Attributes inherited from comphelper::WeakComponentImplHelperBase
comphelper::OInterfaceContainerHelper4< css::lang::XEventListener > maEventListeners
 
- Protected Attributes inherited from comphelper::UnoImplBase
std::mutex m_aMutex
 
bool m_bDisposed
 

Detailed Description

This is a base class for CommandDispatch implementations with feature support.

Definition at line 84 of file FeatureCommandDispatchBase.hxx.

Constructor & Destructor Documentation

◆ FeatureCommandDispatchBase()

chart::FeatureCommandDispatchBase::FeatureCommandDispatchBase ( const css::uno::Reference< css::uno::XComponentContext > &  rxContext)
explicit

Definition at line 30 of file FeatureCommandDispatchBase.cxx.

References NONE.

◆ ~FeatureCommandDispatchBase()

chart::FeatureCommandDispatchBase::~FeatureCommandDispatchBase ( )
overridevirtual

Definition at line 36 of file FeatureCommandDispatchBase.cxx.

Member Function Documentation

◆ describeSupportedFeatures()

virtual void chart::FeatureCommandDispatchBase::describeSupportedFeatures ( )
protectedpure virtual

Implemented in chart::DrawCommandDispatch, and chart::ShapeController.

Referenced by initialize().

◆ dispatch()

void chart::FeatureCommandDispatchBase::dispatch ( const css::util::URL &  URL,
const css::uno::Sequence< css::beans::PropertyValue > &  Arguments 
)
overrideprotectedvirtual

Reimplemented from chart::CommandDispatch.

Definition at line 71 of file FeatureCommandDispatchBase.cxx.

References aCommand, execute(), getState(), and URL.

◆ execute()

virtual void chart::FeatureCommandDispatchBase::execute ( const OUString &  rCommand,
const css::uno::Sequence< css::beans::PropertyValue > &  rArgs 
)
protectedpure virtual

Implemented in chart::DrawCommandDispatch, and chart::ShapeController.

Referenced by dispatch().

◆ fireStatusEvent()

void chart::FeatureCommandDispatchBase::fireStatusEvent ( const OUString &  rURL,
const css::uno::Reference< css::frame::XStatusListener > &  xSingleListener 
)
overrideprotectedvirtual

sends a status event for a specific command to all registered listeners or only the one given when set.

This method should be overridden. The implementation should call fireStatusEventForURL and pass the xSingleListener argument to this method unchanged.

Parameters
rURLIf empty, all available status events must be fired, otherwise only the one for the given command.
xSingleListenerIf set, the event is only sent to this listener rather than to all registered ones. Whenever a listener adds itself, this method is called with this parameter set to give an initial state.

Implements chart::CommandDispatch.

Definition at line 52 of file FeatureCommandDispatchBase.cxx.

References chart::FeatureState::aState, chart::FeatureState::bEnabled, chart::CommandDispatch::fireStatusEventForURL(), getState(), and m_aSupportedFeatures.

◆ getState()

virtual FeatureState chart::FeatureCommandDispatchBase::getState ( const OUString &  rCommand)
protectedpure virtual

◆ implDescribeSupportedFeature()

void chart::FeatureCommandDispatchBase::implDescribeSupportedFeature ( const char *  pAsciiCommandURL,
ChartCommandID  nId,
sal_Int16  nGroup 
)
protected

describes a feature supported by the controller

Must not be called outside <member>describeSupportedFeatures</member>.

Parameters
pAsciiCommandURLthe URL of the feature command
nIdthe id of the feature. Later references to this feature usually happen by id, not by URL.
nGroupthe command group of the feature. This is important for configuring the controller UI by the user, see also <type scope="css::frame">CommandGroup</type>.

Definition at line 81 of file FeatureCommandDispatchBase.cxx.

References m_aSupportedFeatures, chart::ControllerFeature::nFeatureId, and nId.

Referenced by chart::DrawCommandDispatch::describeSupportedFeatures(), and chart::ShapeController::describeSupportedFeatures().

◆ initialize()

void chart::FeatureCommandDispatchBase::initialize ( )
overridevirtual

◆ isFeatureSupported()

bool chart::FeatureCommandDispatchBase::isFeatureSupported ( const OUString &  rCommandURL)
virtual

Member Data Documentation

◆ m_aSupportedFeatures

SupportedFeatures chart::FeatureCommandDispatchBase::m_aSupportedFeatures
mutableprotected

◆ m_nFeatureId

ChartCommandID chart::FeatureCommandDispatchBase::m_nFeatureId
protected

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