summaryrefslogtreecommitdiff
path: root/canvas
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-02-24 14:04:33 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-02-24 19:39:59 +0000
commit3470c58be9c0361f9656ccdf36f7855ea46e5c69 (patch)
treebac6c803ea3a8cb54afe086afaa8fdce2022f4c3 /canvas
parentc55d7540efdd33618950c93cabcb680e8e26c894 (diff)
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 <noel.grandin@collabora.co.uk>
Diffstat (limited to 'canvas')
-rw-r--r--canvas/source/vcl/textlayout.cxx16
-rw-r--r--canvas/source/vcl/textlayout.hxx10
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<rendering::XGraphicDevice> 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<std::mutex>& 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 <cppuhelper/compbase.hxx>
-#include <cppuhelper/basemutex.hxx>
+#include <comphelper/compbase.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/rendering/StringContext.hpp>
@@ -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<std::mutex>& rGuard) override;
// XTextLayout
virtual css::uno::Sequence< css::uno::Reference< css::rendering::XPolyPolygon2D > > SAL_CALL queryTextShapes( ) override;