summaryrefslogtreecommitdiff
path: root/canvas
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-12-24 09:58:44 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-12-24 20:16:38 +0100
commit439cb9d60d853b9521def7931a68226b95de48a8 (patch)
treeac18a2b97ec9c41000598fbb1b45a765a213ab78 /canvas
parent1576ef8532cf2cea2da361db9c5707f1994e65e2 (diff)
use comphelper::WeakComponentImplHelper in ParametricPolyPolygon
Change-Id: I923970389870ced5e8e310c0f73859117b1cedb9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127405 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'canvas')
-rw-r--r--canvas/inc/parametricpolypolygon.hxx10
-rw-r--r--canvas/source/tools/parametricpolypolygon.cxx10
2 files changed, 7 insertions, 13 deletions
diff --git a/canvas/inc/parametricpolypolygon.hxx b/canvas/inc/parametricpolypolygon.hxx
index 089c42e76f57..0d39700ff488 100644
--- a/canvas/inc/parametricpolypolygon.hxx
+++ b/canvas/inc/parametricpolypolygon.hxx
@@ -21,8 +21,7 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/rendering/XParametricPolyPolygon2D.hpp>
-#include <cppuhelper/compbase.hxx>
-#include <cppuhelper/basemutex.hxx>
+#include <comphelper/compbase.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
#include <canvas/canvastoolsdllapi.h>
@@ -35,11 +34,10 @@ namespace com::sun::star::rendering { class XGraphicDevice; }
namespace canvas
{
- typedef cppu::WeakComponentImplHelper< css::rendering::XParametricPolyPolygon2D,
+ typedef comphelper::WeakComponentImplHelper< css::rendering::XParametricPolyPolygon2D,
css::lang::XServiceInfo > ParametricPolyPolygon_Base;
- class CANVASTOOLS_DLLPUBLIC ParametricPolyPolygon final : public ::cppu::BaseMutex,
- public ParametricPolyPolygon_Base
+ class CANVASTOOLS_DLLPUBLIC ParametricPolyPolygon final : public ParametricPolyPolygon_Base
{
public:
enum class GradientType
@@ -92,7 +90,7 @@ namespace canvas
const css::uno::Sequence< css::uno::Any >& rArgs );
/// Dispose all internal references
- virtual void SAL_CALL disposing() override;
+ virtual void disposing() override;
// XParametricPolyPolygon2D
virtual css::uno::Reference< css::rendering::XPolyPolygon2D > SAL_CALL getOutline( double t ) override;
diff --git a/canvas/source/tools/parametricpolypolygon.cxx b/canvas/source/tools/parametricpolypolygon.cxx
index 331b4e47535b..870f25f2ddbf 100644
--- a/canvas/source/tools/parametricpolypolygon.cxx
+++ b/canvas/source/tools/parametricpolypolygon.cxx
@@ -147,10 +147,8 @@ namespace canvas
colors, stops, fAspectRatio );
}
- void SAL_CALL ParametricPolyPolygon::disposing()
+ void ParametricPolyPolygon::disposing()
{
- ::osl::MutexGuard aGuard( m_aMutex );
-
mxDevice.clear();
}
@@ -174,7 +172,7 @@ namespace canvas
uno::Reference< rendering::XColorSpace > SAL_CALL ParametricPolyPolygon::getColorSpace()
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ std::unique_lock aGuard( m_aMutex );
return mxDevice.is() ? mxDevice->getDeviceColorSpace() : uno::Reference< rendering::XColorSpace >();
}
@@ -205,7 +203,6 @@ namespace canvas
const uno::Sequence< uno::Sequence< double > >& rColors,
const uno::Sequence< double >& rStops,
double nAspectRatio ) :
- ParametricPolyPolygon_Base( m_aMutex ),
mxDevice( rDevice ),
maValues( rGradientPoly,
rColors,
@@ -219,7 +216,6 @@ namespace canvas
GradientType eType,
const uno::Sequence< uno::Sequence< double > >& rColors,
const uno::Sequence< double >& rStops ) :
- ParametricPolyPolygon_Base( m_aMutex ),
mxDevice( rDevice ),
maValues( ::basegfx::B2DPolygon(),
rColors,
@@ -231,7 +227,7 @@ namespace canvas
ParametricPolyPolygon::Values ParametricPolyPolygon::getValues() const
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ std::unique_lock aGuard( m_aMutex );
return maValues;
}