From f1561065dd2178088925f45f64e6fc4cdfe72c4c Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 28 Dec 2021 13:55:52 +0200 Subject: use comphelper::WeakComponentImplHelper in PresenterPreviewCache Change-Id: I23537d6050a4055c1d06b227722a6f6991f245cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127635 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sd/source/ui/presenter/PresenterPreviewCache.cxx | 8 ++++---- sd/source/ui/presenter/PresenterPreviewCache.hxx | 10 ++++------ 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/sd/source/ui/presenter/PresenterPreviewCache.cxx b/sd/source/ui/presenter/PresenterPreviewCache.cxx index 4a3e64501152..fd29cdbfac1b 100644 --- a/sd/source/ui/presenter/PresenterPreviewCache.cxx +++ b/sd/source/ui/presenter/PresenterPreviewCache.cxx @@ -25,6 +25,7 @@ #include #include #include +#include namespace com::sun::star::uno { class XComponentContext; } @@ -72,8 +73,7 @@ private: //===== PresenterPreviewCache ================================================= PresenterPreviewCache::PresenterPreviewCache () - : PresenterPreviewCacheInterfaceBase(m_aMutex), - maPreviewSize(Size(200,200)), + : maPreviewSize(Size(200,200)), mpCacheContext(std::make_shared()), mpCache(std::make_shared(maPreviewSize, Bitmap::HasFastScale(), mpCacheContext)) { @@ -149,7 +149,7 @@ Reference SAL_CALL PresenterPreviewCache::getSlidePreview ( void SAL_CALL PresenterPreviewCache::addPreviewCreationNotifyListener ( const Reference& rxListener) { - if (rBHelper.bDisposed || rBHelper.bInDispose) + if (m_bDisposed) return; if (rxListener.is()) mpCacheContext->AddPreviewCreationNotifyListener(rxListener); @@ -178,7 +178,7 @@ void SAL_CALL PresenterPreviewCache::resume() void PresenterPreviewCache::ThrowIfDisposed() { - if (rBHelper.bDisposed || rBHelper.bInDispose) + if (m_bDisposed) { throw lang::DisposedException ("PresenterPreviewCache object has already been disposed", static_cast(this)); diff --git a/sd/source/ui/presenter/PresenterPreviewCache.hxx b/sd/source/ui/presenter/PresenterPreviewCache.hxx index 710fb81635ec..4f8c522804c3 100644 --- a/sd/source/ui/presenter/PresenterPreviewCache.hxx +++ b/sd/source/ui/presenter/PresenterPreviewCache.hxx @@ -22,24 +22,22 @@ #include #include #include -#include -#include +#include #include namespace sd::slidesorter::cache { class PageCache; } namespace sd::presenter { -typedef ::cppu::WeakComponentImplHelper< +typedef comphelper::WeakComponentImplHelper< css::lang::XInitialization, css::drawing::XSlidePreviewCache > PresenterPreviewCacheInterfaceBase; /** Uno API wrapper around the slide preview cache. */ -class PresenterPreviewCache - : private ::cppu::BaseMutex, - public PresenterPreviewCacheInterfaceBase +class PresenterPreviewCache final + : public PresenterPreviewCacheInterfaceBase { public: PresenterPreviewCache (); -- cgit