summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-12-28 14:55:59 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-12-29 08:35:27 +0100
commit2cf9f0fe3a5da6fe53021278be88e33ad9e6e09d (patch)
treeb7f22125ced575a0a3acfdd2b31f8fd48af119f6 /sd
parentf5f97c7949d08c706ffb1f7a17b8bab32d2e2109 (diff)
use comphelper::WeakComponentImplHelper in PresenterCustomSprite
Change-Id: I4d85620cc189fb918d0b52a569f8612c51a39f2b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127643 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/presenter/PresenterCanvas.cxx19
1 files changed, 8 insertions, 11 deletions
diff --git a/sd/source/ui/presenter/PresenterCanvas.cxx b/sd/source/ui/presenter/PresenterCanvas.cxx
index 044bbefc1b03..f586969bc7b9 100644
--- a/sd/source/ui/presenter/PresenterCanvas.cxx
+++ b/sd/source/ui/presenter/PresenterCanvas.cxx
@@ -27,8 +27,7 @@
#include <basegfx/range/b2drectangle.hxx>
#include <basegfx/utils/canvastools.hxx>
#include <com/sun/star/awt/XWindow.hpp>
-#include <cppuhelper/basemutex.hxx>
-#include <cppuhelper/compbase.hxx>
+#include <comphelper/compbase.hxx>
#include <rtl/ref.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <vcl/window.hxx>
@@ -43,13 +42,12 @@ namespace sd::presenter {
/** Wrapper around a sprite that is displayed on a PresenterCanvas.
*/
namespace {
- typedef ::cppu::WeakComponentImplHelper <
+ typedef comphelper::WeakComponentImplHelper <
css::rendering::XCustomSprite
> PresenterCustomSpriteInterfaceBase;
-class PresenterCustomSprite
- : protected ::cppu::BaseMutex,
- public PresenterCustomSpriteInterfaceBase
+class PresenterCustomSprite final
+ : public PresenterCustomSpriteInterfaceBase
{
public:
PresenterCustomSprite (
@@ -58,7 +56,7 @@ public:
const Reference<awt::XWindow>& rxBaseWindow);
PresenterCustomSprite(const PresenterCustomSprite&) = delete;
PresenterCustomSprite& operator=(const PresenterCustomSprite&) = delete;
- virtual void SAL_CALL disposing() override;
+ virtual void disposing(std::unique_lock<std::mutex>&) override;
// XSprite
@@ -695,15 +693,14 @@ PresenterCustomSprite::PresenterCustomSprite (
const rtl::Reference<PresenterCanvas>& rpCanvas,
const Reference<rendering::XCustomSprite>& rxSprite,
const Reference<awt::XWindow>& rxBaseWindow)
- : PresenterCustomSpriteInterfaceBase(m_aMutex),
- mpCanvas(rpCanvas),
+ : mpCanvas(rpCanvas),
mxSprite(rxSprite),
mxBaseWindow(rxBaseWindow),
maPosition(0,0)
{
}
-void SAL_CALL PresenterCustomSprite::disposing()
+void PresenterCustomSprite::disposing(std::unique_lock<std::mutex>&)
{
Reference<XComponent> xComponent (mxSprite, UNO_QUERY);
mxSprite = nullptr;
@@ -781,7 +778,7 @@ Reference<rendering::XCanvas> PresenterCustomSprite::getContentCanvas()
void PresenterCustomSprite::ThrowIfDisposed()
{
- if (rBHelper.bDisposed || rBHelper.bInDispose || ! mxSprite.is())
+ if (m_bDisposed || ! mxSprite.is())
{
throw lang::DisposedException ("PresenterCustomSprite object has already been disposed",
static_cast<uno::XWeak*>(this));