chart2/source/controller/main/UndoActions.cxx | 8 +------- chart2/source/controller/main/UndoActions.hxx | 14 ++++---------- chart2/source/inc/PopupRequest.hxx | 12 +++--------- chart2/source/tools/PopupRequest.cxx | 9 +-------- 4 files changed, 9 insertions(+), 34 deletions(-)
New commits: commit 20f3968e412881e64a38d7545987821722180227 Author: Noel Grandin <noelgran...@gmail.com> AuthorDate: Tue Dec 28 21:24:13 2021 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Wed Dec 29 19:50:35 2021 +0100 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.gran...@collabora.co.uk> 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; }; commit f0f67a42b82ecb0e654e3e0716d194ff4cbb13b1 Author: Noel Grandin <noelgran...@gmail.com> AuthorDate: Tue Dec 28 21:29:12 2021 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Wed Dec 29 19:50:26 2021 +0100 use comphelper::WeakComponentImplHelper in PopupRequest Change-Id: I199e40de2ac3215d03a90d75988a7775f87890b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127693 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/chart2/source/inc/PopupRequest.hxx b/chart2/source/inc/PopupRequest.hxx index ac7e783c434c..a755fdfa3c85 100644 --- a/chart2/source/inc/PopupRequest.hxx +++ b/chart2/source/inc/PopupRequest.hxx @@ -11,18 +11,17 @@ #include "charttoolsdllapi.hxx" -#include <cppuhelper/basemutex.hxx> -#include <cppuhelper/compbase.hxx> +#include <comphelper/compbase.hxx> #include <com/sun/star/awt/XRequestCallback.hpp> namespace chart { namespace impl { -typedef cppu::WeakComponentImplHelper<css::awt::XRequestCallback> PopupRequest_Base; +typedef comphelper::WeakComponentImplHelper<css::awt::XRequestCallback> PopupRequest_Base; } -class OOO_DLLPUBLIC_CHARTTOOLS PopupRequest : public cppu::BaseMutex, public impl::PopupRequest_Base +class OOO_DLLPUBLIC_CHARTTOOLS PopupRequest final : public impl::PopupRequest_Base { public: explicit PopupRequest(); @@ -30,15 +29,10 @@ public: css::uno::Reference<css::awt::XCallback> const& getCallback() const { return m_xCallback; } -protected: // ____ XRequestCallback ____ virtual void SAL_CALL addCallback(const css::uno::Reference<::css::awt::XCallback>& xCallback, const css::uno::Any& aData) override; - // ____ WeakComponentImplHelperBase ____ - // is called when dispose() is called at this component - virtual void SAL_CALL disposing() override; - private: css::uno::Reference<css::awt::XCallback> m_xCallback; }; diff --git a/chart2/source/tools/PopupRequest.cxx b/chart2/source/tools/PopupRequest.cxx index 685dac49369c..70dd65b78393 100644 --- a/chart2/source/tools/PopupRequest.cxx +++ b/chart2/source/tools/PopupRequest.cxx @@ -14,10 +14,7 @@ using namespace css; namespace chart { -PopupRequest::PopupRequest() - : impl::PopupRequest_Base(m_aMutex) -{ -} +PopupRequest::PopupRequest() {} PopupRequest::~PopupRequest() {} @@ -29,10 +26,6 @@ void SAL_CALL PopupRequest::addCallback(const uno::Reference<awt::XCallback>& xC m_xCallback = xCallback; } -// ____ WeakComponentImplHelperBase ____ -// is called when dispose() is called at this component -void SAL_CALL PopupRequest::disposing() {} - } // namespace chart /* vim:set shiftwidth=4 softtabstop=4 expandtab: */