summaryrefslogtreecommitdiff
path: root/basegfx/source
diff options
context:
space:
mode:
Diffstat (limited to 'basegfx/source')
-rw-r--r--basegfx/source/tools/unopolypolygon.cxx34
1 files changed, 15 insertions, 19 deletions
diff --git a/basegfx/source/tools/unopolypolygon.cxx b/basegfx/source/tools/unopolypolygon.cxx
index 0d1696783c9f..48b3372d5526 100644
--- a/basegfx/source/tools/unopolypolygon.cxx
+++ b/basegfx/source/tools/unopolypolygon.cxx
@@ -34,7 +34,6 @@ using namespace ::com::sun::star;
namespace basegfx::unotools
{
UnoPolyPolygon::UnoPolyPolygon( const B2DPolyPolygon& rPolyPoly ) :
- UnoPolyPolygonBase( m_aMutex ),
maPolyPoly( rPolyPoly ),
meFillRule( rendering::FillRule_EVEN_ODD )
{
@@ -46,7 +45,7 @@ namespace basegfx::unotools
const geometry::RealPoint2D& position,
const uno::Reference< rendering::XPolyPolygon2D >& polyPolygon )
{
- osl::MutexGuard const guard( m_aMutex );
+ std::unique_lock const guard( m_aMutex );
modifying();
// TODO(F1): Correctly fulfill the UNO API
@@ -124,14 +123,14 @@ namespace basegfx::unotools
sal_Int32 SAL_CALL UnoPolyPolygon::getNumberOfPolygons()
{
- osl::MutexGuard const guard( m_aMutex );
+ std::unique_lock const guard( m_aMutex );
return maPolyPoly.count();
}
sal_Int32 SAL_CALL UnoPolyPolygon::getNumberOfPolygonPoints(
sal_Int32 polygon )
{
- osl::MutexGuard const guard( m_aMutex );
+ std::unique_lock const guard( m_aMutex );
checkIndex( polygon );
return maPolyPoly.getB2DPolygon(polygon).count();
@@ -139,14 +138,14 @@ namespace basegfx::unotools
rendering::FillRule SAL_CALL UnoPolyPolygon::getFillRule()
{
- osl::MutexGuard const guard( m_aMutex );
+ std::unique_lock const guard( m_aMutex );
return meFillRule;
}
void SAL_CALL UnoPolyPolygon::setFillRule(
rendering::FillRule fillRule )
{
- osl::MutexGuard const guard( m_aMutex );
+ std::unique_lock const guard( m_aMutex );
modifying();
meFillRule = fillRule;
@@ -155,7 +154,7 @@ namespace basegfx::unotools
sal_Bool SAL_CALL UnoPolyPolygon::isClosed(
sal_Int32 index )
{
- osl::MutexGuard const guard( m_aMutex );
+ std::unique_lock const guard( m_aMutex );
checkIndex( index );
return maPolyPoly.getB2DPolygon(index).isClosed();
@@ -165,7 +164,7 @@ namespace basegfx::unotools
sal_Int32 index,
sal_Bool closedState )
{
- osl::MutexGuard const guard( m_aMutex );
+ std::unique_lock const guard( m_aMutex );
modifying();
if( index == -1 )
@@ -192,8 +191,6 @@ namespace basegfx::unotools
sal_Int32 nPointIndex,
sal_Int32 nNumberOfPoints )
{
- osl::MutexGuard const guard( m_aMutex );
-
return unotools::pointSequenceSequenceFromB2DPolyPolygon(
getSubsetPolyPolygon( nPolygonIndex,
nNumberOfPolygons,
@@ -205,7 +202,7 @@ namespace basegfx::unotools
const uno::Sequence< uno::Sequence< geometry::RealPoint2D > >& points,
sal_Int32 nPolygonIndex )
{
- osl::MutexGuard const guard( m_aMutex );
+ std::unique_lock const guard( m_aMutex );
modifying();
const B2DPolyPolygon& rNewPolyPoly(
@@ -227,7 +224,7 @@ namespace basegfx::unotools
sal_Int32 nPolygonIndex,
sal_Int32 nPointIndex )
{
- osl::MutexGuard const guard( m_aMutex );
+ std::unique_lock const guard( m_aMutex );
checkIndex( nPolygonIndex );
const B2DPolygon& rPoly( maPolyPoly.getB2DPolygon( nPolygonIndex ) );
@@ -243,7 +240,7 @@ namespace basegfx::unotools
sal_Int32 nPolygonIndex,
sal_Int32 nPointIndex )
{
- osl::MutexGuard const guard( m_aMutex );
+ std::unique_lock const guard( m_aMutex );
checkIndex( nPolygonIndex );
modifying();
@@ -263,7 +260,6 @@ namespace basegfx::unotools
sal_Int32 nPointIndex,
sal_Int32 nNumberOfPoints )
{
- osl::MutexGuard const guard( m_aMutex );
return unotools::bezierSequenceSequenceFromB2DPolyPolygon(
getSubsetPolyPolygon( nPolygonIndex,
nNumberOfPolygons,
@@ -275,7 +271,7 @@ namespace basegfx::unotools
const uno::Sequence< uno::Sequence< geometry::RealBezierSegment2D > >& points,
sal_Int32 nPolygonIndex )
{
- osl::MutexGuard const guard( m_aMutex );
+ std::unique_lock const guard( m_aMutex );
modifying();
const B2DPolyPolygon& rNewPolyPoly(
unotools::polyPolygonFromBezier2DSequenceSequence( points ) );
@@ -295,7 +291,7 @@ namespace basegfx::unotools
geometry::RealBezierSegment2D SAL_CALL UnoPolyPolygon::getBezierSegment( sal_Int32 nPolygonIndex,
sal_Int32 nPointIndex )
{
- osl::MutexGuard const guard( m_aMutex );
+ std::unique_lock const guard( m_aMutex );
checkIndex( nPolygonIndex );
const B2DPolygon& rPoly( maPolyPoly.getB2DPolygon( nPolygonIndex ) );
@@ -320,7 +316,7 @@ namespace basegfx::unotools
sal_Int32 nPolygonIndex,
sal_Int32 nPointIndex )
{
- osl::MutexGuard const guard( m_aMutex );
+ std::unique_lock const guard( m_aMutex );
checkIndex( nPolygonIndex );
modifying();
@@ -347,7 +343,7 @@ namespace basegfx::unotools
sal_Int32 nPointIndex,
sal_Int32 nNumberOfPoints ) const
{
- osl::MutexGuard const guard( m_aMutex );
+ std::unique_lock const guard( m_aMutex );
checkIndex( nPolygonIndex );
const sal_Int32 nPolyCount( maPolyPoly.count() );
@@ -441,7 +437,7 @@ namespace basegfx::unotools
B2DPolyPolygon UnoPolyPolygon::getPolyPolygon() const
{
- osl::MutexGuard const guard( m_aMutex );
+ std::unique_lock const guard( m_aMutex );
// detach result from us
B2DPolyPolygon aRet( maPolyPoly );