sd/source/ui/presenter/PresenterPreviewCache.cxx | 8 ++++---- sd/source/ui/presenter/PresenterPreviewCache.hxx | 10 ++++------ 2 files changed, 8 insertions(+), 10 deletions(-)
New commits: commit f1561065dd2178088925f45f64e6fc4cdfe72c4c Author: Noel Grandin <noelgran...@gmail.com> AuthorDate: Tue Dec 28 13:55:52 2021 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Tue Dec 28 18:55:14 2021 +0100 use comphelper::WeakComponentImplHelper in PresenterPreviewCache Change-Id: I23537d6050a4055c1d06b227722a6f6991f245cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127635 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> 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 <sdpage.hxx> #include <cppcanvas/vclfactory.hxx> #include <com/sun/star/drawing/XDrawPage.hpp> +#include <osl/diagnose.h> 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<PresenterCacheContext>()), mpCache(std::make_shared<PageCache>(maPreviewSize, Bitmap::HasFastScale(), mpCacheContext)) { @@ -149,7 +149,7 @@ Reference<rendering::XBitmap> SAL_CALL PresenterPreviewCache::getSlidePreview ( void SAL_CALL PresenterPreviewCache::addPreviewCreationNotifyListener ( const Reference<drawing::XSlidePreviewCacheListener>& 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<uno::XWeak*>(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 <com/sun/star/drawing/XSlidePreviewCache.hpp> #include <com/sun/star/lang/XInitialization.hpp> #include <tools/gen.hxx> -#include <cppuhelper/compbase.hxx> -#include <cppuhelper/basemutex.hxx> +#include <comphelper/compbase.hxx> #include <memory> 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 ();