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

This is a CommandDispatch implementation for Undo and Redo. More...

#include <UndoCommandDispatch.hxx>

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

Public Member Functions

 UndoCommandDispatch (const css::uno::Reference< css::uno::XComponentContext > &xContext, rtl::Reference<::chart::ChartModel > xModel)
 
virtual ~UndoCommandDispatch () override
 
virtual void initialize () override
 
- 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 disposing (std::unique_lock< std::mutex > &rGuard) override
 is called when this is disposed More...
 
virtual void SAL_CALL disposing (const css::lang::EventObject &Source) 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...
 
- 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 > &)
 

Private Attributes

rtl::Reference<::chart::ChartModel > m_xModel
 
css::uno::Reference< css::document::XUndoManager > m_xUndoManager
 

Additional Inherited Members

- 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 CommandDispatch implementation for Undo and Redo.

Definition at line 33 of file UndoCommandDispatch.hxx.

Constructor & Destructor Documentation

◆ UndoCommandDispatch()

chart::UndoCommandDispatch::UndoCommandDispatch ( const css::uno::Reference< css::uno::XComponentContext > &  xContext,
rtl::Reference<::chart::ChartModel >  xModel 
)
explicit

Definition at line 41 of file UndoCommandDispatch.cxx.

References m_xModel, m_xModel, m_xUndoManager, and xModel.

◆ ~UndoCommandDispatch()

chart::UndoCommandDispatch::~UndoCommandDispatch ( )
overridevirtual

Definition at line 50 of file UndoCommandDispatch.cxx.

Member Function Documentation

◆ dispatch()

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

Reimplemented from chart::CommandDispatch.

Definition at line 88 of file UndoCommandDispatch.cxx.

References DBG_UNHANDLED_EXCEPTION, m_xUndoManager, nCount, and URL.

◆ disposing() [1/2]

virtual void SAL_CALL chart::UndoCommandDispatch::disposing ( const css::lang::EventObject &  Source)
overrideprotectedvirtual

Reimplemented from chart::CommandDispatch.

◆ disposing() [2/2]

void chart::UndoCommandDispatch::disposing ( std::unique_lock< std::mutex > &  rGuard)
overrideprotectedvirtual

is called when this is disposed

Reimplemented from chart::CommandDispatch.

Definition at line 124 of file UndoCommandDispatch.cxx.

References m_xModel, and m_xUndoManager.

◆ fireStatusEvent()

void chart::UndoCommandDispatch::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 60 of file UndoCommandDispatch.cxx.

References chart::CommandDispatch::fireStatusEventForURL(), m_xUndoManager, and SvtResId().

◆ initialize()

void chart::UndoCommandDispatch::initialize ( )
overridevirtual

Reimplemented from chart::CommandDispatch.

Definition at line 53 of file UndoCommandDispatch.cxx.

References ENSURE_OR_RETURN_VOID, and m_xUndoManager.

Member Data Documentation

◆ m_xModel

rtl::Reference<::chart::ChartModel> chart::UndoCommandDispatch::m_xModel
private

Definition at line 63 of file UndoCommandDispatch.hxx.

Referenced by disposing(), and UndoCommandDispatch().

◆ m_xUndoManager

css::uno::Reference< css::document::XUndoManager > chart::UndoCommandDispatch::m_xUndoManager
private

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