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;