summaryrefslogtreecommitdiff
path: root/canvas
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-02-24 14:02:13 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-02-24 19:39:39 +0000
commitdb295ca04a6a7ffa9525c43af80609801d22fb62 (patch)
tree17503f72524f5ca71878665f74b456c938f7bac3 /canvas
parente7bad15bc13292defd99cb561f867d8b77692e97 (diff)
BaseMutex->std::mutex in CanvasFont
Change-Id: I4f10e5d33b1067adbe3987c9a103951ea175fde4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147631 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'canvas')
-rw-r--r--canvas/source/cairo/cairo_canvasfont.cxx12
-rw-r--r--canvas/source/cairo/cairo_canvasfont.hxx10
2 files changed, 11 insertions, 11 deletions
diff --git a/canvas/source/cairo/cairo_canvasfont.cxx b/canvas/source/cairo/cairo_canvasfont.cxx
index 36c1733ef62a..16af11838a91 100644
--- a/canvas/source/cairo/cairo_canvasfont.cxx
+++ b/canvas/source/cairo/cairo_canvasfont.cxx
@@ -39,7 +39,6 @@ namespace cairocanvas
const uno::Sequence< beans::PropertyValue >& /*rExtraFontProperties*/,
const geometry::Matrix2D& rFontMatrix,
SurfaceProviderRef rDevice ) :
- CanvasFont_Base( m_aMutex ),
maFont( vcl::Font( rFontRequest.FontDescription.FamilyName,
rFontRequest.FontDescription.StyleName,
Size( 0, ::basegfx::fround(rFontRequest.CellSize) ) ) ),
@@ -86,11 +85,14 @@ namespace cairocanvas
pOutDev->EnableMapMode(bOldMapState);
}
- void SAL_CALL CanvasFont::disposing()
+ void CanvasFont::disposing(std::unique_lock<std::mutex>& rGuard)
{
- SolarMutexGuard aGuard;
-
- mpRefDevice.clear();
+ rGuard.unlock();
+ {
+ SolarMutexGuard aGuard;
+ mpRefDevice.clear();
+ }
+ rGuard.lock();
}
uno::Reference< rendering::XTextLayout > SAL_CALL CanvasFont::createTextLayout( const rendering::StringContext& aText, sal_Int8 nDirection, sal_Int64 nRandomSeed )
diff --git a/canvas/source/cairo/cairo_canvasfont.hxx b/canvas/source/cairo/cairo_canvasfont.hxx
index 0ebe9acd81ce..e510f420c437 100644
--- a/canvas/source/cairo/cairo_canvasfont.hxx
+++ b/canvas/source/cairo/cairo_canvasfont.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/geometry/Matrix2D.hpp>
@@ -38,11 +37,10 @@
namespace cairocanvas
{
- typedef ::cppu::WeakComponentImplHelper< css::rendering::XCanvasFont,
+ typedef ::comphelper::WeakComponentImplHelper< css::rendering::XCanvasFont,
css::lang::XServiceInfo > CanvasFont_Base;
- class CanvasFont : public ::cppu::BaseMutex,
- public CanvasFont_Base
+ class CanvasFont : public CanvasFont_Base
{
public:
typedef rtl::Reference<CanvasFont> Reference;
@@ -56,7 +54,7 @@ namespace cairocanvas
SurfaceProviderRef rDevice );
/// Dispose all internal references
- virtual void SAL_CALL disposing() override;
+ virtual void disposing(std::unique_lock<std::mutex>& rGuard) override;
// XCanvasFont
virtual css::uno::Reference< css::rendering::XTextLayout > SAL_CALL createTextLayout( const css::rendering::StringContext& aText, sal_Int8 nDirection, sal_Int64 nRandomSeed ) override;