summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-12-28 21:24:13 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-12-29 19:50:35 +0100
commit20f3968e412881e64a38d7545987821722180227 (patch)
tree6eafe42ad2b2f0f657812146c6b13747a9338cb3
parentf0f67a42b82ecb0e654e3e0716d194ff4cbb13b1 (diff)
use comphelper::WeakComponentImplHelper in ShapeUndoElement
Change-Id: I9f8143916441c4f48055f1f2cb902bd1ad69ca89 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127690 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--chart2/source/controller/main/UndoActions.cxx8
-rw-r--r--chart2/source/controller/main/UndoActions.hxx14
2 files changed, 5 insertions, 17 deletions
diff --git a/chart2/source/controller/main/UndoActions.cxx b/chart2/source/controller/main/UndoActions.cxx
index 78bc1f6b0ef4..6e9ba0d80b22 100644
--- a/chart2/source/controller/main/UndoActions.cxx
+++ b/chart2/source/controller/main/UndoActions.cxx
@@ -83,9 +83,7 @@ void SAL_CALL UndoElement::redo( )
// = ShapeUndoElement
ShapeUndoElement::ShapeUndoElement( std::unique_ptr<SdrUndoAction> xSdrUndoAction )
- :ShapeUndoElement_MBase()
- ,ShapeUndoElement_TBase( m_aMutex )
- ,m_xAction( std::move(xSdrUndoAction) )
+ :m_xAction( std::move(xSdrUndoAction) )
{
}
@@ -114,10 +112,6 @@ void SAL_CALL ShapeUndoElement::redo( )
m_xAction->Redo();
}
-void SAL_CALL ShapeUndoElement::disposing()
-{
-}
-
} // namespace chart::impl
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/main/UndoActions.hxx b/chart2/source/controller/main/UndoActions.hxx
index 81b4121047a9..0f50d88037c8 100644
--- a/chart2/source/controller/main/UndoActions.hxx
+++ b/chart2/source/controller/main/UndoActions.hxx
@@ -21,6 +21,7 @@
#include <com/sun/star/document/XUndoAction.hpp>
#include <rtl/ustring.hxx>
+#include <comphelper/compbase.hxx>
#include <cppuhelper/compbase.hxx>
#include <cppuhelper/basemutex.hxx>
@@ -82,25 +83,18 @@ private:
std::shared_ptr< ChartModelClone > m_pModelClone;
};
-typedef ::cppu::BaseMutex ShapeUndoElement_MBase;
-typedef ::cppu::WeakComponentImplHelper< css::document::XUndoAction > ShapeUndoElement_TBase;
-class ShapeUndoElement :public ShapeUndoElement_MBase
- ,public ShapeUndoElement_TBase
+typedef comphelper::WeakComponentImplHelper< css::document::XUndoAction > ShapeUndoElement_TBase;
+class ShapeUndoElement final : public ShapeUndoElement_TBase
{
public:
explicit ShapeUndoElement( std::unique_ptr<SdrUndoAction> xSdrUndoAction );
+ virtual ~ShapeUndoElement() override;
// XUndoAction
virtual OUString SAL_CALL getTitle() override;
virtual void SAL_CALL undo( ) override;
virtual void SAL_CALL redo( ) override;
- // OComponentHelper
- virtual void SAL_CALL disposing() override;
-
-protected:
- virtual ~ShapeUndoElement() override;
-
private:
std::unique_ptr<SdrUndoAction> m_xAction;
};