avmedia/source/framework/mediacontrol.cxx | 10 - avmedia/source/framework/mediaitem.cxx | 2 avmedia/source/viewer/mediawindow_impl.cxx | 10 - basebmp/source/bitmapdevice.cxx | 83 ++++---- basebmp/source/debug.cxx | 38 ++-- basebmp/test/basictest.cxx | 78 ++++---- basebmp/test/bmpmasktest.cxx | 30 +-- basebmp/test/bmptest.cxx | 36 +-- basebmp/test/cliptest.cxx | 46 ++-- basebmp/test/filltest.cxx | 34 +-- basebmp/test/linetest.cxx | 34 +-- basebmp/test/masktest.cxx | 16 - basebmp/test/polytest.cxx | 38 ++-- basegfx/source/polygon/b2dlinegeometry.cxx | 22 +- basegfx/source/polygon/b2dpolygon.cxx | 2 basegfx/source/polygon/b2dpolygontools.cxx | 38 ++-- basegfx/source/polygon/b2dpolygontriangulator.cxx | 2 basegfx/source/polygon/b2dpolypolygoncutter.cxx | 16 - basegfx/source/polygon/b2dpolypolygontools.cxx | 4 basegfx/source/polygon/b2dsvgpolypolygon.cxx | 2 basegfx/source/range/b2drangeclipper.cxx | 4 basegfx/source/tools/b2dclipstate.cxx | 2 basegfx/source/tools/unotools.cxx | 4 basegfx/source/vector/b2dvector.cxx | 14 - basegfx/test/basegfx2d.cxx | 8 basegfx/test/boxclipper.cxx | 82 ++++---- basic/source/comp/codegen.cxx | 8 basic/source/comp/dim.cxx | 10 - basic/source/comp/symtbl.cxx | 12 - canvas/source/vcl/canvashelper.cxx | 10 - cppcanvas/source/mtfrenderer/implrenderer.cxx | 8 drawinglayer/source/attribute/lineattribute.cxx | 2 drawinglayer/source/attribute/sdrlineattribute.cxx | 2 drawinglayer/source/primitive2d/metafileprimitive2d.cxx | 4 drawinglayer/source/primitive2d/polygonprimitive2d.cxx | 2 drawinglayer/source/primitive2d/textlineprimitive2d.cxx | 4 drawinglayer/source/primitive2d/textstrikeoutprimitive2d.cxx | 2 drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx | 18 - drawinglayer/source/processor2d/hittestprocessor2d.cxx | 2 drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx | 10 - filter/source/graphicfilter/eps/eps.cxx | 12 - filter/source/graphicfilter/ipict/shape.cxx | 12 - filter/source/svg/gfxtypes.hxx | 2 filter/source/svg/svgreader.cxx | 12 - filter/source/svg/svgwriter.cxx | 26 +- filter/source/svg/svgwriter.hxx | 2 include/avmedia/mediaitem.hxx | 40 +--- include/basebmp/drawmodes.hxx | 10 - include/basebmp/genericcolorimageaccessor.hxx | 2 include/basebmp/polypolygonrenderer.hxx | 9 include/basebmp/scanlineformats.hxx | 42 ++-- include/basegfx/polygon/b2dlinegeometry.hxx | 2 include/basegfx/polygon/b2dpolypolygonfillrule.hxx | 12 - include/basegfx/vector/b2enums.hxx | 26 +- include/basic/sbdef.hxx | 10 - include/drawinglayer/attribute/lineattribute.hxx | 2 include/vcl/outdev.hxx | 4 sd/source/ui/animations/motionpathtag.cxx | 8 slideshow/source/engine/slide/layer.cxx | 2 svgio/source/svgreader/svgstyleattributes.cxx | 6 svx/source/engine3d/extrud3d.cxx | 2 svx/source/sdr/attribute/sdrformtextattribute.cxx | 10 - svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx | 2 svx/source/sdr/primitive2d/sdrattributecreator.cxx | 10 - svx/source/svdraw/svdfmtf.cxx | 16 - svx/source/svdraw/svdpoev.cxx | 14 - tools/source/generic/poly.cxx | 4 vcl/android/androidinst.cxx | 2 vcl/headless/svpbmp.cxx | 104 +++++------ vcl/headless/svpgdi.cxx | 20 +- vcl/headless/svpinst.cxx | 18 - vcl/headless/svptextrender.cxx | 53 ++--- vcl/headless/svpvd.cxx | 2 vcl/inc/generic/glyphcache.hxx | 7 vcl/inc/headless/svpbmp.hxx | 2 vcl/ios/iosinst.cxx | 2 vcl/quartz/salgdicommon.cxx | 14 - vcl/source/filter/wmf/enhwmf.cxx | 8 vcl/source/filter/wmf/winwmf.cxx | 8 vcl/source/gdi/cvtsvm.cxx | 8 vcl/source/gdi/lineinfo.cxx | 4 vcl/source/gdi/pdfwriter_impl.cxx | 12 - vcl/source/outdev/line.cxx | 4 vcl/source/outdev/polygon.cxx | 6 vcl/source/outdev/polyline.cxx | 4 vcl/source/outdev/transparent.cxx | 4 vcl/unx/gtk/window/gtksalframe.cxx | 2 vcl/win/source/gdi/gdiimpl.cxx | 10 - vcl/workben/vcldemo.cxx | 8 89 files changed, 665 insertions(+), 685 deletions(-)
New commits: commit 623445aa0edb6647bab37fc7f8adcec11d43e317 Author: Noel Grandin <[email protected]> Date: Thu Jun 4 08:29:58 2015 +0200 convert PropertyMode to scoped enum Change-Id: I9b0bbf6273aa18ae918d1d69af5dcc7652181f5c diff --git a/basic/source/comp/codegen.cxx b/basic/source/comp/codegen.cxx index 332bb7b..81f9de2 100644 --- a/basic/source/comp/codegen.cxx +++ b/basic/source/comp/codegen.cxx @@ -227,15 +227,15 @@ void SbiCodeGen::Save() aProcName = aIfaceProcName; } PropertyMode ePropMode = pProc->getPropertyMode(); - if( ePropMode != PROPERTY_MODE_NONE ) + if( ePropMode != PropertyMode::NONE ) { SbxDataType ePropType = SbxEMPTY; switch( ePropMode ) { - case PROPERTY_MODE_GET: + case PropertyMode::Get: ePropType = pProc->GetType(); break; - case PROPERTY_MODE_LET: + case PropertyMode::Let: { // type == type of first parameter ePropType = SbxVARIANT; // Default @@ -250,7 +250,7 @@ void SbiCodeGen::Save() } break; } - case PROPERTY_MODE_SET: + case PropertyMode::Set: ePropType = SbxOBJECT; break; default: diff --git a/basic/source/comp/dim.cxx b/basic/source/comp/dim.cxx index e0366f8..461dcf6 100644 --- a/basic/source/comp/dim.cxx +++ b/basic/source/comp/dim.cxx @@ -1172,21 +1172,21 @@ void SbiParser::DefProc( bool bStatic, bool bPrivate ) sal_uInt16 l1 = nLine; bool bSub = ( eCurTok == SUB ); bool bProperty = ( eCurTok == PROPERTY ); - PropertyMode ePropertyMode = PROPERTY_MODE_NONE; + PropertyMode ePropertyMode = PropertyMode::NONE; if( bProperty ) { Next(); if( eCurTok == GET ) { - ePropertyMode = PROPERTY_MODE_GET; + ePropertyMode = PropertyMode::Get; } else if( eCurTok == LET ) { - ePropertyMode = PROPERTY_MODE_LET; + ePropertyMode = PropertyMode::Let; } else if( eCurTok == SET ) { - ePropertyMode = PROPERTY_MODE_SET; + ePropertyMode = PropertyMode::Set; } else { @@ -1222,7 +1222,7 @@ void SbiParser::DefProc( bool bStatic, bool bPrivate ) else if( pProc->IsUsedForProcDecl() ) { PropertyMode ePropMode = pDef->getPropertyMode(); - if( ePropMode == PROPERTY_MODE_NONE || ePropMode == pProc->getPropertyMode() ) + if( ePropMode == PropertyMode::NONE || ePropMode == pProc->getPropertyMode() ) { Error( SbERR_PROC_DEFINED, pDef->GetName() ); delete pDef; diff --git a/basic/source/comp/symtbl.cxx b/basic/source/comp/symtbl.cxx index 90b5553..bc38628 100644 --- a/basic/source/comp/symtbl.cxx +++ b/basic/source/comp/symtbl.cxx @@ -405,7 +405,7 @@ SbiProcDef::SbiProcDef( SbiParser* pParser, const OUString& rName, pPool->SetParent( &aParams ); nLine1 = nLine2 = 0; - mePropMode = PROPERTY_MODE_NONE; + mePropMode = PropertyMode::NONE; bPublic = true; bCdecl = false; bStatic = false; @@ -470,7 +470,7 @@ void SbiProcDef::Match( SbiProcDef* pOld ) void SbiProcDef::setPropertyMode( PropertyMode ePropMode ) { mePropMode = ePropMode; - if( mePropMode != PROPERTY_MODE_NONE ) + if( mePropMode != PropertyMode::NONE ) { // Prop name = original scanned procedure name maPropName = aName; @@ -480,10 +480,10 @@ void SbiProcDef::setPropertyMode( PropertyMode ePropMode ) OUString aCompleteProcName = "Property "; switch( mePropMode ) { - case PROPERTY_MODE_GET: aCompleteProcName += "Get "; break; - case PROPERTY_MODE_LET: aCompleteProcName += "Let "; break; - case PROPERTY_MODE_SET: aCompleteProcName += "Set "; break; - case PROPERTY_MODE_NONE: OSL_FAIL( "Illegal PropertyMode PROPERTY_MODE_NONE" ); break; + case PropertyMode::Get: aCompleteProcName += "Get "; break; + case PropertyMode::Let: aCompleteProcName += "Let "; break; + case PropertyMode::Set: aCompleteProcName += "Set "; break; + case PropertyMode::NONE: OSL_FAIL( "Illegal PropertyMode PropertyMode::NONE" ); break; } aCompleteProcName += aName; aName = aCompleteProcName; diff --git a/include/basic/sbdef.hxx b/include/basic/sbdef.hxx index 1444241..fa20115 100644 --- a/include/basic/sbdef.hxx +++ b/include/basic/sbdef.hxx @@ -55,12 +55,12 @@ BASIC_DLLPUBLIC void setBasicWatchMode( bool bOn ); #define SBX_HINT_BASICSTART SFX_HINT_USER04 #define SBX_HINT_BASICSTOP SFX_HINT_USER05 -enum PropertyMode +enum class PropertyMode { - PROPERTY_MODE_NONE, - PROPERTY_MODE_GET, - PROPERTY_MODE_LET, - PROPERTY_MODE_SET + NONE, + Get, + Let, + Set }; #endif commit 42f771d6e9c02c50acc49f7feb1a9b5d0a9368ae Author: Noel Grandin <[email protected]> Date: Wed Jun 3 14:31:19 2015 +0200 convert B2DLineJoin to scoped enum Change-Id: I4fb8f2c9e2080e3aa542d2ccf838e6784baa8429 diff --git a/basegfx/source/polygon/b2dlinegeometry.cxx b/basegfx/source/polygon/b2dlinegeometry.cxx index ddd215e..3b185b6 100644 --- a/basegfx/source/polygon/b2dlinegeometry.cxx +++ b/basegfx/source/polygon/b2dlinegeometry.cxx @@ -679,7 +679,7 @@ namespace basegfx double fMiterMinimumAngle) { OSL_ENSURE(fHalfLineWidth > 0.0, "createAreaGeometryForJoin: LineWidth too small (!)"); - OSL_ENSURE(B2DLINEJOIN_NONE != eJoin, "createAreaGeometryForJoin: B2DLINEJOIN_NONE not allowed (!)"); + OSL_ENSURE(B2DLineJoin::NONE != eJoin, "createAreaGeometryForJoin: B2DLineJoin::NONE not allowed (!)"); // LineJoin from tangent rPerpendPrev to tangent rPerpendEdge in rPoint B2DPolygon aEdgePolygon; @@ -688,20 +688,20 @@ namespace basegfx // test if for Miter, the angle is too small and the fallback // to bevel needs to be used - if(B2DLINEJOIN_MITER == eJoin) + if(B2DLineJoin::Miter == eJoin) { const double fAngle(fabs(rPerpendPrev.angle(rPerpendEdge))); if((F_PI - fAngle) < fMiterMinimumAngle) { // fallback to bevel - eJoin = B2DLINEJOIN_BEVEL; + eJoin = B2DLineJoin::Bevel; } } switch(eJoin) { - case B2DLINEJOIN_MITER : + case B2DLineJoin::Miter : { aEdgePolygon.append(aEndPoint); aEdgePolygon.append(rPoint); @@ -723,7 +723,7 @@ namespace basegfx break; } - case B2DLINEJOIN_ROUND : + case B2DLineJoin::Round : { // use tooling to add needed EllipseSegment double fAngleStart(atan2(rPerpendPrev.getY(), rPerpendPrev.getX())); @@ -760,7 +760,7 @@ namespace basegfx // wanted fall-through to default } } - default: // B2DLINEJOIN_BEVEL + default: // B2DLineJoin::Bevel { aEdgePolygon.append(aEndPoint); aEdgePolygon.append(rPoint); @@ -835,7 +835,7 @@ namespace basegfx B2DCubicBezier aEdge; B2DCubicBezier aPrev; - const bool bEventuallyCreateLineJoin(B2DLINEJOIN_NONE != eJoin); + const bool bEventuallyCreateLineJoin(B2DLineJoin::NONE != eJoin); // prepare edge aEdge.setStartPoint(aCandidate.getB2DPoint(0)); diff --git a/canvas/source/vcl/canvashelper.cxx b/canvas/source/vcl/canvashelper.cxx index 5f3ee58..4a83220 100644 --- a/canvas/source/vcl/canvashelper.cxx +++ b/canvas/source/vcl/canvashelper.cxx @@ -70,23 +70,23 @@ namespace vclcanvas switch( nJoinType ) { case rendering::PathJoinType::NONE: - return basegfx::B2DLINEJOIN_NONE; + return basegfx::B2DLineJoin::NONE; case rendering::PathJoinType::MITER: - return basegfx::B2DLINEJOIN_MITER; + return basegfx::B2DLineJoin::Miter; case rendering::PathJoinType::ROUND: - return basegfx::B2DLINEJOIN_ROUND; + return basegfx::B2DLineJoin::Round; case rendering::PathJoinType::BEVEL: - return basegfx::B2DLINEJOIN_BEVEL; + return basegfx::B2DLineJoin::Bevel; default: ENSURE_OR_THROW( false, "b2DJoineFromJoin(): Unexpected join type" ); } - return basegfx::B2DLINEJOIN_NONE; + return basegfx::B2DLineJoin::NONE; } drawing::LineCap unoCapeFromCap( sal_Int8 nCapType) diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx index 99c76b2..c1b3a17 100644 --- a/cppcanvas/source/mtfrenderer/implrenderer.cxx +++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx @@ -124,16 +124,16 @@ namespace switch(rLineInfo.GetLineJoin()) { - default: // B2DLINEJOIN_NONE, B2DLINEJOIN_MIDDLE + default: // B2DLineJoin::NONE, B2DLineJoin::Middle o_rStrokeAttributes.JoinType = rendering::PathJoinType::NONE; break; - case basegfx::B2DLINEJOIN_BEVEL: + case basegfx::B2DLineJoin::Bevel: o_rStrokeAttributes.JoinType = rendering::PathJoinType::BEVEL; break; - case basegfx::B2DLINEJOIN_MITER: + case basegfx::B2DLineJoin::Miter: o_rStrokeAttributes.JoinType = rendering::PathJoinType::MITER; break; - case basegfx::B2DLINEJOIN_ROUND: + case basegfx::B2DLineJoin::Round: o_rStrokeAttributes.JoinType = rendering::PathJoinType::ROUND; break; } diff --git a/drawinglayer/source/attribute/lineattribute.cxx b/drawinglayer/source/attribute/lineattribute.cxx index 6d22e56..c5c4cf4 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 f1842fa..778f242 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 9762a5b..9ff216a 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 c6bbfd2..92e48b1 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 b3d669f..e9a02d4 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 e5ffc58..13e937e 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 4bcf436..464f4e8 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 4c5602d..d71d42e 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 77039f3..3f204e3 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; diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx index 5c77259..7a7ff6d 100644 --- a/filter/source/graphicfilter/eps/eps.cxx +++ b/filter/source/graphicfilter/eps/eps.cxx @@ -753,10 +753,10 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ) const LineInfo& rLineInfo = static_cast<const MetaPolyLineAction*>(pMA)->GetLineInfo(); ImplWriteLineInfo( rLineInfo ); - if(basegfx::B2DLINEJOIN_NONE == rLineInfo.GetLineJoin() + if(basegfx::B2DLineJoin::NONE == rLineInfo.GetLineJoin() && rLineInfo.GetWidth() > 1) { - // emulate B2DLINEJOIN_NONE by creating single edges + // emulate B2DLineJoin::NONE by creating single edges const sal_uInt16 nPoints(aPoly.GetSize()); const bool bCurve(aPoly.HasFlags()); @@ -2480,18 +2480,18 @@ void PSWriter::ImplWriteLineInfo( const LineInfo& rLineInfo ) switch(rLineInfo.GetLineJoin()) { - default: // B2DLINEJOIN_NONE, B2DLINEJOIN_MIDDLE + default: // B2DLineJoin::NONE, B2DLineJoin::Middle // do NOT use SvtGraphicStroke::joinNone here // since it will be written as numerical value directly // and is NOT a valid EPS value break; - case basegfx::B2DLINEJOIN_MITER: + case basegfx::B2DLineJoin::Miter: aJoinType = SvtGraphicStroke::joinMiter; break; - case basegfx::B2DLINEJOIN_BEVEL: + case basegfx::B2DLineJoin::Bevel: aJoinType = SvtGraphicStroke::joinBevel; break; - case basegfx::B2DLINEJOIN_ROUND: + case basegfx::B2DLineJoin::Round: aJoinType = SvtGraphicStroke::joinRound; break; } diff --git a/filter/source/graphicfilter/ipict/shape.cxx b/filter/source/graphicfilter/ipict/shape.cxx index 2cfefbe..f5c4295 100644 --- a/filter/source/graphicfilter/ipict/shape.cxx +++ b/filter/source/graphicfilter/ipict/shape.cxx @@ -118,7 +118,7 @@ namespace PictReaderShape { B2DPolygon poly; poly.append(B2DPoint(double(orig.X()+decal[0]), double(orig.Y()+decal[1]))); poly.append(B2DPoint(double(dest.X()+decal[0]), double(dest.Y()+decal[1]))); - dev->DrawPolyLine(poly, double(penSize), basegfx::B2DLINEJOIN_NONE); + dev->DrawPolyLine(poly, double(penSize), basegfx::B2DLineJoin::NONE); } //-------------------- draws a rectangle -------------------- @@ -138,7 +138,7 @@ namespace PictReaderShape { poly.append(B2DPoint(X[0], Y[0])); if (drawFrame) - dev->DrawPolyLine(poly, double(penSize), basegfx::B2DLINEJOIN_NONE); + dev->DrawPolyLine(poly, double(penSize), basegfx::B2DLineJoin::NONE); else dev->DrawPolygon(poly); } @@ -153,7 +153,7 @@ namespace PictReaderShape { B2DPoint center(0.5*(X[1]+X[0]), 0.5*(Y[1]+Y[0])); B2DPolygon poly = basegfx::tools::createPolygonFromEllipse(center, 0.5*(X[1]-X[0]), 0.5*(Y[1]-Y[0])); if (drawFrame) - dev->DrawPolyLine(poly, double(penSize), basegfx::B2DLINEJOIN_NONE); + dev->DrawPolyLine(poly, double(penSize), basegfx::B2DLineJoin::NONE); else dev->DrawPolygon(poly); } @@ -186,7 +186,7 @@ namespace PictReaderShape { B2DPolygon poly = basegfx::tools::createPolygonFromEllipseSegment(center, 0.5*(X[1]-X[0]), 0.5*(Y[1]-Y[0]), angl1, angl2); if (drawFrame) - dev->DrawPolyLine(poly, double(penSize), basegfx::B2DLINEJOIN_NONE); + dev->DrawPolyLine(poly, double(penSize), basegfx::B2DLineJoin::NONE); else { // adds circle's center poly.append(center); @@ -210,7 +210,7 @@ namespace PictReaderShape { B2DPolygon poly = basegfx::tools::createPolygonFromRect(rect, (width != 0.0) ? ovalW/width : 0.0, (height != 0.0) ? ovalH/height : 0.0); if (drawFrame) - dev->DrawPolyLine(poly, double(penSize), basegfx::B2DLINEJOIN_NONE); + dev->DrawPolyLine(poly, double(penSize), basegfx::B2DLineJoin::NONE); else dev->DrawPolygon(poly); } @@ -248,7 +248,7 @@ namespace PictReaderShape { poly.append(B2DPoint(x, y)); } if (drawFrame) - dev->DrawPolyLine(poly, double(penSize), basegfx::B2DLINEJOIN_NONE); + dev->DrawPolyLine(poly, double(penSize), basegfx::B2DLineJoin::NONE); else dev->DrawPolygon(poly); } diff --git a/filter/source/svg/gfxtypes.hxx b/filter/source/svg/gfxtypes.hxx index a11b5d9..d51d74e 100644 --- a/filter/source/svg/gfxtypes.hxx +++ b/filter/source/svg/gfxtypes.hxx @@ -180,7 +180,7 @@ struct State maDashArray(), mnDashOffset(0.0), meLineCap(BUTT), - meLineJoin(basegfx::B2DLINEJOIN_MITER), + meLineJoin(basegfx::B2DLineJoin::Miter), mnMiterLimit(4.0), mnStrokeWidth(1.0), maViewportFillColor(1.0), diff --git a/filter/source/svg/svgreader.cxx b/filter/source/svg/svgreader.cxx index 8486336..0cf5f05 100644 --- a/filter/source/svg/svgreader.cxx +++ b/filter/source/svg/svgreader.cxx @@ -665,11 +665,11 @@ struct AnnotatingVisitor aVec *= maCurrState.maCTM; xAttrs->AddAttribute( "svg:stroke-width", OUString::number( pt2mm(aVec.getLength()) )+"mm"); } - if( maCurrState.meLineJoin == basegfx::B2DLINEJOIN_MITER ) + if( maCurrState.meLineJoin == basegfx::B2DLineJoin::Miter ) xAttrs->AddAttribute( "draw:stroke-linejoin", "miter"); - else if( maCurrState.meLineJoin == basegfx::B2DLINEJOIN_ROUND ) + else if( maCurrState.meLineJoin == basegfx::B2DLineJoin::Round ) xAttrs->AddAttribute( "draw:stroke-linejoin", "round"); - else if( maCurrState.meLineJoin == basegfx::B2DLINEJOIN_BEVEL ) + else if( maCurrState.meLineJoin == basegfx::B2DLineJoin::Bevel ) xAttrs->AddAttribute( "draw:stroke-linejoin", "bevel"); if( maCurrState.mnStrokeOpacity*maCurrState.mnOpacity != 1.0 ) xAttrs->AddAttribute( "svg:stroke-opacity", @@ -909,11 +909,11 @@ struct AnnotatingVisitor case XML_STROKE_LINEJOIN: { if( aValueUtf8 == "miter" ) - maCurrState.meLineJoin = basegfx::B2DLINEJOIN_MITER; + maCurrState.meLineJoin = basegfx::B2DLineJoin::Miter; else if( aValueUtf8 == "round" ) - maCurrState.meLineJoin = basegfx::B2DLINEJOIN_ROUND; + maCurrState.meLineJoin = basegfx::B2DLineJoin::Round; else if( aValueUtf8 == "bevel" ) - maCurrState.meLineJoin = basegfx::B2DLINEJOIN_BEVEL; + maCurrState.meLineJoin = basegfx::B2DLineJoin::Bevel; else if( aValueUtf8 == "inherit" ) maCurrState.meLineJoin = maParentStates.back().meLineJoin; break; diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx index 66953bc..50810f8 100644 --- a/filter/source/svg/svgwriter.cxx +++ b/filter/source/svg/svgwriter.cxx @@ -99,7 +99,7 @@ SVGAttributeWriter::SVGAttributeWriter( SVGExport& rExport, SVGFontExport& rFont , mrFontExport( rFontExport ) , mpElemFont( NULL ) , mpElemPaint( NULL ) - , maLineJoin(basegfx::B2DLINEJOIN_NONE) + , maLineJoin(basegfx::B2DLineJoin::NONE) , maLineCap(css::drawing::LineCap_BUTT) { } @@ -1879,18 +1879,18 @@ void SVGActionWriter::ImplAddLineAttr( const LineInfo &rAttrs, // support for LineJoint switch(rAttrs.GetLineJoin()) { - default: // B2DLINEJOIN_NONE, B2DLINEJOIN_MIDDLE - case basegfx::B2DLINEJOIN_MITER: + default: // B2DLineJoin::NONE, B2DLineJoin::Middle + case basegfx::B2DLineJoin::Miter: { mrExport.AddAttribute(XML_NAMESPACE_NONE, aXMLAttrStrokeLinejoin, "miter"); break; } - case basegfx::B2DLINEJOIN_BEVEL: + case basegfx::B2DLineJoin::Bevel: { mrExport.AddAttribute(XML_NAMESPACE_NONE, aXMLAttrStrokeLinejoin, "bevel"); break; } - case basegfx::B2DLINEJOIN_ROUND: + case basegfx::B2DLineJoin::Round: { mrExport.AddAttribute(XML_NAMESPACE_NONE, aXMLAttrStrokeLinejoin, "round"); break; @@ -1968,20 +1968,20 @@ void SVGActionWriter::ImplWriteShape( const SVGShapeDescriptor& rShape, bool bAp // support for LineJoin switch(rShape.maLineJoin) { - default: // B2DLINEJOIN_NONE, B2DLINEJOIN_MIDDLE - case basegfx::B2DLINEJOIN_MITER: + default: // B2DLineJoin::NONE, B2DLineJoin::Middle + case basegfx::B2DLineJoin::Miter: { // miter is Svg default, so no need to write until the exporter might write styles. // If this happens, activate here // mrExport.AddAttribute(XML_NAMESPACE_NONE, aXMLAttrStrokeLinejoin, "miter"); break; } - case basegfx::B2DLINEJOIN_BEVEL: + case basegfx::B2DLineJoin::Bevel: { mrExport.AddAttribute(XML_NAMESPACE_NONE, aXMLAttrStrokeLinejoin, "bevel"); break; } - case basegfx::B2DLINEJOIN_ROUND: + case basegfx::B2DLineJoin::Round: { mrExport.AddAttribute(XML_NAMESPACE_NONE, aXMLAttrStrokeLinejoin, "round"); break; @@ -3128,17 +3128,17 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, { default: /* SvtGraphicStroke::joinMiter, SvtGraphicStroke::joinNone */ { - mapCurShape->maLineJoin = basegfx::B2DLINEJOIN_MITER; + mapCurShape->maLineJoin = basegfx::B2DLineJoin::Miter; break; } case SvtGraphicStroke::joinRound: { - mapCurShape->maLineJoin = basegfx::B2DLINEJOIN_ROUND; + mapCurShape->maLineJoin = basegfx::B2DLineJoin::Round; break; } case SvtGraphicStroke::joinBevel: { - mapCurShape->maLineJoin = basegfx::B2DLINEJOIN_BEVEL; + mapCurShape->maLineJoin = basegfx::B2DLineJoin::Bevel; break; } } @@ -3171,7 +3171,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, mapCurShape->maShapeLineColor = Color(COL_TRANSPARENT); mapCurShape->mnStrokeWidth = 0; mapCurShape->maDashArray.clear(); - mapCurShape->maLineJoin = basegfx::B2DLINEJOIN_MITER; + mapCurShape->maLineJoin = basegfx::B2DLineJoin::Miter; mapCurShape->maLineCap = com::sun::star::drawing::LineCap_BUTT; if(aStartArrow.Count()) diff --git a/filter/source/svg/svgwriter.hxx b/filter/source/svg/svgwriter.hxx index 42efe63..8eb9cec 100644 --- a/filter/source/svg/svgwriter.hxx +++ b/filter/source/svg/svgwriter.hxx @@ -142,7 +142,7 @@ struct SVGShapeDescriptor maShapeFillColor( Color( COL_TRANSPARENT ) ), maShapeLineColor( Color( COL_TRANSPARENT ) ), mnStrokeWidth( 0 ), - maLineJoin(basegfx::B2DLINEJOIN_MITER), // miter is Svg 'stroke-linejoin' default + maLineJoin(basegfx::B2DLineJoin::Miter), // miter is Svg 'stroke-linejoin' default maLineCap(com::sun::star::drawing::LineCap_BUTT) // butt is Svg 'stroke-linecap' default { } diff --git a/include/basegfx/polygon/b2dlinegeometry.hxx b/include/basegfx/polygon/b2dlinegeometry.hxx index ca9fb18..534adbe 100644 --- a/include/basegfx/polygon/b2dlinegeometry.hxx +++ b/include/basegfx/polygon/b2dlinegeometry.hxx @@ -133,7 +133,7 @@ namespace basegfx BASEGFX_DLLPUBLIC B2DPolyPolygon createAreaGeometry( const B2DPolygon& rCandidate, double fHalfLineWidth, - B2DLineJoin eJoin = B2DLINEJOIN_ROUND, + B2DLineJoin eJoin = B2DLineJoin::Round, com::sun::star::drawing::LineCap eCap = com::sun::star::drawing::LineCap_BUTT, double fMaxAllowedAngle = (12.5 * F_PI180), double fMaxPartOfEdge = 0.4, diff --git a/include/basegfx/vector/b2enums.hxx b/include/basegfx/vector/b2enums.hxx index 80c242e..6383861 100644 --- a/include/basegfx/vector/b2enums.hxx +++ b/include/basegfx/vector/b2enums.hxx @@ -54,13 +54,13 @@ namespace basegfx /** Descriptor for possible line joins between two line segments */ - enum B2DLineJoin + enum class B2DLineJoin { - B2DLINEJOIN_NONE, // no rounding - B2DLINEJOIN_MIDDLE, // calc middle value between joints - B2DLINEJOIN_BEVEL, // join edges with line - B2DLINEJOIN_MITER, // extend till cut - B2DLINEJOIN_ROUND // create arc + NONE, // no rounding + Middle, // calc middle value between joints + Bevel, // join edges with line + Miter, // extend till cut + Round // create arc }; } // end of namespace basegfx diff --git a/include/drawinglayer/attribute/lineattribute.hxx b/include/drawinglayer/attribute/lineattribute.hxx index 7f65e8f..2e45752 100644 --- a/include/drawinglayer/attribute/lineattribute.hxx +++ b/include/drawinglayer/attribute/lineattribute.hxx @@ -56,7 +56,7 @@ namespace drawinglayer explicit LineAttribute( const basegfx::BColor& rColor, double fWidth = 0.0, - basegfx::B2DLineJoin aB2DLineJoin = basegfx::B2DLINEJOIN_ROUND, + basegfx::B2DLineJoin aB2DLineJoin = basegfx::B2DLineJoin::Round, com::sun::star::drawing::LineCap aLineCap = com::sun::star::drawing::LineCap_BUTT); LineAttribute(); LineAttribute(const LineAttribute& rCandidate); diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index 1754058..bbf0711 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -805,7 +805,7 @@ public: void DrawPolyLine( const basegfx::B2DPolygon&, double fLineWidth = 0.0, - basegfx::B2DLineJoin eLineJoin = basegfx::B2DLINEJOIN_ROUND, + basegfx::B2DLineJoin eLineJoin = basegfx::B2DLineJoin::Round, css::drawing::LineCap eLineCap = css::drawing::LineCap_BUTT); /** Render the given polygon as a line stroke @@ -827,7 +827,7 @@ public: const basegfx::B2DPolygon& rB2DPolygon, double fLineWidth = 0.0, double fTransparency = 0.0, - basegfx::B2DLineJoin eLineJoin = basegfx::B2DLINEJOIN_NONE, + basegfx::B2DLineJoin eLineJoin = basegfx::B2DLineJoin::NONE, css::drawing::LineCap eLineCap = css::drawing::LineCap_BUTT, bool bBypassAACheck = false ); private: diff --git a/svgio/source/svgreader/svgstyleattributes.cxx b/svgio/source/svgreader/svgstyleattributes.cxx index 4735887..1ca8d64 100644 --- a/svgio/source/svgreader/svgstyleattributes.cxx +++ b/svgio/source/svgreader/svgstyleattributes.cxx @@ -47,14 +47,14 @@ namespace svgio { if(StrokeLinejoin_round == aStrokeLinejoin) { - return basegfx::B2DLINEJOIN_ROUND; + return basegfx::B2DLineJoin::Round; } else if(StrokeLinejoin_bevel == aStrokeLinejoin) { - return basegfx::B2DLINEJOIN_BEVEL; + return basegfx::B2DLineJoin::Bevel; } - return basegfx::B2DLINEJOIN_MITER; + return basegfx::B2DLineJoin::Miter; } com::sun::star::drawing::LineCap StrokeLinecapToDrawingLineCap(StrokeLinecap aStrokeLinecap) diff --git a/svx/source/sdr/attribute/sdrformtextattribute.cxx b/svx/source/sdr/attribute/sdrformtextattribute.cxx index 03af4df..f4d7be6 100644 --- a/svx/source/sdr/attribute/sdrformtextattribute.cxx +++ b/svx/source/sdr/attribute/sdrformtextattribute.cxx @@ -58,23 +58,23 @@ namespace { case com::sun::star::drawing::LineJoint_MIDDLE : { - return basegfx::B2DLINEJOIN_MIDDLE; + return basegfx::B2DLineJoin::Middle; } case com::sun::star::drawing::LineJoint_BEVEL : { - return basegfx::B2DLINEJOIN_BEVEL; + return basegfx::B2DLineJoin::Bevel; } case com::sun::star::drawing::LineJoint_MITER : { - return basegfx::B2DLINEJOIN_MITER; + return basegfx::B2DLineJoin::Miter; } case com::sun::star::drawing::LineJoint_ROUND : { - return basegfx::B2DLINEJOIN_ROUND; + return basegfx::B2DLineJoin::Round; } default : // com::sun::star::drawing::LineJoint_NONE { - return basegfx::B2DLINEJOIN_NONE; // XLINEJOINT_NONE + return basegfx::B2DLineJoin::NONE; // XLINEJOINT_NONE } } } diff --git a/svx/source/sdr/primitive2d/sdrattributecreator.cxx b/svx/source/sdr/primitive2d/sdrattributecreator.cxx index 4ac6708..5222367 100644 --- a/svx/source/sdr/primitive2d/sdrattributecreator.cxx +++ b/svx/source/sdr/primitive2d/sdrattributecreator.cxx @@ -138,23 +138,23 @@ namespace drawinglayer { case com::sun::star::drawing::LineJoint_MIDDLE : { - return basegfx::B2DLINEJOIN_MIDDLE; + return basegfx::B2DLineJoin::Middle; } case com::sun::star::drawing::LineJoint_BEVEL : { - return basegfx::B2DLINEJOIN_BEVEL; + return basegfx::B2DLineJoin::Bevel; } case com::sun::star::drawing::LineJoint_MITER : { - return basegfx::B2DLINEJOIN_MITER; + return basegfx::B2DLineJoin::Miter; } case com::sun::star::drawing::LineJoint_ROUND : { - return basegfx::B2DLINEJOIN_ROUND; + return basegfx::B2DLineJoin::Round; } default : // com::sun::star::drawing::LineJoint_NONE { - return basegfx::B2DLINEJOIN_NONE; + return basegfx::B2DLineJoin::NONE; } } } diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx index 1c12fc4..6c58c10 100644 --- a/svx/source/svdraw/svdfmtf.cxx +++ b/svx/source/svdraw/svdfmtf.cxx @@ -88,7 +88,7 @@ ImpSdrGDIMetaFileImport::ImpSdrGDIMetaFileImport( mnLayer(nLay), maOldLineColor(), mnLineWidth(0), - maLineJoin(basegfx::B2DLINEJOIN_NONE), + maLineJoin(basegfx::B2DLineJoin::NONE), maLineCap(com::sun::star::drawing::LineCap_BUTT), maDash(css::drawing::DashStyle_RECT, 0, 0, 0, 0, 0), mbMov(false), @@ -355,19 +355,19 @@ void ImpSdrGDIMetaFileImport::SetAttributes(SdrObject* pObj, bool bForceTextAttr switch(maLineJoin) { - default : // basegfx::B2DLINEJOIN_NONE + default : // basegfx::B2DLineJoin::NONE mpLineAttr->Put(XLineJointItem(com::sun::star::drawing::LineJoint_NONE)); break; - case basegfx::B2DLINEJOIN_MIDDLE: + case basegfx::B2DLineJoin::Middle: mpLineAttr->Put(XLineJointItem(com::sun::star::drawing::LineJoint_MIDDLE)); break; - case basegfx::B2DLINEJOIN_BEVEL: + case basegfx::B2DLineJoin::Bevel: mpLineAttr->Put(XLineJointItem(com::sun::star::drawing::LineJoint_BEVEL)); break; - case basegfx::B2DLINEJOIN_MITER: + case basegfx::B2DLineJoin::Miter: mpLineAttr->Put(XLineJointItem(com::sun::star::drawing::LineJoint_MITER)); break; - case basegfx::B2DLINEJOIN_ROUND: + case basegfx::B2DLineJoin::Round: mpLineAttr->Put(XLineJointItem(com::sun::star::drawing::LineJoint_ROUND)); break; } @@ -707,7 +707,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaLineAction& rAct) rLineInfo.GetDistance()); SetAttributes(pPath); mnLineWidth = 0; - maLineJoin = basegfx::B2DLINEJOIN_NONE; + maLineJoin = basegfx::B2DLineJoin::NONE; maDash = XDash(); InsertObj(pPath, false); } @@ -933,7 +933,7 @@ void ImpSdrGDIMetaFileImport::DoAction( MetaPolyLineAction& rAct ) rLineInfo.GetDistance()); SetAttributes(pPath); mnLineWidth = 0; - maLineJoin = basegfx::B2DLINEJOIN_NONE; + maLineJoin = basegfx::B2DLineJoin::NONE; maDash = XDash(); InsertObj(pPath, false); } diff --git a/vcl/quartz/salgdicommon.cxx b/vcl/quartz/salgdicommon.cxx index 453ae5c..1464f18 100644 --- a/vcl/quartz/salgdicommon.cxx +++ b/vcl/quartz/salgdicommon.cxx @@ -960,10 +960,10 @@ bool AquaSalGraphics::drawPolyLine( } #endif - // #i101491# Aqua does not support B2DLINEJOIN_NONE; return false to use + // #i101491# Aqua does not support B2DLineJoin::NONE; return false to use // the fallback (own geometry preparation) // #i104886# linejoin-mode and thus the above only applies to "fat" lines - if( (basegfx::B2DLINEJOIN_NONE == eLineJoin) && + if( (basegfx::B2DLineJoin::NONE == eLineJoin) && (rLineWidths.getX() > 1.3) ) { DBG_DRAW_OPERATION_EXIT_EARLY("drawPolyLine"); @@ -974,11 +974,11 @@ bool AquaSalGraphics::drawPolyLine( CGLineJoin aCGLineJoin = kCGLineJoinMiter; switch( eLineJoin ) { - case ::basegfx::B2DLINEJOIN_NONE: aCGLineJoin = /*TODO?*/kCGLineJoinMiter; break; - case ::basegfx::B2DLINEJOIN_MIDDLE: aCGLineJoin = /*TODO?*/kCGLineJoinMiter; break; - case ::basegfx::B2DLINEJOIN_BEVEL: aCGLineJoin = kCGLineJoinBevel; break; - case ::basegfx::B2DLINEJOIN_MITER: aCGLineJoin = kCGLineJoinMiter; break; - case ::basegfx::B2DLINEJOIN_ROUND: aCGLineJoin = kCGLineJoinRound; break; + case ::basegfx::B2DLineJoin::NONE: aCGLineJoin = /*TODO?*/kCGLineJoinMiter; break; + case ::basegfx::B2DLineJoin::Middle: aCGLineJoin = /*TODO?*/kCGLineJoinMiter; break; + case ::basegfx::B2DLineJoin::Bevel: aCGLineJoin = kCGLineJoinBevel; break; + case ::basegfx::B2DLineJoin::Miter: aCGLineJoin = kCGLineJoinMiter; break; + case ::basegfx::B2DLineJoin::Round: aCGLineJoin = kCGLineJoinRound; break; } // setup cap attribute diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx index f02871d..71fc928 100644 --- a/vcl/source/filter/wmf/enhwmf.cxx +++ b/vcl/source/filter/wmf/enhwmf.cxx @@ -954,16 +954,16 @@ bool EnhWMFReader::ReadEnhWMF() switch( nStyle & 0xF000 ) { case PS_JOIN_ROUND : - aLineInfo.SetLineJoin ( basegfx::B2DLINEJOIN_ROUND ); + aLineInfo.SetLineJoin ( basegfx::B2DLineJoin::Round ); break; case PS_JOIN_MITER : - aLineInfo.SetLineJoin ( basegfx::B2DLINEJOIN_MITER ); + aLineInfo.SetLineJoin ( basegfx::B2DLineJoin::Miter ); break; case PS_JOIN_BEVEL : - aLineInfo.SetLineJoin ( basegfx::B2DLINEJOIN_BEVEL ); + aLineInfo.SetLineJoin ( basegfx::B2DLineJoin::Bevel ); break; default : - aLineInfo.SetLineJoin ( basegfx::B2DLINEJOIN_NONE ); + aLineInfo.SetLineJoin ( basegfx::B2DLineJoin::NONE ); } pOut->CreateObject( nIndex, GDI_PEN, new WinMtfLineStyle( ReadColor(), aLineInfo, bTransparent ) ); } diff --git a/vcl/source/filter/wmf/winwmf.cxx b/vcl/source/filter/wmf/winwmf.cxx index 028e7fc..59c6227 100644 --- a/vcl/source/filter/wmf/winwmf.cxx +++ b/vcl/source/filter/wmf/winwmf.cxx @@ -863,16 +863,16 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc ) switch( nStyle & 0xF000 ) { case PS_JOIN_ROUND : - aLineInfo.SetLineJoin ( basegfx::B2DLINEJOIN_ROUND ); + aLineInfo.SetLineJoin ( basegfx::B2DLineJoin::Round ); break; case PS_JOIN_MITER : - aLineInfo.SetLineJoin ( basegfx::B2DLINEJOIN_MITER ); + aLineInfo.SetLineJoin ( basegfx::B2DLineJoin::Miter ); break; case PS_JOIN_BEVEL : - aLineInfo.SetLineJoin ( basegfx::B2DLINEJOIN_BEVEL ); + aLineInfo.SetLineJoin ( basegfx::B2DLineJoin::Bevel ); break; default : - aLineInfo.SetLineJoin ( basegfx::B2DLINEJOIN_NONE ); + aLineInfo.SetLineJoin ( basegfx::B2DLineJoin::NONE ); } pOut->CreateObject( GDI_PEN, new WinMtfLineStyle( ReadColor(), aLineInfo, bTransparent ) ); } diff --git a/vcl/source/gdi/cvtsvm.cxx b/vcl/source/gdi/cvtsvm.cxx index ba8c530..7a559f1 100644 --- a/vcl/source/gdi/cvtsvm.cxx +++ b/vcl/source/gdi/cvtsvm.cxx @@ -1448,7 +1448,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, const MetaLineAction* pAct = static_cast<const MetaLineAction*>(pAction); const LineInfo& rInfo = pAct->GetLineInfo(); const bool bFatLine(!rInfo.IsDefault() && (LINE_NONE != rInfo.GetStyle())); - const bool bLineJoin(bFatLine && basegfx::B2DLINEJOIN_ROUND != rInfo.GetLineJoin()); + const bool bLineJoin(bFatLine && basegfx::B2DLineJoin::Round != rInfo.GetLineJoin()); const bool bLineCap(bFatLine && com::sun::star::drawing::LineCap_BUTT != rInfo.GetLineCap()); const bool bLineDashDot(LINE_DASH == rInfo.GetStyle()); @@ -1461,7 +1461,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, { rOStm.WriteInt16( GDI_LINEJOIN_ACTION ); rOStm.WriteInt32( 6 ); - rOStm.WriteInt16( rInfo.GetLineJoin() ); + rOStm.WriteInt16( static_cast<sal_Int16>(rInfo.GetLineJoin()) ); } if(bLineCap) @@ -1604,7 +1604,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, const LineInfo& rInfo = pAct->GetLineInfo(); const sal_uInt16 nPoints(aSimplePoly.GetSize()); const bool bFatLine(!rInfo.IsDefault() && (LINE_NONE != rInfo.GetStyle())); - const bool bLineJoin(bFatLine && basegfx::B2DLINEJOIN_ROUND != rInfo.GetLineJoin()); + const bool bLineJoin(bFatLine && basegfx::B2DLineJoin::Round != rInfo.GetLineJoin()); const bool bLineCap(bFatLine && com::sun::star::drawing::LineCap_BUTT != rInfo.GetLineCap()); const bool bLineDashDot(LINE_DASH == rInfo.GetStyle()); @@ -1617,7 +1617,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, { rOStm.WriteInt16( GDI_LINEJOIN_ACTION ); rOStm.WriteInt32( 6 ); - rOStm.WriteInt16( rInfo.GetLineJoin() ); + rOStm.WriteInt16( static_cast<sal_Int16>(rInfo.GetLineJoin()) ); } if(bLineCap) diff --git a/vcl/source/gdi/lineinfo.cxx b/vcl/source/gdi/lineinfo.cxx index fc6fe4f..55ec0ec 100644 --- a/vcl/source/gdi/lineinfo.cxx +++ b/vcl/source/gdi/lineinfo.cxx @@ -37,7 +37,7 @@ ImplLineInfo::ImplLineInfo() : mnDotCount ( 0 ), mnDotLen ( 0 ), mnDistance ( 0 ), - meLineJoin ( basegfx::B2DLINEJOIN_ROUND ), + meLineJoin ( basegfx::B2DLineJoin::Round ), meLineCap ( com::sun::star::drawing::LineCap_BUTT ) { } @@ -237,7 +237,7 @@ SvStream& WriteImplLineInfo( SvStream& rOStm, const ImplLineInfo& rImplLineInfo rOStm.WriteInt32( rImplLineInfo.mnDistance ); // since version3 - rOStm.WriteUInt16( rImplLineInfo.meLineJoin ); + rOStm.WriteUInt16( static_cast<sal_uInt16>(rImplLineInfo.meLineJoin) ); // since version4 rOStm.WriteUInt16( rImplLineInfo.meLineCap ); diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index e750d3a..5bd3227 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -1635,7 +1635,7 @@ bool PDFWriterImpl::PDFPage::appendLineInfo( const LineInfo& rInfo, OStringBuffe } } - if(basegfx::B2DLINEJOIN_NONE != rInfo.GetLineJoin()) + if(basegfx::B2DLineJoin::NONE != rInfo.GetLineJoin()) { // LineJoin used, ExtLineInfo required return false; @@ -10583,20 +10583,20 @@ void PDFWriterImpl::convertLineInfoToExtLineInfo( const LineInfo& rIn, PDFWriter // add LineJoin switch(rIn.GetLineJoin()) { - case basegfx::B2DLINEJOIN_BEVEL : + case basegfx::B2DLineJoin::Bevel : { rOut.m_eJoin = PDFWriter::joinBevel; break; } - default : // basegfx::B2DLINEJOIN_NONE : + default : // basegfx::B2DLineJoin::NONE : // Pdf has no 'none' lineJoin, default is miter - case basegfx::B2DLINEJOIN_MIDDLE : - case basegfx::B2DLINEJOIN_MITER : + case basegfx::B2DLineJoin::Middle : + case basegfx::B2DLineJoin::Miter : { rOut.m_eJoin = PDFWriter::joinMiter; break; } - case basegfx::B2DLINEJOIN_ROUND : + case basegfx::B2DLineJoin::Round : { rOut.m_eJoin = PDFWriter::joinRound; break; diff --git a/vcl/source/outdev/line.cxx b/vcl/source/outdev/line.cxx index f8eba4a..0f38a1b 100644 --- a/vcl/source/outdev/line.cxx +++ b/vcl/source/outdev/line.cxx @@ -133,7 +133,7 @@ void OutputDevice::DrawLine( const Point& rStartPt, const Point& rEndPt ) aB2DPolyLine = basegfx::tools::snapPointsOfHorizontalOrVerticalEdges(aB2DPolyLine); } - if( mpGraphics->DrawPolyLine( aB2DPolyLine, 0.0, aB2DLineWidth, basegfx::B2DLINEJOIN_NONE, css::drawing::LineCap_BUTT, this)) + if( mpGraphics->DrawPolyLine( aB2DPolyLine, 0.0, aB2DLineWidth, basegfx::B2DLineJoin::NONE, css::drawing::LineCap_BUTT, this)) { return; } @@ -235,7 +235,7 @@ void OutputDevice::drawLine( basegfx::B2DPolyPolygon aLinePolyPolygon, const Lin if(bTryAA) { - bDone = mpGraphics->DrawPolyLine( aCandidate, 0.0, basegfx::B2DVector(1.0,1.0), basegfx::B2DLINEJOIN_NONE, css::drawing::LineCap_BUTT, this); + bDone = mpGraphics->DrawPolyLine( aCandidate, 0.0, basegfx::B2DVector(1.0,1.0), basegfx::B2DLineJoin::NONE, css::drawing::LineCap_BUTT, this); } if(!bDone) diff --git a/vcl/source/outdev/polygon.cxx b/vcl/source/outdev/polygon.cxx index 208906d..754a8cd 100644 --- a/vcl/source/outdev/polygon.cxx +++ b/vcl/source/outdev/polygon.cxx @@ -92,7 +92,7 @@ void OutputDevice::DrawPolyPolygon( const tools::PolyPolygon& rPolyPoly ) bSuccess = mpGraphics->DrawPolyLine( aB2DPolyPolygon.getB2DPolygon(a), 0.0, aB2DLineWidth, - basegfx::B2DLINEJOIN_NONE, + basegfx::B2DLineJoin::NONE, css::drawing::LineCap_BUTT, this); } @@ -200,7 +200,7 @@ void OutputDevice::DrawPolygon( const Polygon& rPoly ) bSuccess = mpGraphics->DrawPolyLine( aB2DPolygon, 0.0, aB2DLineWidth, - basegfx::B2DLINEJOIN_NONE, + basegfx::B2DLineJoin::NONE, css::drawing::LineCap_BUTT, this); } @@ -302,7 +302,7 @@ void OutputDevice::ImplDrawPolyPolygonWithB2DPolyPolygon(const basegfx::B2DPolyP bSuccess = mpGraphics->DrawPolyLine( aB2DPolyPolygon.getB2DPolygon(a), 0.0, aB2DLineWidth, - basegfx::B2DLINEJOIN_NONE, + basegfx::B2DLineJoin::NONE, css::drawing::LineCap_BUTT, this); } diff --git a/vcl/source/outdev/polyline.cxx b/vcl/source/outdev/polyline.cxx index 3be82cf..eae524a 100644 --- a/vcl/source/outdev/polyline.cxx +++ b/vcl/source/outdev/polyline.cxx @@ -70,7 +70,7 @@ void OutputDevice::DrawPolyLine( const Polygon& rPoly ) } if(mpGraphics->DrawPolyLine( aB2DPolyLine, 0.0, aB2DLineWidth, - basegfx::B2DLINEJOIN_NONE, css::drawing::LineCap_BUTT, this)) + basegfx::B2DLineJoin::NONE, css::drawing::LineCap_BUTT, this)) { return; } @@ -205,7 +205,7 @@ void OutputDevice::DrawPolyLine( const basegfx::B2DPolygon& rB2DPolygon, // to avoid optical gaps for(sal_uInt32 a(0); a < aAreaPolyPolygon.count(); a++) { - DrawPolyLineDirect( aAreaPolyPolygon.getB2DPolygon(a), 0.0, 0.0, basegfx::B2DLINEJOIN_NONE, css::drawing::LineCap_BUTT, bTryAA ); + DrawPolyLineDirect( aAreaPolyPolygon.getB2DPolygon(a), 0.0, 0.0, basegfx::B2DLineJoin::NONE, css::drawing::LineCap_BUTT, bTryAA ); } } else diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx index 6827fc3..2275169 100644 --- a/vcl/source/outdev/transparent.cxx +++ b/vcl/source/outdev/transparent.cxx @@ -263,7 +263,7 @@ void OutputDevice::DrawTransparent( const basegfx::B2DPolyPolygon& rB2DPolyPoly, for( int nPolyIdx = 0; nPolyIdx < nPolyCount; ++nPolyIdx ) { const ::basegfx::B2DPolygon aOnePoly = aB2DPolyPolygon.getB2DPolygon( nPolyIdx ); - mpGraphics->DrawPolyLine( aOnePoly, fTransparency, aHairlineWidth, ::basegfx::B2DLINEJOIN_NONE, com::sun::star::drawing::LineCap_BUTT, this ); + mpGraphics->DrawPolyLine( aOnePoly, fTransparency, aHairlineWidth, ::basegfx::B2DLineJoin::NONE, com::sun::star::drawing::LineCap_BUTT, this ); } } @@ -360,7 +360,7 @@ bool OutputDevice::DrawTransparentNatively ( const tools::PolyPolygon& rPolyPoly { const ::basegfx::B2DPolygon& rPolygon = aB2DPolyPolygon.getB2DPolygon( nPolyIdx ); bDrawn = mpGraphics->DrawPolyLine( rPolygon, fTransparency, aLineWidths, - ::basegfx::B2DLINEJOIN_NONE, css::drawing::LineCap_BUTT, this ); + ::basegfx::B2DLineJoin::NONE, css::drawing::LineCap_BUTT, this ); } // prepare to restore the fill color mbInitFillColor = mbFillColor; diff --git a/vcl/win/source/gdi/gdiimpl.cxx b/vcl/win/source/gdi/gdiimpl.cxx index 16b7d4b..7da7df7 100644 --- a/vcl/win/source/gdi/gdiimpl.cxx +++ b/vcl/win/source/gdi/gdiimpl.cxx @@ -2077,7 +2077,7 @@ bool WinSalGraphicsImpl::drawPolyLine( switch(eLineJoin) { - default : // basegfx::B2DLINEJOIN_NONE : + default : // basegfx::B2DLineJoin::NONE : { if(basegfx::fTools::more(rLineWidths.getX(), 0.0)) { @@ -2085,20 +2085,20 @@ bool WinSalGraphicsImpl::drawPolyLine( } break; } - case basegfx::B2DLINEJOIN_BEVEL : + case basegfx::B2DLineJoin::Bevel : { Gdiplus::DllExports::GdipSetPenLineJoin(pTestPen, Gdiplus::LineJoinBevel); break; } - case basegfx::B2DLINEJOIN_MIDDLE : - case basegfx::B2DLINEJOIN_MITER : + case basegfx::B2DLineJoin::Middle : + case basegfx::B2DLineJoin::Miter : { const Gdiplus::REAL aMiterLimit(15.0); Gdiplus::DllExports::GdipSetPenMiterLimit(pTestPen, aMiterLimit); Gdiplus::DllExports::GdipSetPenLineJoin(pTestPen, Gdiplus::LineJoinMiter); break; } - case basegfx::B2DLINEJOIN_ROUND : + case basegfx::B2DLineJoin::Round : { Gdiplus::DllExports::GdipSetPenLineJoin(pTestPen, Gdiplus::LineJoinRound); break; diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx index 5d8a6c4..a61affa 100644 --- a/vcl/workben/vcldemo.cxx +++ b/vcl/workben/vcldemo.cxx @@ -249,10 +249,10 @@ public: drawing::LineCap_BUTT, drawing::LineCap_ROUND, drawing::LineCap_SQUARE, drawing::LineCap_BUTT }; ::basegfx::B2DLineJoin eJoins[] = { - basegfx::B2DLINEJOIN_NONE, basegfx::B2DLINEJOIN_MIDDLE, basegfx::B2DLINEJOIN_BEVEL, basegfx::B2DLINEJOIN_MITER, - basegfx::B2DLINEJOIN_ROUND, basegfx::B2DLINEJOIN_NONE, basegfx::B2DLINEJOIN_MIDDLE, basegfx::B2DLINEJOIN_BEVEL, - basegfx::B2DLINEJOIN_MITER, basegfx::B2DLINEJOIN_ROUND, basegfx::B2DLINEJOIN_NONE, basegfx::B2DLINEJOIN_MIDDLE, - basegfx::B2DLINEJOIN_BEVEL, basegfx::B2DLINEJOIN_MITER, basegfx::B2DLINEJOIN_ROUND, basegfx::B2DLINEJOIN_NONE + basegfx::B2DLineJoin::NONE, basegfx::B2DLineJoin::Middle, basegfx::B2DLineJoin::Bevel, basegfx::B2DLineJoin::Miter, + basegfx::B2DLineJoin::Round, basegfx::B2DLineJoin::NONE, basegfx::B2DLineJoin::Middle, basegfx::B2DLineJoin::Bevel, + basegfx::B2DLineJoin::Miter, basegfx::B2DLineJoin::Round, basegfx::B2DLineJoin::NONE, basegfx::B2DLineJoin::Middle, + basegfx::B2DLineJoin::Bevel, basegfx::B2DLineJoin::Miter, basegfx::B2DLineJoin::Round, basegfx::B2DLineJoin::NONE }; double aLineWidths[] = { 10.0, 15.0, 20.0, 10.0, commit 1d92933d96d94819fa3a4ae2de9519874f9b92b6 Author: Noel Grandin <[email protected]> Date: Wed Jun 3 12:54:32 2015 +0200 convert B2VectorContinuity to scoped enum Change-Id: Ifa401dd0d2d1bef8c0ae2987d2aee86100b59816 diff --git a/basegfx/source/polygon/b2dpolygon.cxx b/basegfx/source/polygon/b2dpolygon.cxx index 096c4a0..fb7a98f 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 41b40f4..1384461 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 7a76f07..3ba9423 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 2a923e1..f3a4765 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 4c23f51..a922317 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 6abd542..96d76bf 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 f1ba178..80c242e 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 e15ac0d..c684916 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 9d559ff..a4fa289 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 e8dacc2..e01f72a 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; } commit 397a0afd3b3dd597f23bfbc75543eaead8bab5d2 Author: Noel Grandin <[email protected]> Date: Wed Jun 3 09:32:33 2015 +0200 convert B2VectorOrientation to scoped enum Change-Id: Id7e444bc896ae5d52e5a0bd1b471679c4945afa4 diff --git a/basegfx/source/polygon/b2dlinegeometry.cxx b/basegfx/source/polygon/b2dlinegeometry.cxx index 860161d..ddd215e 100644 --- a/basegfx/source/polygon/b2dlinegeometry.cxx +++ b/basegfx/source/polygon/b2dlinegeometry.cxx @@ -864,7 +864,7 @@ namespace basegfx B2DVector aTangentEdge(aEdge.getTangent(0.0)); aTangentEdge.normalize(); B2VectorOrientation aOrientation(getOrientation(aTangentPrev, aTangentEdge)); - if(ORIENTATION_NEUTRAL == aOrientation) + if(B2VectorOrientation::Neutral == aOrientation) { // they are parallell or empty; if they are both not zero and point // in opposite direction, a half-circle is needed @@ -876,12 +876,12 @@ namespace basegfx { // for half-circle production, fallback to positive // orientation - aOrientation = ORIENTATION_POSITIVE; + aOrientation = B2VectorOrientation::Positive; } } } - if(ORIENTATION_POSITIVE == aOrientation) + if(B2VectorOrientation::Positive == aOrientation) { const B2DVector aPerpendPrev(getPerpendicular(aTangentPrev) * -fHalfLineWidth); const B2DVector aPerpendEdge(getPerpendicular(aTangentEdge) * -fHalfLineWidth); @@ -897,7 +897,7 @@ namespace basegfx eJoin, fMiterMinimumAngle)); } - else if(ORIENTATION_NEGATIVE == aOrientation) + else if(B2VectorOrientation::Negative == aOrientation) { const B2DVector aPerpendPrev(getPerpendicular(aTangentPrev) * fHalfLineWidth); const B2DVector aPerpendEdge(getPerpendicular(aTangentEdge) * fHalfLineWidth); diff --git a/basegfx/source/polygon/b2dpolygontools.cxx b/basegfx/source/polygon/b2dpolygontools.cxx index 02c44d8..41b40f4 100644 --- a/basegfx/source/polygon/b2dpolygontools.cxx +++ b/basegfx/source/polygon/b2dpolygontools.cxx @@ -138,7 +138,7 @@ namespace basegfx B2VectorOrientation getOrientation(const B2DPolygon& rCandidate) { - B2VectorOrientation eRetval(ORIENTATION_NEUTRAL); + B2VectorOrientation eRetval(B2VectorOrientation::Neutral); if(rCandidate.count() > 2L || rCandidate.areControlPointsUsed()) { @@ -146,15 +146,15 @@ namespace basegfx if(fTools::equalZero(fSignedArea)) { - // ORIENTATION_NEUTRAL, already set + // B2VectorOrientation::Neutral, already set } if(fSignedArea > 0.0) { - eRetval = ORIENTATION_POSITIVE; + eRetval = B2VectorOrientation::Positive; } else if(fSignedArea < 0.0) { - eRetval = ORIENTATION_NEGATIVE; + eRetval = B2VectorOrientation::Negative; } } @@ -1981,7 +1981,7 @@ namespace basegfx const B2DVector aNextVec(aNextPoint - aCurrPoint); const B2VectorOrientation aOrientation(getOrientation(aNextVec, aPrevVec)); - if(ORIENTATION_NEUTRAL == aOrientation) + if(B2VectorOrientation::Neutral == aOrientation) { // current has neutral orientation return true; @@ -2014,7 +2014,7 @@ namespace basegfx const B2DVector aNextVec(aNextPoint - aCurrPoint); const B2VectorOrientation aOrientation(getOrientation(aNextVec, aPrevVec)); - if(ORIENTATION_NEUTRAL == aOrientation) + if(B2VectorOrientation::Neutral == aOrientation) { // current has neutral orientation, leave it out and prepare next aCurrPoint = aNextPoint; @@ -2030,7 +2030,7 @@ namespace basegfx } } - while(aRetval.count() && ORIENTATION_NEUTRAL == getOrientationForIndex(aRetval, 0L)) + while(aRetval.count() && B2VectorOrientation::Neutral == getOrientationForIndex(aRetval, 0L)) { aRetval.remove(0L); } @@ -2056,7 +2056,7 @@ namespace basegfx const B2DPoint aPrevPoint(rCandidate.getB2DPoint(nPointCount - 1L)); B2DPoint aCurrPoint(rCandidate.getB2DPoint(0L)); B2DVector aCurrVec(aPrevPoint - aCurrPoint); - B2VectorOrientation aOrientation(ORIENTATION_NEUTRAL); + B2VectorOrientation aOrientation(B2VectorOrientation::Neutral); for(sal_uInt32 a(0L); a < nPointCount; a++) { @@ -2064,14 +2064,14 @@ namespace basegfx const B2DVector aNextVec(aNextPoint - aCurrPoint); const B2VectorOrientation aCurrentOrientation(getOrientation(aNextVec, aCurrVec)); - if(ORIENTATION_NEUTRAL == aOrientation) + if(B2VectorOrientation::Neutral == aOrientation) { // set start value, maybe neutral again aOrientation = aCurrentOrientation; } else { - if(ORIENTATION_NEUTRAL != aCurrentOrientation && aCurrentOrientation != aOrientation) + if(B2VectorOrientation::Neutral != aCurrentOrientation && aCurrentOrientation != aOrientation) { // different orientations found, that's it return false; @@ -2674,7 +2674,7 @@ namespace basegfx aVectorNext.normalize(); const B2VectorOrientation aOrientation(getOrientation(aVectorPrev, aVectorNext)); - if(ORIENTATION_NEUTRAL == aOrientation && aVectorPrev.scalar(aVectorNext) < 0.0) + if(B2VectorOrientation::Neutral == aOrientation && aVectorPrev.scalar(aVectorNext) < 0.0) { // parallel and opposite direction; check length if(fTools::equal(fLenPrev, fLenNext)) @@ -2696,7 +2696,7 @@ namespace basegfx // not parallel or same direction, set vectors and length const B2DVector aNormalizedPerpendicular(getNormalizedPerpendicular(aVectorPrev + aVectorNext)); - if(ORIENTATION_POSITIVE == aOrientation) + if(B2VectorOrientation::Positive == aOrientation) { rCandidate.setControlPoints(nIndex, aCurrentPoint - (aNormalizedPerpendicular * fLenPrev), @@ -2726,7 +2726,7 @@ namespace basegfx aVectorNext.normalize(); const B2VectorOrientation aOrientation(getOrientation(aVectorPrev, aVectorNext)); - if(ORIENTATION_NEUTRAL == aOrientation && aVectorPrev.scalar(aVectorNext) < 0.0) + if(B2VectorOrientation::Neutral == aOrientation && aVectorPrev.scalar(aVectorNext) < 0.0) { // parallel and opposite direction; set length. Use one direction for better numerical correctness const B2DVector aScaledDirection(aVectorPrev * fCommonLength); @@ -2741,7 +2741,7 @@ namespace basegfx const B2DVector aNormalizedPerpendicular(getNormalizedPerpendicular(aVectorPrev + aVectorNext)); const B2DVector aPerpendicular(aNormalizedPerpendicular * fCommonLength); - if(ORIENTATION_POSITIVE == aOrientation) + if(B2VectorOrientation::Positive == aOrientation) { rCandidate.setControlPoints(nIndex, aCurrentPoint - aPerpendicular, diff --git a/basegfx/source/polygon/b2dpolygontriangulator.cxx b/basegfx/source/polygon/b2dpolygontriangulator.cxx index 0f02913..27ebf64 100644 --- a/basegfx/source/polygon/b2dpolygontriangulator.cxx +++ b/basegfx/source/polygon/b2dpolygontriangulator.cxx @@ -284,7 +284,7 @@ namespace basegfx const B2DVector aLeft(pEdgeA->getEnd() - pEdgeA->getStart()); const B2DVector aRight(pEdgeB->getEnd() - pEdgeA->getStart()); - if(ORIENTATION_NEUTRAL == getOrientation(aLeft, aRight)) + if(B2VectorOrientation::Neutral == getOrientation(aLeft, aRight)) { // edges are parallel and have different length -> neutral triangle, // delete both edges and handle closing edge diff --git a/basegfx/source/polygon/b2dpolypolygoncutter.cxx b/basegfx/source/polygon/b2dpolypolygoncutter.cxx index c0d080b..106e217 100644 --- a/basegfx/source/polygon/b2dpolypolygoncutter.cxx +++ b/basegfx/source/polygon/b2dpolypolygoncutter.cxx @@ -713,7 +713,7 @@ namespace basegfx { const B2DPolygon aCandidate(rCandidate.getB2DPolygon(a)); - if(ORIENTATION_NEUTRAL != tools::getOrientation(aCandidate)) + if(B2VectorOrientation::Neutral != tools::getOrientation(aCandidate)) { aRetval.append(aCandidate); } @@ -756,7 +756,7 @@ namespace basegfx pNewHelper->meOrinetation = tools::getOrientation(aCand); // initialize with own orientation - pNewHelper->mnDepth = (ORIENTATION_NEGATIVE == pNewHelper->meOrinetation ? -1 : 1); + pNewHelper->mnDepth = (B2VectorOrientation::Negative == pNewHelper->meOrinetation ? -1 : 1); } for(a = 0; a < nCount - 1; a++) @@ -773,7 +773,7 @@ namespace basegfx if(bAInB) { // A is inside B, add orientation of B to A - rHelperA.mnDepth += (ORIENTATION_NEGATIVE == rHelperB.meOrinetation ? -1 : 1); + rHelperA.mnDepth += (B2VectorOrientation::Negative == rHelperB.meOrinetation ? -1 : 1); } const bool bBInA(rHelperA.maRange.isInside(rHelperB.maRange) && tools::isInside(aCandA, aCandB, true)); @@ -781,7 +781,7 @@ namespace basegfx if(bBInA) { // B is inside A, add orientation of A to B - rHelperB.mnDepth += (ORIENTATION_NEGATIVE == rHelperA.meOrinetation ? -1 : 1); + rHelperB.mnDepth += (B2VectorOrientation::Negative == rHelperA.meOrinetation ? -1 : 1); } } } @@ -817,7 +817,7 @@ namespace basegfx { if(nCount == 1L) { - if(!bKeepAboveZero && ORIENTATION_POSITIVE == tools::getOrientation(rCandidate.getB2DPolygon(0L))) + if(!bKeepAboveZero && B2VectorOrientation::Positive == tools::getOrientation(rCandidate.getB2DPolygon(0L))) { aRetval = rCandidate; } @@ -834,7 +834,7 @@ namespace basegfx StripHelper* pNewHelper = &(aHelpers[a]); pNewHelper->maRange = tools::getRange(aCandidate); pNewHelper->meOrinetation = tools::getOrientation(aCandidate); - pNewHelper->mnDepth = (ORIENTATION_NEGATIVE == pNewHelper->meOrinetation ? -1L : 0L); + pNewHelper->mnDepth = (B2VectorOrientation::Negative == pNewHelper->meOrinetation ? -1L : 0L); } for(a = 0L; a < nCount - 1L; a++) @@ -870,7 +870,7 @@ namespace basegfx { if(bAInB) { - if(ORIENTATION_NEGATIVE == rHelperB.meOrinetation) + if(B2VectorOrientation::Negative == rHelperB.meOrinetation) { rHelperA.mnDepth--; } @@ -881,7 +881,7 @@ namespace basegfx } else if(bBInA) { - if(ORIENTATION_NEGATIVE == rHelperA.meOrinetation) + if(B2VectorOrientation::Negative == rHelperA.meOrinetation) { rHelperB.mnDepth--; } diff --git a/basegfx/source/polygon/b2dpolypolygontools.cxx b/basegfx/source/polygon/b2dpolypolygontools.cxx index 3752621..5dc1cbc 100644 --- a/basegfx/source/polygon/b2dpolypolygontools.cxx +++ b/basegfx/source/polygon/b2dpolypolygontools.cxx @@ -55,9 +55,9 @@ namespace basegfx } const bool bShallBeHole(1L == (nDepth & 0x00000001)); - const bool bIsHole(ORIENTATION_NEGATIVE == aOrientation); + const bool bIsHole(B2VectorOrientation::Negative == aOrientation); - if(bShallBeHole != bIsHole && ORIENTATION_NEUTRAL != aOrientation) + if(bShallBeHole != bIsHole && B2VectorOrientation::Neutral != aOrientation) { B2DPolygon aFlipped(aCandidate); aFlipped.flip(); diff --git a/basegfx/source/range/b2drangeclipper.cxx b/basegfx/source/range/b2drangeclipper.cxx index edbb128..a62f44e 100644 --- a/basegfx/source/range/b2drangeclipper.cxx +++ b/basegfx/source/range/b2drangeclipper.cxx @@ -570,7 +570,7 @@ namespace basegfx SweepLineEvent( rCurrRect.getMinX(), rCurrRect, SweepLineEvent::STARTING_EDGE, - (*aCurrOrientation++) == ORIENTATION_POSITIVE ? + (*aCurrOrientation++) == B2VectorOrientation::Positive ? SweepLineEvent::PROCEED_UP : SweepLineEvent::PROCEED_DOWN) ); } @@ -586,7 +586,7 @@ namespace basegfx SweepLineEvent( rCurrRect.getMaxX(), rCurrRect, SweepLineEvent::FINISHING_EDGE, - (*aCurrOrientationR++) == ORIENTATION_POSITIVE ? + (*aCurrOrientationR++) == B2VectorOrientation::Positive ? SweepLineEvent::PROCEED_DOWN : SweepLineEvent::PROCEED_UP ) ); } diff --git a/basegfx/source/tools/b2dclipstate.cxx b/basegfx/source/tools/b2dclipstate.cxx index 54d2797..90e5b31 100644 --- a/basegfx/source/tools/b2dclipstate.cxx +++ b/basegfx/source/tools/b2dclipstate.cxx @@ -102,7 +102,7 @@ namespace tools mePendingOps = eOp; maPendingRanges.appendElement( rRange, - ORIENTATION_POSITIVE); + B2VectorOrientation::Positive); } void addPolyPolygon(B2DPolyPolygon aPoly, Operation eOp) diff --git a/basegfx/source/vector/b2dvector.cxx b/basegfx/source/vector/b2dvector.cxx index 2a08fab..4c23f51 100644 --- a/basegfx/source/vector/b2dvector.cxx +++ b/basegfx/source/vector/b2dvector.cxx @@ -129,16 +129,16 @@ namespace basegfx if(fTools::equalZero(fVal)) { - return ORIENTATION_NEUTRAL; + return B2VectorOrientation::Neutral; } if(fVal > 0.0) { - return ORIENTATION_POSITIVE; + return B2VectorOrientation::Positive; } else { - return ORIENTATION_NEGATIVE; + return B2VectorOrientation::Negative; } } diff --git a/basegfx/test/basegfx2d.cxx b/basegfx/test/basegfx2d.cxx index 8f06c6f..6abd542 100644 --- a/basegfx/test/basegfx2d.cxx +++ b/basegfx/test/basegfx2d.cxx @@ -288,8 +288,8 @@ public: void check() { B2DPolyRange aRange; - aRange.appendElement(B2DRange(0,0,1,1),ORIENTATION_POSITIVE); - aRange.appendElement(B2DRange(2,2,3,3),ORIENTATION_POSITIVE); + aRange.appendElement(B2DRange(0,0,1,1),B2VectorOrientation::Positive); + aRange.appendElement(B2DRange(2,2,3,3),B2VectorOrientation::Positive); CPPUNIT_ASSERT_MESSAGE("simple poly range - count", aRange.count() == 2); @@ -302,7 +302,7 @@ public: const B2DRange aRect(0,0,1,1); CPPUNIT_ASSERT_MESSAGE("createPolygonFromRect - correct orientation", tools::getOrientation( - tools::createPolygonFromRect(aRect)) == ORIENTATION_POSITIVE ); + tools::createPolygonFromRect(aRect)) == B2VectorOrientation::Positive ); } // Change the following lines only, if you add, remove or rename diff --git a/basegfx/test/boxclipper.cxx b/basegfx/test/boxclipper.cxx index c7ff411..ca2f634 100644 --- a/basegfx/test/boxclipper.cxx +++ b/basegfx/test/boxclipper.cxx @@ -96,58 +96,58 @@ public: B2DRange aEast2 (50, -150, 350, 150); B2DRange aWest2 (-50, -150,-350, 150); - aDisjunctRanges.appendElement( aCenter, ORIENTATION_NEGATIVE ); - aDisjunctRanges.appendElement( aOffside, ORIENTATION_NEGATIVE ); + aDisjunctRanges.appendElement( aCenter, B2VectorOrientation::Negative ); + aDisjunctRanges.appendElement( aOffside, B2VectorOrientation::Negative ); - aEqualRanges.appendElement( aCenter, ORIENTATION_NEGATIVE ); - aEqualRanges.appendElement( aCenter, ORIENTATION_NEGATIVE ); + aEqualRanges.appendElement( aCenter, B2VectorOrientation::Negative ); + aEqualRanges.appendElement( aCenter, B2VectorOrientation::Negative ); - aIntersectionN.appendElement( aCenter, ORIENTATION_NEGATIVE ); - aIntersectionN.appendElement( aNorth, ORIENTATION_NEGATIVE ); + aIntersectionN.appendElement( aCenter, B2VectorOrientation::Negative ); + aIntersectionN.appendElement( aNorth, B2VectorOrientation::Negative ); - aIntersectionE.appendElement( aCenter, ORIENTATION_NEGATIVE ); - aIntersectionE.appendElement( aEast, ORIENTATION_NEGATIVE ); + aIntersectionE.appendElement( aCenter, B2VectorOrientation::Negative ); + aIntersectionE.appendElement( aEast, B2VectorOrientation::Negative ); - aIntersectionS.appendElement( aCenter, ORIENTATION_NEGATIVE ); - aIntersectionS.appendElement( aSouth, ORIENTATION_NEGATIVE ); + aIntersectionS.appendElement( aCenter, B2VectorOrientation::Negative ); + aIntersectionS.appendElement( aSouth, B2VectorOrientation::Negative ); - aIntersectionW.appendElement( aCenter, ORIENTATION_NEGATIVE ); - aIntersectionW.appendElement( aWest, ORIENTATION_NEGATIVE ); + aIntersectionW.appendElement( aCenter, B2VectorOrientation::Negative ); + aIntersectionW.appendElement( aWest, B2VectorOrientation::Negative ); - aIntersectionNE.appendElement( aCenter, ORIENTATION_NEGATIVE ); - aIntersectionNE.appendElement( aNorthEast, ORIENTATION_NEGATIVE ); + aIntersectionNE.appendElement( aCenter, B2VectorOrientation::Negative ); + aIntersectionNE.appendElement( aNorthEast, B2VectorOrientation::Negative ); - aIntersectionSE.appendElement( aCenter, ORIENTATION_NEGATIVE ); - aIntersectionSE.appendElement( aSouthEast, ORIENTATION_NEGATIVE ); + aIntersectionSE.appendElement( aCenter, B2VectorOrientation::Negative ); + aIntersectionSE.appendElement( aSouthEast, B2VectorOrientation::Negative ); - aIntersectionSW.appendElement( aCenter, ORIENTATION_NEGATIVE ); - aIntersectionSW.appendElement( aSouthWest, ORIENTATION_NEGATIVE ); + aIntersectionSW.appendElement( aCenter, B2VectorOrientation::Negative ); + aIntersectionSW.appendElement( aSouthWest, B2VectorOrientation::Negative ); - aIntersectionNW.appendElement( aCenter, ORIENTATION_NEGATIVE ); - aIntersectionNW.appendElement( aNorthWest, ORIENTATION_NEGATIVE ); + aIntersectionNW.appendElement( aCenter, B2VectorOrientation::Negative ); + aIntersectionNW.appendElement( aNorthWest, B2VectorOrientation::Negative ); - aRingIntersection.appendElement( aNorth2, ORIENTATION_NEGATIVE ); - aRingIntersection.appendElement( aEast2, ORIENTATION_NEGATIVE ); - aRingIntersection.appendElement( aSouth2, ORIENTATION_NEGATIVE ); + aRingIntersection.appendElement( aNorth2, B2VectorOrientation::Negative ); + aRingIntersection.appendElement( aEast2, B2VectorOrientation::Negative ); + aRingIntersection.appendElement( aSouth2, B2VectorOrientation::Negative ); aRingIntersection2 = aRingIntersection; - aRingIntersection2.appendElement( aWest2, ORIENTATION_NEGATIVE ); + aRingIntersection2.appendElement( aWest2, B2VectorOrientation::Negative ); aRingIntersectExtraStrip = aRingIntersection2; aRingIntersectExtraStrip.appendElement( B2DRange(0, -25, 200, 25), - ORIENTATION_NEGATIVE ); - - aComplexIntersections.appendElement( aCenter, ORIENTATION_NEGATIVE ); - aComplexIntersections.appendElement( aOffside, ORIENTATION_NEGATIVE ); - aComplexIntersections.appendElement( aCenter, ORIENTATION_NEGATIVE ); - aComplexIntersections.appendElement( aNorth, ORIENTATION_NEGATIVE ); - aComplexIntersections.appendElement( aEast, ORIENTATION_NEGATIVE ); - aComplexIntersections.appendElement( aSouth, ORIENTATION_NEGATIVE ); - aComplexIntersections.appendElement( aWest, ORIENTATION_NEGATIVE ); - aComplexIntersections.appendElement( aNorthEast, ORIENTATION_NEGATIVE ); - aComplexIntersections.appendElement( aSouthEast, ORIENTATION_NEGATIVE ); - aComplexIntersections.appendElement( aSouthWest, ORIENTATION_NEGATIVE ); - aComplexIntersections.appendElement( aNorthWest, ORIENTATION_NEGATIVE ); + B2VectorOrientation::Negative ); + + aComplexIntersections.appendElement( aCenter, B2VectorOrientation::Negative ); + aComplexIntersections.appendElement( aOffside, B2VectorOrientation::Negative ); + aComplexIntersections.appendElement( aCenter, B2VectorOrientation::Negative ); + aComplexIntersections.appendElement( aNorth, B2VectorOrientation::Negative ); + aComplexIntersections.appendElement( aEast, B2VectorOrientation::Negative ); + aComplexIntersections.appendElement( aSouth, B2VectorOrientation::Negative ); + aComplexIntersections.appendElement( aWest, B2VectorOrientation::Negative ); + aComplexIntersections.appendElement( aNorthEast, B2VectorOrientation::Negative ); + aComplexIntersections.appendElement( aSouthEast, B2VectorOrientation::Negative ); + aComplexIntersections.appendElement( aSouthWest, B2VectorOrientation::Negative ); + aComplexIntersections.appendElement( aNorthWest, B2VectorOrientation::Negative ); #ifdef GENERATE_RANDOM for( int i=0; i<800; ++i ) @@ -158,7 +158,7 @@ public: getRandomOrdinal( 1000 ), getRandomOrdinal( 1000 ) ); - aRandomIntersections.appendElement( aRandomRange, ORIENTATION_NEGATIVE ); + aRandomIntersections.appendElement( aRandomRange, B2VectorOrientation::Negative ); } #else const char* randomSvg="m394 783h404v57h-404zm-197-505h571v576h-571zm356-634h75v200h-75zm-40-113h403v588h-403zm93-811h111v494h-111zm-364-619h562v121h-562zm-134-8h292v27h-292zm110 356h621v486h-621zm78-386h228v25h-228zm475-345h201v201h-201zm-2-93h122v126h-122zm-417-243h567v524h-567zm-266-738h863v456h-863zm262-333h315v698h-315zm-328-826h43v393h-43zm830-219h120v664h-120zm-311-636h221v109h-221zm-500 137h628v19h-628zm681-94h211v493h-211zm-366-646h384v355h-384zm-189-199h715v247h-715zm165-459h563v601h-563zm258-479h98v606h-98zm270-517h65v218h-65zm-44-259h96v286h-96zm-599-202h705v468h-705zm216-803h450v494h-450zm-150-22h26v167h-26zm-55-599h50v260h-50zm190-278h490v387h-490zm-290-453h634v392h-634zm257 189h552v300h-552zm-151-690h136v455h-136zm12-597h488v432h-488zm501-459h48v39h-48zm-224-112h429v22h-429zm-281 102h492v621h-492zm519-158h208v17h-208zm-681-563h56v427h-56zm126-451h615v392h-615zm-47-410h598v522h-598zm-32 316h79v110h-79zm-71-129h18v127h-18zm126-993h743v589h-743zm211-430h428v750h-4 28zm61-554h100v220h-100zm-353-49h658v157h-658zm778-383h115v272h-115zm-249-541h119v712h-119zm203 86h94v40h-94z"; @@ -174,7 +174,7 @@ public: boost::bind( &B2DPolygon::getB2DRange, _1), - ORIENTATION_NEGATIVE, + B2VectorOrientation::Negative, 1)); #endif } @@ -189,7 +189,7 @@ public: for( sal_uInt32 i=0; i<rPoly.count(); ++i ) { B2DPolygon aTmp=rPoly.getB2DPolygon(i); - if( ORIENTATION_NEGATIVE == tools::getOrientation(aTmp) ) + if( B2VectorOrientation::Negative == tools::getOrientation(aTmp) ) aTmp.flip(); aTmp=tools::removeNeutralPoints(aTmp); @@ -353,7 +353,7 @@ public: for( sal_uInt32 i=0; i<nCount; ++i ) { B2DPolygon aRect=tools::createPolygonFromRect(std::get<0>(rRange.getElement(i))); - if( std::get<1>(rRange.getElement(i)) == ORIENTATION_NEGATIVE ) + if( std::get<1>(rRange.getElement(i)) == B2VectorOrientation::Negative ) ... etc. - the rest is truncated _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
