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 /vcl | |
parent | 1d92933d96d94819fa3a4ae2de9519874f9b92b6 (diff) |
convert B2DLineJoin to scoped enum
Change-Id: I4fb8f2c9e2080e3aa542d2ccf838e6784baa8429
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/quartz/salgdicommon.cxx | 14 | ||||
-rw-r--r-- | vcl/source/filter/wmf/enhwmf.cxx | 8 | ||||
-rw-r--r-- | vcl/source/filter/wmf/winwmf.cxx | 8 | ||||
-rw-r--r-- | vcl/source/gdi/cvtsvm.cxx | 8 | ||||
-rw-r--r-- | vcl/source/gdi/lineinfo.cxx | 4 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 12 | ||||
-rw-r--r-- | vcl/source/outdev/line.cxx | 4 | ||||
-rw-r--r-- | vcl/source/outdev/polygon.cxx | 6 | ||||
-rw-r--r-- | vcl/source/outdev/polyline.cxx | 4 | ||||
-rw-r--r-- | vcl/source/outdev/transparent.cxx | 4 | ||||
-rw-r--r-- | vcl/win/source/gdi/gdiimpl.cxx | 10 | ||||
-rw-r--r-- | vcl/workben/vcldemo.cxx | 8 |
12 files changed, 45 insertions, 45 deletions
diff --git a/vcl/quartz/salgdicommon.cxx b/vcl/quartz/salgdicommon.cxx index 453ae5c1f0d7..1464f18ce323 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 f02871de2bd3..71fc928323cd 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 028e7fc675d3..59c622732539 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 ba8c530f6818..7a559f12a760 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 fc6fe4f6e7a8..55ec0ecdc8a2 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 e750d3a3bfcf..5bd32277186f 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 f8eba4ab6089..0f38a1b9ff5d 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 208906d7c766..754a8cd70349 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 3be82cfadd9a..eae524a2c38f 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 6827fc3b0f30..2275169eb4f0 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 16b7d4b1d576..7da7df7eb3be 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 5d8a6c4c33d1..a61affa0e4bf 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, |