use comphelper::WeakComponentImplHelper in UndoElement
Change-Id: Ie0c950eca65c61eaec3ecbd5dc5eff1f97b0467f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127691 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
committed by
Noel Grandin
parent
8f0ce842df
commit
5d79b65d56
@@ -35,9 +35,7 @@ namespace chart::impl
|
||||
using ::com::sun::star::lang::DisposedException;
|
||||
|
||||
UndoElement::UndoElement( const OUString& i_actionString, const Reference< XModel >& i_documentModel, const std::shared_ptr< ChartModelClone >& i_modelClone )
|
||||
:UndoElement_MBase()
|
||||
,UndoElement_TBase( m_aMutex )
|
||||
,m_sActionString( i_actionString )
|
||||
:m_sActionString( i_actionString )
|
||||
,m_xDocumentModel( i_documentModel )
|
||||
,m_pModelClone( i_modelClone )
|
||||
{
|
||||
@@ -47,7 +45,7 @@ UndoElement::~UndoElement()
|
||||
{
|
||||
}
|
||||
|
||||
void SAL_CALL UndoElement::disposing()
|
||||
void UndoElement::disposing(std::unique_lock<std::mutex>&)
|
||||
{
|
||||
if ( m_pModelClone )
|
||||
m_pModelClone->dispose();
|
||||
|
||||
@@ -22,8 +22,6 @@
|
||||
|
||||
#include <rtl/ustring.hxx>
|
||||
#include <comphelper/compbase.hxx>
|
||||
#include <cppuhelper/compbase.hxx>
|
||||
#include <cppuhelper/basemutex.hxx>
|
||||
|
||||
#include <memory>
|
||||
|
||||
@@ -38,11 +36,9 @@ class ChartModelClone;
|
||||
namespace impl
|
||||
{
|
||||
|
||||
typedef ::cppu::BaseMutex UndoElement_MBase;
|
||||
typedef ::cppu::WeakComponentImplHelper< css::document::XUndoAction > UndoElement_TBase;
|
||||
typedef comphelper::WeakComponentImplHelper< css::document::XUndoAction > UndoElement_TBase;
|
||||
|
||||
class UndoElement :public UndoElement_MBase
|
||||
,public UndoElement_TBase
|
||||
class UndoElement final : public UndoElement_TBase
|
||||
{
|
||||
public:
|
||||
/** creates a new undo action
|
||||
@@ -59,6 +55,7 @@ public:
|
||||
const css::uno::Reference< css::frame::XModel >& i_documentModel,
|
||||
const std::shared_ptr< ChartModelClone >& i_modelClone
|
||||
);
|
||||
virtual ~UndoElement() override;
|
||||
|
||||
UndoElement(const UndoElement&) = delete;
|
||||
const UndoElement& operator=(const UndoElement&) = delete;
|
||||
@@ -68,11 +65,8 @@ public:
|
||||
virtual void SAL_CALL undo( ) override;
|
||||
virtual void SAL_CALL redo( ) override;
|
||||
|
||||
// OComponentHelper
|
||||
virtual void SAL_CALL disposing() override;
|
||||
|
||||
protected:
|
||||
virtual ~UndoElement() override;
|
||||
// WeakComponentImplHelper
|
||||
virtual void disposing(std::unique_lock<std::mutex>&) override;
|
||||
|
||||
private:
|
||||
void impl_toggleModelState();
|
||||
|
||||
Reference in New Issue
Block a user