LibreOffice Module chart2 (master) 1
Public Member Functions | Static Public Member Functions | Private Types | Private Attributes | List of all members
chart::CommandDispatchContainer Class Reference

@HTML More...

#include <CommandDispatchContainer.hxx>

Collaboration diagram for chart::CommandDispatchContainer:
[legend]

Public Member Functions

 CommandDispatchContainer (const css::uno::Reference< css::uno::XComponentContext > &xContext)
 
void setModel (const rtl::Reference<::chart::ChartModel > &xModel)
 
void setChartDispatch (const css::uno::Reference< css::frame::XDispatch > &rChartDispatch, o3tl::sorted_vector< OUString > &&rChartCommands)
 Set a chart dispatcher that is used for all commands contained in rChartCommands. More...
 
css::uno::Reference< css::frame::XDispatch > getDispatchForURL (const css::util::URL &rURL)
 Returns the dispatch that is able to do the command given in rURL, if implemented here. More...
 
css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > getDispatchesForURLs (const css::uno::Sequence< css::frame::DispatchDescriptor > &aDescriptors)
 
void DisposeAndClear ()
 
const css::uno::Reference< css::frame::XDispatch > & getChartDispatcher () const
 
void setDrawCommandDispatch (DrawCommandDispatch *pDispatch)
 
DrawCommandDispatchgetDrawCommandDispatch ()
 
void setShapeController (ShapeController *pController)
 
ShapeControllergetShapeController ()
 

Static Public Member Functions

static css::uno::Reference< css::frame::XDispatch > getContainerDispatchForURL (const css::uno::Reference< css::frame::XController > &xChartController, const css::util::URL &rURL)
 

Private Types

typedef std::map< OUString, css::uno::Reference< css::frame::XDispatch > > tDispatchMap
 
typedef std::vector< css::uno::Reference< css::frame::XDispatch > > tDisposeVector
 

Private Attributes

tDispatchMap m_aCachedDispatches
 
tDisposeVector m_aToBeDisposedDispatches
 
css::uno::Reference< css::uno::XComponentContext > m_xContext
 
unotools::WeakReference< ::chart::ChartModel > m_xModel
 
css::uno::Reference< css::frame::XDispatch > m_xChartDispatcher
 
o3tl::sorted_vector< OUString > m_aChartCommands
 
DrawCommandDispatchm_pDrawCommandDispatch
 
ShapeControllerm_pShapeController
 

Detailed Description

@HTML

Helper class for implementing the XDispatchProvider interface of the ChartController. This class handles all commands to queryDispatch and queryDispatches in the following way:

The XDispatchProvider is designed to return different XDispatch implementations for each command. This class here decides which implementation to use for which command.

As most commands need much information of the controller and are implemented there, the controller handles most of the commands itself (it also implements XDispatch). Therefore it is set here as chart dispatch.

Definition at line 66 of file CommandDispatchContainer.hxx.

Member Typedef Documentation

◆ tDispatchMap

typedef std::map< OUString, css::uno::Reference< css::frame::XDispatch > > chart::CommandDispatchContainer::tDispatchMap
private

Definition at line 116 of file CommandDispatchContainer.hxx.

◆ tDisposeVector

typedef std::vector< css::uno::Reference< css::frame::XDispatch > > chart::CommandDispatchContainer::tDisposeVector
private

Definition at line 119 of file CommandDispatchContainer.hxx.

Constructor & Destructor Documentation

◆ CommandDispatchContainer()

chart::CommandDispatchContainer::CommandDispatchContainer ( const css::uno::Reference< css::uno::XComponentContext > &  xContext)
explicit

Definition at line 43 of file CommandDispatchContainer.cxx.

Member Function Documentation

◆ DisposeAndClear()

void chart::CommandDispatchContainer::DisposeAndClear ( )

◆ getChartDispatcher()

const css::uno::Reference< css::frame::XDispatch > & chart::CommandDispatchContainer::getChartDispatcher ( ) const
inline

Definition at line 105 of file CommandDispatchContainer.hxx.

References m_xChartDispatcher.

Referenced by chart::ChartController::execute_Command().

◆ getContainerDispatchForURL()

Reference< frame::XDispatch > chart::CommandDispatchContainer::getContainerDispatchForURL ( const css::uno::Reference< css::frame::XController > &  xChartController,
const css::util::URL &  rURL 
)
static

Definition at line 169 of file CommandDispatchContainer.cxx.

References xFrame.

Referenced by getDispatchForURL().

◆ getDispatchesForURLs()

Sequence< Reference< frame::XDispatch > > chart::CommandDispatchContainer::getDispatchesForURLs ( const css::uno::Sequence< css::frame::DispatchDescriptor > &  aDescriptors)

Definition at line 143 of file CommandDispatchContainer.cxx.

References getDispatchForURL(), nCount, and nPos.

Referenced by chart::ChartController::queryDispatches().

◆ getDispatchForURL()

Reference< frame::XDispatch > chart::CommandDispatchContainer::getDispatchForURL ( const css::util::URL &  rURL)

◆ getDrawCommandDispatch()

DrawCommandDispatch * chart::CommandDispatchContainer::getDrawCommandDispatch ( )
inline

◆ getShapeController()

ShapeController * chart::CommandDispatchContainer::getShapeController ( )
inline

◆ setChartDispatch()

void chart::CommandDispatchContainer::setChartDispatch ( const css::uno::Reference< css::frame::XDispatch > &  rChartDispatch,
o3tl::sorted_vector< OUString > &&  rChartCommands 
)

Set a chart dispatcher that is used for all commands contained in rChartCommands.

Definition at line 61 of file CommandDispatchContainer.cxx.

References m_aChartCommands, m_aToBeDisposedDispatches, and m_xChartDispatcher.

Referenced by chart::ChartController::attachModel().

◆ setDrawCommandDispatch()

void chart::CommandDispatchContainer::setDrawCommandDispatch ( DrawCommandDispatch pDispatch)

◆ setModel()

void chart::CommandDispatchContainer::setModel ( const rtl::Reference<::chart::ChartModel > &  xModel)

◆ setShapeController()

void chart::CommandDispatchContainer::setShapeController ( ShapeController pController)

Member Data Documentation

◆ m_aCachedDispatches

tDispatchMap chart::CommandDispatchContainer::m_aCachedDispatches
mutableprivate

Definition at line 121 of file CommandDispatchContainer.hxx.

Referenced by DisposeAndClear(), getDispatchForURL(), and setModel().

◆ m_aChartCommands

o3tl::sorted_vector< OUString > chart::CommandDispatchContainer::m_aChartCommands
private

◆ m_aToBeDisposedDispatches

tDisposeVector chart::CommandDispatchContainer::m_aToBeDisposedDispatches
mutableprivate

◆ m_pDrawCommandDispatch

DrawCommandDispatch* chart::CommandDispatchContainer::m_pDrawCommandDispatch
private

◆ m_pShapeController

ShapeController* chart::CommandDispatchContainer::m_pShapeController
private

◆ m_xChartDispatcher

css::uno::Reference< css::frame::XDispatch > chart::CommandDispatchContainer::m_xChartDispatcher
private

◆ m_xContext

css::uno::Reference< css::uno::XComponentContext > chart::CommandDispatchContainer::m_xContext
private

Definition at line 124 of file CommandDispatchContainer.hxx.

Referenced by getDispatchForURL().

◆ m_xModel

unotools::WeakReference< ::chart::ChartModel > chart::CommandDispatchContainer::m_xModel
private

Definition at line 125 of file CommandDispatchContainer.hxx.

Referenced by getDispatchForURL(), and setModel().


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