diff options
author | Noel Grandin <noel@peralex.com> | 2015-06-03 14:31:19 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-06-04 08:30:24 +0200 |
commit | 42f771d6e9c02c50acc49f7feb1a9b5d0a9368ae (patch) | |
tree | 227208438b1723a20842ff8555b1bbb1e8b8ba27 /drawinglayer | |
parent | 1d92933d96d94819fa3a4ae2de9519874f9b92b6 (diff) |
convert B2DLineJoin to scoped enum
Change-Id: I4fb8f2c9e2080e3aa542d2ccf838e6784baa8429
Diffstat (limited to 'drawinglayer')
9 files changed, 23 insertions, 23 deletions
diff --git a/drawinglayer/source/attribute/lineattribute.cxx b/drawinglayer/source/attribute/lineattribute.cxx index 6d22e569ada7..c5c4cf486b7d 100644 --- a/drawinglayer/source/attribute/lineattribute.cxx +++ b/drawinglayer/source/attribute/lineattribute.cxx @@ -51,7 +51,7 @@ namespace drawinglayer ImpLineAttribute() : maColor(basegfx::BColor()), mfWidth(0.0), - meLineJoin(basegfx::B2DLINEJOIN_ROUND), + meLineJoin(basegfx::B2DLineJoin::Round), meLineCap(com::sun::star::drawing::LineCap_BUTT) { } diff --git a/drawinglayer/source/attribute/sdrlineattribute.cxx b/drawinglayer/source/attribute/sdrlineattribute.cxx index f1842fa03853..778f24257212 100644 --- a/drawinglayer/source/attribute/sdrlineattribute.cxx +++ b/drawinglayer/source/attribute/sdrlineattribute.cxx @@ -58,7 +58,7 @@ namespace drawinglayer } ImpSdrLineAttribute() - : meJoin(basegfx::B2DLINEJOIN_ROUND), + : meJoin(basegfx::B2DLineJoin::Round), mfWidth(0.0), mfTransparence(0.0), maColor(basegfx::BColor()), diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx index 9762a5bb5428..9ff216a307cf 100644 --- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx @@ -1733,7 +1733,7 @@ namespace } else { - aLineInfo.SetLineJoin(basegfx::B2DLINEJOIN_NONE); // It were lines; force to NONE + aLineInfo.SetLineJoin(basegfx::B2DLineJoin::NONE); // It were lines; force to NONE createLinePrimitive(aLinePolygon, aLineInfo, rTargetHolders.Current(), rPropertyHolders.Current()); aLinePolygon.clear(); aLineInfo = pA->GetLineInfo(); @@ -1755,7 +1755,7 @@ namespace if(aLinePolygon.count()) { - aLineInfo.SetLineJoin(basegfx::B2DLINEJOIN_NONE); // It were lines; force to NONE + aLineInfo.SetLineJoin(basegfx::B2DLineJoin::NONE); // It were lines; force to NONE createLinePrimitive(aLinePolygon, aLineInfo, rTargetHolders.Current(), rPropertyHolders.Current()); } } diff --git a/drawinglayer/source/primitive2d/polygonprimitive2d.cxx b/drawinglayer/source/primitive2d/polygonprimitive2d.cxx index c6bbfd2f45c5..92e48b1df690 100644 --- a/drawinglayer/source/primitive2d/polygonprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/polygonprimitive2d.cxx @@ -344,7 +344,7 @@ namespace drawinglayer { bool bUseDecomposition(false); - if(basegfx::B2DLINEJOIN_MITER == getLineAttribute().getLineJoin()) + if(basegfx::B2DLineJoin::Miter == getLineAttribute().getLineJoin()) { // if line is mitered, use parent call since mitered line // geometry may use more space than the geometry grown by half line width diff --git a/drawinglayer/source/primitive2d/textlineprimitive2d.cxx b/drawinglayer/source/primitive2d/textlineprimitive2d.cxx index b3d669f053ed..e9a02d478481 100644 --- a/drawinglayer/source/primitive2d/textlineprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/textlineprimitive2d.cxx @@ -41,7 +41,7 @@ namespace drawinglayer bool bWaveLine(false); bool bBoldLine(false); const int* pDotDashArray(0); - basegfx::B2DLineJoin eLineJoin(basegfx::B2DLINEJOIN_NONE); + basegfx::B2DLineJoin eLineJoin(basegfx::B2DLineJoin::NONE); double fOffset(getOffset()); double fHeight(getHeight()); @@ -164,7 +164,7 @@ namespace drawinglayer if(bWaveLine) { - eLineJoin = basegfx::B2DLINEJOIN_ROUND; + eLineJoin = basegfx::B2DLineJoin::Round; fHeight *= 0.25; } diff --git a/drawinglayer/source/primitive2d/textstrikeoutprimitive2d.cxx b/drawinglayer/source/primitive2d/textstrikeoutprimitive2d.cxx index e5ffc580f96f..13e937efd09d 100644 --- a/drawinglayer/source/primitive2d/textstrikeoutprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/textstrikeoutprimitive2d.cxx @@ -204,7 +204,7 @@ namespace drawinglayer aStrikeoutLine.transform(aUnscaledTransform); // add primitive - const attribute::LineAttribute aLineAttribute(getFontColor(), fStrikeoutHeight, basegfx::B2DLINEJOIN_NONE); + const attribute::LineAttribute aLineAttribute(getFontColor(), fStrikeoutHeight, basegfx::B2DLineJoin::NONE); Primitive2DSequence xRetval(1); xRetval[0] = Primitive2DReference(new PolygonStrokePrimitive2D(aStrikeoutLine, aLineAttribute)); diff --git a/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx b/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx index 4bcf43602d23..464f4e86c1a2 100644 --- a/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx @@ -300,7 +300,7 @@ namespace drawinglayer if(nVerSeg) { - if(basegfx::B2DLINEJOIN_ROUND == aLineJoin) + if(basegfx::B2DLineJoin::Round == aLineJoin) { // calculate new horizontal segments const sal_uInt32 nHorSeg(basegfx::fround((fAngle / F_2PI) * (double)nSegments)); @@ -321,29 +321,29 @@ namespace drawinglayer else { // fallback to bevel when there is not at least one segment hor and ver - aLineJoin = basegfx::B2DLINEJOIN_BEVEL; + aLineJoin = basegfx::B2DLineJoin::Bevel; } } - if(basegfx::B2DLINEJOIN_MIDDLE == aLineJoin - || basegfx::B2DLINEJOIN_BEVEL == aLineJoin - || basegfx::B2DLINEJOIN_MITER == aLineJoin) + if(basegfx::B2DLineJoin::Middle == aLineJoin + || basegfx::B2DLineJoin::Bevel == aLineJoin + || basegfx::B2DLineJoin::Miter == aLineJoin) { - if(basegfx::B2DLINEJOIN_MITER == aLineJoin) + if(basegfx::B2DLineJoin::Miter == aLineJoin) { const double fMiterAngle(fAngle/2.0); if(fMiterAngle < fMiterMinimumAngle) { // fallback to bevel when miter's angle is too small - aLineJoin = basegfx::B2DLINEJOIN_BEVEL; + aLineJoin = basegfx::B2DLineJoin::Bevel; } } const double fInc(F_PI / (double)nVerSeg); const double fSin(sin(-fAngle)); const double fCos(cos(-fAngle)); - const bool bMiter(basegfx::B2DLINEJOIN_MITER == aLineJoin); + const bool bMiter(basegfx::B2DLineJoin::Miter == aLineJoin); const double fMiterSin(bMiter ? sin(-(fAngle/2.0)) : 0.0); const double fMiterCos(bMiter ? cos(-(fAngle/2.0)) : 0.0); double fPos(-F_PI2); @@ -547,7 +547,7 @@ namespace drawinglayer const attribute::MaterialAttribute3D aMaterial(getBColor()); static sal_uInt32 nSegments(8); // default for 3d line segments, for more quality just raise this value (in even steps) const bool bClosed(getB3DPolygon().isClosed()); - const bool bNoLineJoin(basegfx::B2DLINEJOIN_NONE == getLineJoin()); + const bool bNoLineJoin(basegfx::B2DLineJoin::NONE == getLineJoin()); const sal_uInt32 nLoopCount(bClosed ? nPointCount : nPointCount - 1); basegfx::B3DPoint aLast(getB3DPolygon().getB3DPoint(nPointCount - 1)); basegfx::B3DPoint aCurr(getB3DPolygon().getB3DPoint(0)); diff --git a/drawinglayer/source/processor2d/hittestprocessor2d.cxx b/drawinglayer/source/processor2d/hittestprocessor2d.cxx index 4c5602d118d5..d71d42e067c9 100644 --- a/drawinglayer/source/processor2d/hittestprocessor2d.cxx +++ b/drawinglayer/source/processor2d/hittestprocessor2d.cxx @@ -335,7 +335,7 @@ namespace drawinglayer if(basegfx::fTools::more(rLineAttribute.getWidth(), 0.0)) { - if(basegfx::B2DLINEJOIN_MITER == rLineAttribute.getLineJoin()) + if(basegfx::B2DLineJoin::Miter == rLineAttribute.getLineJoin()) { // if line is mitered, use decomposition since mitered line // geometry may use more space than the geometry grown by half line width diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx index 77039f38e2ad..3f204e3d1fa4 100644 --- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx @@ -456,25 +456,25 @@ namespace drawinglayer // get Join switch(pLineAttribute->getLineJoin()) { - default : // basegfx::B2DLINEJOIN_NONE : + default : // basegfx::B2DLineJoin::NONE : { eJoin = SvtGraphicStroke::joinNone; break; } - case basegfx::B2DLINEJOIN_BEVEL : + case basegfx::B2DLineJoin::Bevel : { eJoin = SvtGraphicStroke::joinBevel; break; } - case basegfx::B2DLINEJOIN_MIDDLE : - case basegfx::B2DLINEJOIN_MITER : + case basegfx::B2DLineJoin::Middle : + case basegfx::B2DLineJoin::Miter : { eJoin = SvtGraphicStroke::joinMiter; // ATM 15 degrees is assumed fMiterLength /= rtl::math::sin(M_PI * (15.0 / 360.0)); break; } - case basegfx::B2DLINEJOIN_ROUND : + case basegfx::B2DLineJoin::Round : { eJoin = SvtGraphicStroke::joinRound; break; |