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>
This commit is contained in:
Noel Grandin 2023-02-24 14:04:33 +02:00
parent c55d7540ef
commit 3470c58be9
2 changed files with 13 additions and 13 deletions

View File

@ -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

View File

@ -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;