diff options
author | Noel Grandin <noel@peralex.com> | 2015-06-03 12:54:32 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-06-04 08:30:24 +0200 |
commit | 1d92933d96d94819fa3a4ae2de9519874f9b92b6 (patch) | |
tree | 8b43292fd1950be75ce05c726696310eaf12e747 | |
parent | 397a0afd3b3dd597f23bfbc75543eaead8bab5d2 (diff) |
convert B2VectorContinuity to scoped enum
Change-Id: Ifa401dd0d2d1bef8c0ae2987d2aee86100b59816
-rw-r--r-- | basegfx/source/polygon/b2dpolygon.cxx | 2 | ||||
-rw-r--r-- | basegfx/source/polygon/b2dpolygontools.cxx | 10 | ||||
-rw-r--r-- | basegfx/source/polygon/b2dsvgpolypolygon.cxx | 2 | ||||
-rw-r--r-- | basegfx/source/tools/unotools.cxx | 4 | ||||
-rw-r--r-- | basegfx/source/vector/b2dvector.cxx | 8 | ||||
-rw-r--r-- | basegfx/test/basegfx2d.cxx | 2 | ||||
-rw-r--r-- | include/basegfx/vector/b2enums.hxx | 6 | ||||
-rw-r--r-- | sd/source/ui/animations/motionpathtag.cxx | 8 | ||||
-rw-r--r-- | svx/source/svdraw/svdpoev.cxx | 14 | ||||
-rw-r--r-- | tools/source/generic/poly.cxx | 4 |
10 files changed, 30 insertions, 30 deletions
diff --git a/basegfx/source/polygon/b2dpolygon.cxx b/basegfx/source/polygon/b2dpolygon.cxx index 096c4a01f44d..fb7a98ff4b6e 100644 --- a/basegfx/source/polygon/b2dpolygon.cxx +++ b/basegfx/source/polygon/b2dpolygon.cxx @@ -1336,7 +1336,7 @@ namespace basegfx } else { - return CONTINUITY_NONE; + return B2VectorContinuity::NONE; } } diff --git a/basegfx/source/polygon/b2dpolygontools.cxx b/basegfx/source/polygon/b2dpolygontools.cxx index 41b40f4190f9..13844613ff6b 100644 --- a/basegfx/source/polygon/b2dpolygontools.cxx +++ b/basegfx/source/polygon/b2dpolygontools.cxx @@ -2625,7 +2625,7 @@ namespace basegfx switch(eContinuity) { - case CONTINUITY_NONE : + case B2VectorContinuity::NONE : { if(rCandidate.isPrevControlPointUsed(nIndex)) { @@ -2661,7 +2661,7 @@ namespace basegfx break; } - case CONTINUITY_C1 : + case B2VectorContinuity::C1 : { if(rCandidate.isPrevControlPointUsed(nIndex) && rCandidate.isNextControlPointUsed(nIndex)) { @@ -2714,7 +2714,7 @@ namespace basegfx } break; } - case CONTINUITY_C2 : + case B2VectorContinuity::C2 : { if(rCandidate.isPrevControlPointUsed(nIndex) && rCandidate.isNextControlPointUsed(nIndex)) { @@ -3557,11 +3557,11 @@ namespace basegfx { const B2VectorContinuity eCont(rPolygon.getContinuityInPoint(a)); - if(CONTINUITY_C1 == eCont) + if(B2VectorContinuity::C1 == eCont) { aCollectFlags[nStartPointIndex] = com::sun::star::drawing::PolygonFlags_SMOOTH; } - else if(CONTINUITY_C2 == eCont) + else if(B2VectorContinuity::C2 == eCont) { aCollectFlags[nStartPointIndex] = com::sun::star::drawing::PolygonFlags_SYMMETRIC; } diff --git a/basegfx/source/polygon/b2dsvgpolypolygon.cxx b/basegfx/source/polygon/b2dsvgpolypolygon.cxx index 7a76f075c6e4..3ba94235c2a7 100644 --- a/basegfx/source/polygon/b2dsvgpolypolygon.cxx +++ b/basegfx/source/polygon/b2dsvgpolypolygon.cxx @@ -758,7 +758,7 @@ namespace basegfx // is necessary. const bool bSymmetricAtEdgeStart( 0 != nIndex - && CONTINUITY_C2 == aPolygon.getContinuityInPoint(nIndex)); + && B2VectorContinuity::C2 == aPolygon.getContinuityInPoint(nIndex)); if(bDetectQuadraticBeziers) { diff --git a/basegfx/source/tools/unotools.cxx b/basegfx/source/tools/unotools.cxx index 2a923e1bdb9a..f3a4765eb3d0 100644 --- a/basegfx/source/tools/unotools.cxx +++ b/basegfx/source/tools/unotools.cxx @@ -214,11 +214,11 @@ namespace unotools { const basegfx::B2VectorContinuity eCont(rPoly.getContinuityInPoint(b)); - if(basegfx::CONTINUITY_C1 == eCont) + if(basegfx::B2VectorContinuity::C1 == eCont) { aFlags[nStartPointIndex] = drawing::PolygonFlags_SMOOTH; } - else if(basegfx::CONTINUITY_C2 == eCont) + else if(basegfx::B2VectorContinuity::C2 == eCont) { aFlags[nStartPointIndex] = drawing::PolygonFlags_SYMMETRIC; } diff --git a/basegfx/source/vector/b2dvector.cxx b/basegfx/source/vector/b2dvector.cxx index 4c23f51c03c2..a9223175e4ee 100644 --- a/basegfx/source/vector/b2dvector.cxx +++ b/basegfx/source/vector/b2dvector.cxx @@ -168,22 +168,22 @@ namespace basegfx { if(rBackVector.equalZero() || rForwardVector.equalZero()) { - return CONTINUITY_NONE; + return B2VectorContinuity::NONE; } if(fTools::equal(rBackVector.getX(), -rForwardVector.getX()) && fTools::equal(rBackVector.getY(), -rForwardVector.getY())) { // same direction and same length -> C2 - return CONTINUITY_C2; + return B2VectorContinuity::C2; } if(areParallel(rBackVector, rForwardVector) && rBackVector.scalar(rForwardVector) < 0.0) { // parallel and opposite direction -> C1 - return CONTINUITY_C1; + return B2VectorContinuity::C1; } - return CONTINUITY_NONE; + return B2VectorContinuity::NONE; } } // end of namespace basegfx diff --git a/basegfx/test/basegfx2d.cxx b/basegfx/test/basegfx2d.cxx index 6abd54250da6..96d76bf1929b 100644 --- a/basegfx/test/basegfx2d.cxx +++ b/basegfx/test/basegfx2d.cxx @@ -737,7 +737,7 @@ public: CPPUNIT_ASSERT_MESSAGE("areControlPointsUsed() wrong", aPoly.areControlPointsUsed()); CPPUNIT_ASSERT_MESSAGE("getContinuityInPoint() wrong", - aPoly.getContinuityInPoint(0) == CONTINUITY_C2); + aPoly.getContinuityInPoint(0) == B2VectorContinuity::C2); aPoly.resetControlPoints(); CPPUNIT_ASSERT_MESSAGE("resetControlPoints() did not clear", diff --git a/include/basegfx/vector/b2enums.hxx b/include/basegfx/vector/b2enums.hxx index f1ba1781ea1b..80c242ef7862 100644 --- a/include/basegfx/vector/b2enums.hxx +++ b/include/basegfx/vector/b2enums.hxx @@ -43,13 +43,13 @@ namespace basegfx enum B2VectorContinuity { /// none - CONTINUITY_NONE = 0, + NONE = 0, /// mathematically negative oriented - CONTINUITY_C1, + C1, /// mathematically neutral, thus parallel - CONTINUITY_C2 + C2 }; /** Descriptor for possible line joins between two line segments diff --git a/sd/source/ui/animations/motionpathtag.cxx b/sd/source/ui/animations/motionpathtag.cxx index e15ac0db2701..c6849166b80a 100644 --- a/sd/source/ui/animations/motionpathtag.cxx +++ b/sd/source/ui/animations/motionpathtag.cxx @@ -869,7 +869,7 @@ void MotionPathTag::CheckPossibilities() bool bCurve(false); bool bSmoothFuz(false); bool bSegmFuz(false); - basegfx::B2VectorContinuity eSmooth = basegfx::CONTINUITY_NONE; + basegfx::B2VectorContinuity eSmooth = basegfx::B2VectorContinuity::NONE; mrView.CheckPolyPossibilitiesHelper( mpMark, b1stSmooth, b1stSegm, bCurve, bSmoothFuz, bSegmFuz, eSmooth ); } @@ -1136,15 +1136,15 @@ void MotionPathTag::SetMarkedPointsSmooth(SdrPathSmoothKind eKind) if(SDRPATHSMOOTH_ANGULAR == eKind) { - eFlags = basegfx::CONTINUITY_NONE; + eFlags = basegfx::B2VectorContinuity::NONE; } else if(SDRPATHSMOOTH_ASYMMETRIC == eKind) { - eFlags = basegfx::CONTINUITY_C1; + eFlags = basegfx::B2VectorContinuity::C1; } else if(SDRPATHSMOOTH_SYMMETRIC == eKind) { - eFlags = basegfx::CONTINUITY_C2; + eFlags = basegfx::B2VectorContinuity::C2; } else { diff --git a/svx/source/svdraw/svdpoev.cxx b/svx/source/svdraw/svdpoev.cxx index 9d559ff5af4f..a4fa289e73ea 100644 --- a/svx/source/svdraw/svdpoev.cxx +++ b/svx/source/svdraw/svdpoev.cxx @@ -72,7 +72,7 @@ void SdrPolyEditView::ImpCheckPolyPossibilities() bool bCurve(false); bool bSmoothFuz(false); bool bSegmFuz(false); - basegfx::B2VectorContinuity eSmooth = basegfx::CONTINUITY_NONE; + basegfx::B2VectorContinuity eSmooth = basegfx::B2VectorContinuity::NONE; for(size_t nMarkNum = 0; nMarkNum < nMarkCount; ++nMarkNum) { @@ -152,17 +152,17 @@ void SdrPolyEditView::CheckPolyPossibilitiesHelper( SdrMark* pM, bool& b1stSmoot if(!b1stSmooth && !bSmoothFuz) { - if(basegfx::CONTINUITY_NONE == eSmooth) + if(basegfx::B2VectorContinuity::NONE == eSmooth) { eMarkedPointsSmooth = SDRPATHSMOOTH_ANGULAR; } - if(basegfx::CONTINUITY_C1 == eSmooth) + if(basegfx::B2VectorContinuity::C1 == eSmooth) { eMarkedPointsSmooth = SDRPATHSMOOTH_ASYMMETRIC; } - if(basegfx::CONTINUITY_C2 == eSmooth) + if(basegfx::B2VectorContinuity::C2 == eSmooth) { eMarkedPointsSmooth = SDRPATHSMOOTH_SYMMETRIC; } @@ -182,15 +182,15 @@ void SdrPolyEditView::SetMarkedPointsSmooth(SdrPathSmoothKind eKind) if(SDRPATHSMOOTH_ANGULAR == eKind) { - eFlags = basegfx::CONTINUITY_NONE; + eFlags = basegfx::B2VectorContinuity::NONE; } else if(SDRPATHSMOOTH_ASYMMETRIC == eKind) { - eFlags = basegfx::CONTINUITY_C1; + eFlags = basegfx::B2VectorContinuity::C1; } else if(SDRPATHSMOOTH_SYMMETRIC == eKind) { - eFlags = basegfx::CONTINUITY_C2; + eFlags = basegfx::B2VectorContinuity::C2; } else { diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx index e8dacc2625d3..e01f72a5cbda 100644 --- a/tools/source/generic/poly.cxx +++ b/tools/source/generic/poly.cxx @@ -1872,11 +1872,11 @@ Polygon::Polygon(const basegfx::B2DPolygon& rPolygon) { const basegfx::B2VectorContinuity eCont(rPolygon.getContinuityInPoint(a)); - if(basegfx::CONTINUITY_C1 == eCont) + if(basegfx::B2VectorContinuity::C1 == eCont) { mpImplPolygon->mpFlagAry[nStartPointIndex] = (sal_uInt8)POLY_SMOOTH; } - else if(basegfx::CONTINUITY_C2 == eCont) + else if(basegfx::B2VectorContinuity::C2 == eCont) { mpImplPolygon->mpFlagAry[nStartPointIndex] = (sal_uInt8)POLY_SYMMTR; } |