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 /filter | |
parent | convert B2VectorContinuity to scoped enum (diff) | |
download | core-42f771d6e9c02c50acc49f7feb1a9b5d0a9368ae.tar.gz core-42f771d6e9c02c50acc49f7feb1a9b5d0a9368ae.zip |
convert B2DLineJoin to scoped enum
Change-Id: I4fb8f2c9e2080e3aa542d2ccf838e6784baa8429
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/graphicfilter/eps/eps.cxx | 12 | ||||
-rw-r--r-- | filter/source/graphicfilter/ipict/shape.cxx | 12 | ||||
-rw-r--r-- | filter/source/svg/gfxtypes.hxx | 2 | ||||
-rw-r--r-- | filter/source/svg/svgreader.cxx | 12 | ||||
-rw-r--r-- | filter/source/svg/svgwriter.cxx | 26 | ||||
-rw-r--r-- | filter/source/svg/svgwriter.hxx | 2 |
6 files changed, 33 insertions, 33 deletions
diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx index 5c772590f5c8..7a7ff6d56476 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 2cfefbe29b76..f5c4295f8b3d 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 a11b5d98c33e..d51d74ec849f 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 8486336aafbf..0cf5f0585803 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 66953bca518a..50810f856b41 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 42efe63add03..8eb9cecc35af 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 { } |