From 3470c58be9c0361f9656ccdf36f7855ea46e5c69 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 24 Feb 2023 14:04:33 +0200 Subject: [PATCH] BaseMutex->std::mutex in vclcanvas::TextLayout Change-Id: I66970331312f30f42f16299ce6f38b2a13316e41 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147633 Tested-by: Jenkins Reviewed-by: Noel Grandin --- canvas/source/vcl/textlayout.cxx | 16 +++++++++------- canvas/source/vcl/textlayout.hxx | 10 ++++------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/canvas/source/vcl/textlayout.cxx b/canvas/source/vcl/textlayout.cxx index 689720e4570a..34c154257f31 100644 --- a/canvas/source/vcl/textlayout.cxx +++ b/canvas/source/vcl/textlayout.cxx @@ -80,7 +80,6 @@ namespace vclcanvas CanvasFont::Reference rFont, uno::Reference xDevice, OutDevProviderSharedPtr xOutDev ) : - TextLayout_Base( m_aMutex ), maText(std::move( aText )), mpFont(std::move( rFont )), mxDevice(std::move( xDevice )), @@ -88,13 +87,16 @@ namespace vclcanvas mnTextDirection( nDirection ) {} - void SAL_CALL TextLayout::disposing() + void TextLayout::disposing(std::unique_lock& rGuard) { - SolarMutexGuard aGuard; - - mpOutDevProvider.reset(); - mxDevice.clear(); - mpFont.clear(); + rGuard.unlock(); + { + SolarMutexGuard aGuard; + mpOutDevProvider.reset(); + mxDevice.clear(); + mpFont.clear(); + } + rGuard.lock(); } // XTextLayout diff --git a/canvas/source/vcl/textlayout.hxx b/canvas/source/vcl/textlayout.hxx index be8603d812f1..84f5fe6cab91 100644 --- a/canvas/source/vcl/textlayout.hxx +++ b/canvas/source/vcl/textlayout.hxx @@ -19,8 +19,7 @@ #pragma once -#include -#include +#include #include #include @@ -33,11 +32,10 @@ namespace vclcanvas { - typedef ::cppu::WeakComponentImplHelper< css::rendering::XTextLayout, + typedef ::comphelper::WeakComponentImplHelper< css::rendering::XTextLayout, css::lang::XServiceInfo > TextLayout_Base; - class TextLayout : public ::cppu::BaseMutex, - public TextLayout_Base + class TextLayout : public TextLayout_Base { public: /// make noncopyable @@ -52,7 +50,7 @@ namespace vclcanvas OutDevProviderSharedPtr xOutDev ); /// Dispose all internal references - virtual void SAL_CALL disposing() override; + virtual void disposing(std::unique_lock& rGuard) override; // XTextLayout virtual css::uno::Sequence< css::uno::Reference< css::rendering::XPolyPolygon2D > > SAL_CALL queryTextShapes( ) override;