LibreOffice Module chart2 (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
chart::impl::UndoElement Class Referencefinal

#include <UndoActions.hxx>

Inheritance diagram for chart::impl::UndoElement:
[legend]
Collaboration diagram for chart::impl::UndoElement:
[legend]

Public Member Functions

 UndoElement (OUString i_actionString, rtl::Reference<::chart::ChartModel > i_documentModel, std::shared_ptr< ChartModelClone > i_modelClone)
 creates a new undo action More...
 
virtual ~UndoElement () override
 
 UndoElement (const UndoElement &)=delete
 
const UndoElementoperator= (const UndoElement &)=delete
 
virtual OUString SAL_CALL getTitle () override
 
virtual void SAL_CALL undo () override
 
virtual void SAL_CALL redo () override
 
virtual void disposing (std::unique_lock< std::mutex > &) override
 
- 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 ()
 

Private Member Functions

void impl_toggleModelState ()
 

Private Attributes

OUString m_sActionString
 
rtl::Reference<::chart::ChartModel > m_xDocumentModel
 
std::shared_ptr< ChartModelClonem_pModelClone
 

Additional Inherited Members

- Protected Member Functions inherited from comphelper::WeakComponentImplHelperBase
void throwIfDisposed (std::unique_lock< std::mutex > &)
 
- 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

Definition at line 43 of file UndoActions.hxx.

Constructor & Destructor Documentation

◆ UndoElement() [1/2]

chart::impl::UndoElement::UndoElement ( OUString  i_actionString,
rtl::Reference<::chart::ChartModel >  i_documentModel,
std::shared_ptr< ChartModelClone i_modelClone 
)

creates a new undo action

Parameters
i_actionStringis the title of the Undo action
i_documentModelis the actual document model which the undo actions operates on
i_modelCloneis the cloned model from before the changes, which the Undo action represents, have been applied. Upon <member>invoking</member>, the clone model is applied to the document model.

Definition at line 37 of file UndoActions.cxx.

◆ ~UndoElement()

chart::impl::UndoElement::~UndoElement ( )
overridevirtual

Definition at line 44 of file UndoActions.cxx.

◆ UndoElement() [2/2]

chart::impl::UndoElement::UndoElement ( const UndoElement )
delete

Member Function Documentation

◆ disposing()

void chart::impl::UndoElement::disposing ( std::unique_lock< std::mutex > &  )
overridevirtual

Reimplemented from comphelper::WeakComponentImplHelperBase.

Definition at line 48 of file UndoActions.cxx.

References m_pModelClone, and m_xDocumentModel.

◆ getTitle()

OUString SAL_CALL chart::impl::UndoElement::getTitle ( )
overridevirtual

Definition at line 56 of file UndoActions.cxx.

References m_sActionString.

◆ impl_toggleModelState()

void chart::impl::UndoElement::impl_toggleModelState ( )
private

Definition at line 61 of file UndoActions.cxx.

References m_pModelClone, and m_xDocumentModel.

Referenced by redo(), and undo().

◆ operator=()

const UndoElement & chart::impl::UndoElement::operator= ( const UndoElement )
delete

◆ redo()

void SAL_CALL chart::impl::UndoElement::redo ( )
overridevirtual

Definition at line 76 of file UndoActions.cxx.

References impl_toggleModelState().

◆ undo()

void SAL_CALL chart::impl::UndoElement::undo ( )
overridevirtual

Definition at line 71 of file UndoActions.cxx.

References impl_toggleModelState().

Member Data Documentation

◆ m_pModelClone

std::shared_ptr< ChartModelClone > chart::impl::UndoElement::m_pModelClone
private

Definition at line 79 of file UndoActions.hxx.

Referenced by disposing(), and impl_toggleModelState().

◆ m_sActionString

OUString chart::impl::UndoElement::m_sActionString
private

Definition at line 77 of file UndoActions.hxx.

Referenced by getTitle().

◆ m_xDocumentModel

rtl::Reference<::chart::ChartModel> chart::impl::UndoElement::m_xDocumentModel
private

Definition at line 78 of file UndoActions.hxx.

Referenced by disposing(), and impl_toggleModelState().


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