diff options
Diffstat (limited to 'drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx')
-rw-r--r-- | drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx index b7d1c8abdd9b..ed0e8d41c4ab 100644 --- a/drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx @@ -30,6 +30,7 @@ #include <drawinglayer/attribute/sdrfillattribute.hxx> #include <drawinglayer/attribute/sdrlineattribute.hxx> #include <drawinglayer/attribute/sdrshadowattribute.hxx> +#include <utility> using namespace com::sun::star; @@ -234,7 +235,7 @@ namespace drawinglayer::primitive3d // take each angle which deviates more than 10% from going straight as // special edge. This will detect the two outer edges of pie segments, // but not always the center one (think about a near 180 degree pie) - if(F_PI - fabs(fAngle) > F_PI * 0.1) + if(M_PI - fabs(fAngle) > M_PI * 0.1) { if(nPointCount == nIndexA) { @@ -375,7 +376,7 @@ namespace drawinglayer::primitive3d // again when no longer geometry is needed for non-visible 3D objects as it is now for chart if(getPolyPolygon().count() && maSlices.empty()) { - ::osl::MutexGuard aGuard( m_aMutex ); + std::unique_lock aGuard( m_aMutex ); const_cast< SdrExtrudePrimitive3D& >(*this).impCreateSlices(); } @@ -388,7 +389,7 @@ namespace drawinglayer::primitive3d const basegfx::B2DVector& rTextureSize, const attribute::SdrLineFillShadowAttribute3D& rSdrLFSAttribute, const attribute::Sdr3DObjectAttribute& rSdr3DObjectAttribute, - const basegfx::B2DPolyPolygon& rPolyPolygon, + basegfx::B2DPolyPolygon aPolyPolygon, double fDepth, double fDiagonal, double fBackScale, @@ -398,9 +399,7 @@ namespace drawinglayer::primitive3d bool bCloseFront, bool bCloseBack) : SdrPrimitive3D(rTransform, rTextureSize, rSdrLFSAttribute, rSdr3DObjectAttribute), - maCorrectedPolyPolygon(), - maSlices(), - maPolyPolygon(rPolyPolygon), + maPolyPolygon(std::move(aPolyPolygon)), mfDepth(fDepth), mfDiagonal(fDiagonal), mfBackScale(fBackScale), @@ -411,13 +410,13 @@ namespace drawinglayer::primitive3d mbCloseBack(bCloseBack) { // make sure depth is positive - if(basegfx::fTools::lessOrEqual(getDepth(), 0.0)) + if(getDepth() <= 0.0) { mfDepth = 0.0; } // make sure the percentage value getDiagonal() is between 0.0 and 1.0 - if(basegfx::fTools::lessOrEqual(getDiagonal(), 0.0)) + if(getDiagonal() <= 0.0) { mfDiagonal = 0.0; } @@ -482,13 +481,13 @@ namespace drawinglayer::primitive3d (!getBuffered3DDecomposition().empty() && *mpLastRLGViewInformation != rViewInformation)) { - ::osl::MutexGuard aGuard( m_aMutex ); + std::unique_lock aGuard( m_aMutex ); // conditions of last local decomposition with reduced lines have changed. Remember // new one and clear current decompositiopn SdrExtrudePrimitive3D* pThat = const_cast< SdrExtrudePrimitive3D* >(this); pThat->setBuffered3DDecomposition(Primitive3DContainer()); - pThat->mpLastRLGViewInformation.reset( new geometry::ViewInformation3D(rViewInformation) ); + pThat->mpLastRLGViewInformation = rViewInformation; } } |