diff options
-rw-r--r-- | canvas/source/cairo/cairo_canvasfont.cxx | 12 | ||||
-rw-r--r-- | canvas/source/cairo/cairo_canvasfont.hxx | 10 |
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; |