diff options
author | Noel Grandin <noel@peralex.com> | 2016-09-02 08:36:23 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-09-05 08:21:46 +0200 |
commit | 65ca57a447bae97714b1b32aa2df5705215a95ad (patch) | |
tree | 9b62f8fb4a890d5fcba13abc446b3244e9c5232f /vcl | |
parent | a881fd7e66294ada222e1d618a7d47a0549a2342 (diff) |
convert LineStyle to scoped enum
Change-Id: I30cfa5a0649b806604c443f55683d1f2a430983d
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/filter/wmf/enhwmf.cxx | 24 | ||||
-rw-r--r-- | vcl/source/filter/wmf/winmtf.cxx | 16 | ||||
-rw-r--r-- | vcl/source/filter/wmf/winwmf.cxx | 12 | ||||
-rw-r--r-- | vcl/source/filter/wmf/wmfwr.cxx | 4 | ||||
-rw-r--r-- | vcl/source/gdi/lineinfo.cxx | 8 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 10 | ||||
-rw-r--r-- | vcl/source/gdi/svmconverter.cxx | 16 | ||||
-rw-r--r-- | vcl/source/outdev/line.cxx | 6 | ||||
-rw-r--r-- | vcl/source/outdev/map.cxx | 4 | ||||
-rw-r--r-- | vcl/source/outdev/polyline.cxx | 6 | ||||
-rw-r--r-- | vcl/source/window/dockmgr.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/split.cxx | 2 | ||||
-rw-r--r-- | vcl/workben/outdevgrind.cxx | 2 | ||||
-rw-r--r-- | vcl/workben/svptest.cxx | 2 |
14 files changed, 57 insertions, 57 deletions
diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx index c8f72a909d1c..9b3a42a8b47e 100644 --- a/vcl/source/filter/wmf/enhwmf.cxx +++ b/vcl/source/filter/wmf/enhwmf.cxx @@ -918,33 +918,33 @@ bool EnhWMFReader::ReadEnhWMF() switch( nStyle & PS_STYLE_MASK ) { case PS_DASHDOTDOT : - aLineInfo.SetStyle( LINE_DASH ); + aLineInfo.SetStyle( LineStyle::Dash ); aLineInfo.SetDashCount( 1 ); aLineInfo.SetDotCount( 2 ); break; case PS_DASHDOT : - aLineInfo.SetStyle( LINE_DASH ); + aLineInfo.SetStyle( LineStyle::Dash ); aLineInfo.SetDashCount( 1 ); aLineInfo.SetDotCount( 1 ); break; case PS_DOT : - aLineInfo.SetStyle( LINE_DASH ); + aLineInfo.SetStyle( LineStyle::Dash ); aLineInfo.SetDashCount( 0 ); aLineInfo.SetDotCount( 1 ); break; case PS_DASH : - aLineInfo.SetStyle( LINE_DASH ); + aLineInfo.SetStyle( LineStyle::Dash ); aLineInfo.SetDashCount( 1 ); aLineInfo.SetDotCount( 0 ); break; case PS_NULL : bTransparent = true; - aLineInfo.SetStyle( LINE_NONE ); + aLineInfo.SetStyle( LineStyle::NONE ); break; case PS_INSIDEFRAME : case PS_SOLID : default : - aLineInfo.SetStyle( LINE_SOLID ); + aLineInfo.SetStyle( LineStyle::Solid ); } switch( nStyle & PS_ENDCAP_STYLE_MASK ) { @@ -1007,34 +1007,34 @@ bool EnhWMFReader::ReadEnhWMF() switch( nStyle & PS_STYLE_MASK ) { case PS_DASHDOTDOT : - aLineInfo.SetStyle( LINE_DASH ); + aLineInfo.SetStyle( LineStyle::Dash ); aLineInfo.SetDashCount( 1 ); aLineInfo.SetDotCount( 2 ); break; case PS_DASHDOT : - aLineInfo.SetStyle( LINE_DASH ); + aLineInfo.SetStyle( LineStyle::Dash ); aLineInfo.SetDashCount( 1 ); aLineInfo.SetDotCount( 1 ); break; case PS_DOT : - aLineInfo.SetStyle( LINE_DASH ); + aLineInfo.SetStyle( LineStyle::Dash ); aLineInfo.SetDashCount( 0 ); aLineInfo.SetDotCount( 1 ); break; case PS_DASH : - aLineInfo.SetStyle( LINE_DASH ); + aLineInfo.SetStyle( LineStyle::Dash ); aLineInfo.SetDashCount( 1 ); aLineInfo.SetDotCount( 0 ); break; case PS_NULL : bTransparent = true; - aLineInfo.SetStyle( LINE_NONE ); + aLineInfo.SetStyle( LineStyle::NONE ); break; case PS_INSIDEFRAME : case PS_SOLID : default : - aLineInfo.SetStyle( LINE_SOLID ); + aLineInfo.SetStyle( LineStyle::Solid ); } switch( nStyle & PS_ENDCAP_STYLE_MASK ) { diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx index de2a01294102..f7fd07e33c99 100644 --- a/vcl/source/filter/wmf/winmtf.cxx +++ b/vcl/source/filter/wmf/winmtf.cxx @@ -747,7 +747,7 @@ void WinMtfOutput::CreateObjectIndexed( sal_Int32 nIndex, std::unique_ptr<GDIObj Size aSize(pLineStyle->aLineInfo.GetWidth(), 0); pLineStyle->aLineInfo.SetWidth( ImplMap(aSize).Width() ); - if ( pLineStyle->aLineInfo.GetStyle() == LINE_DASH ) + if ( pLineStyle->aLineInfo.GetStyle() == LineStyle::Dash ) { aSize.Width() += 1; long nDotLen = ImplMap( aSize ).Width(); @@ -1065,7 +1065,7 @@ void WinMtfOutput::DrawRect( const Rectangle& rRect, bool bEdge ) { if ( bEdge ) { - if ( maLineStyle.aLineInfo.GetWidth() || ( maLineStyle.aLineInfo.GetStyle() == LINE_DASH ) ) + if ( maLineStyle.aLineInfo.GetWidth() || ( maLineStyle.aLineInfo.GetStyle() == LineStyle::Dash ) ) { ImplSetNonPersistentLineColorTransparenz(); mpGDIMetaFile->AddAction( new MetaRectAction( ImplMap( rRect ) ) ); @@ -1099,7 +1099,7 @@ void WinMtfOutput::DrawEllipse( const Rectangle& rRect ) UpdateClipRegion(); UpdateFillStyle(); - if ( maLineStyle.aLineInfo.GetWidth() || ( maLineStyle.aLineInfo.GetStyle() == LINE_DASH ) ) + if ( maLineStyle.aLineInfo.GetWidth() || ( maLineStyle.aLineInfo.GetStyle() == LineStyle::Dash ) ) { Point aCenter( ImplMap( rRect.Center() ) ); Size aRad( ImplMap( Size( rRect.GetWidth() / 2, rRect.GetHeight() / 2 ) ) ); @@ -1126,7 +1126,7 @@ void WinMtfOutput::DrawArc( const Rectangle& rRect, const Point& rStart, const P Point aStart( ImplMap( rStart ) ); Point aEnd( ImplMap( rEnd ) ); - if ( maLineStyle.aLineInfo.GetWidth() || ( maLineStyle.aLineInfo.GetStyle() == LINE_DASH ) ) + if ( maLineStyle.aLineInfo.GetWidth() || ( maLineStyle.aLineInfo.GetStyle() == LineStyle::Dash ) ) { if ( aStart == aEnd ) { // SJ: #i53768# if start & end is identical, then we have to draw a full ellipse @@ -1154,7 +1154,7 @@ void WinMtfOutput::DrawPie( const Rectangle& rRect, const Point& rStart, const P Point aStart( ImplMap( rStart ) ); Point aEnd( ImplMap( rEnd ) ); - if ( maLineStyle.aLineInfo.GetWidth() || ( maLineStyle.aLineInfo.GetStyle() == LINE_DASH ) ) + if ( maLineStyle.aLineInfo.GetWidth() || ( maLineStyle.aLineInfo.GetStyle() == LineStyle::Dash ) ) { ImplSetNonPersistentLineColorTransparenz(); mpGDIMetaFile->AddAction( new MetaPieAction( aRect, aStart, aEnd ) ); @@ -1177,7 +1177,7 @@ void WinMtfOutput::DrawChord( const Rectangle& rRect, const Point& rStart, const Point aStart( ImplMap( rStart ) ); Point aEnd( ImplMap( rEnd ) ); - if ( maLineStyle.aLineInfo.GetWidth() || ( maLineStyle.aLineInfo.GetStyle() == LINE_DASH ) ) + if ( maLineStyle.aLineInfo.GetWidth() || ( maLineStyle.aLineInfo.GetStyle() == LineStyle::Dash ) ) { ImplSetNonPersistentLineColorTransparenz(); mpGDIMetaFile->AddAction( new MetaChordAction( aRect, aStart, aEnd ) ); @@ -1210,7 +1210,7 @@ void WinMtfOutput::DrawPolygon( tools::Polygon& rPolygon, bool bRecordPath ) } else { - if ( maLineStyle.aLineInfo.GetWidth() || ( maLineStyle.aLineInfo.GetStyle() == LINE_DASH ) ) + if ( maLineStyle.aLineInfo.GetWidth() || ( maLineStyle.aLineInfo.GetStyle() == LineStyle::Dash ) ) { sal_uInt16 nCount = rPolygon.GetSize(); if ( nCount ) @@ -1285,7 +1285,7 @@ void WinMtfOutput::DrawPolyPolygon( tools::PolyPolygon& rPolyPolygon, bool bReco { UpdateLineStyle(); mpGDIMetaFile->AddAction( new MetaPolyPolygonAction( rPolyPolygon ) ); - if (maLineStyle.aLineInfo.GetWidth() > 0 || maLineStyle.aLineInfo.GetStyle() == LINE_DASH) + if (maLineStyle.aLineInfo.GetWidth() > 0 || maLineStyle.aLineInfo.GetStyle() == LineStyle::Dash) { for (sal_uInt16 nPoly = 0; nPoly < rPolyPolygon.Count(); ++nPoly) { diff --git a/vcl/source/filter/wmf/winwmf.cxx b/vcl/source/filter/wmf/winwmf.cxx index 06431af03f88..e66f3ed8d8a0 100644 --- a/vcl/source/filter/wmf/winwmf.cxx +++ b/vcl/source/filter/wmf/winwmf.cxx @@ -816,33 +816,33 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc ) switch( nStyle & 0xFF ) { case PS_DASHDOTDOT : - aLineInfo.SetStyle( LINE_DASH ); + aLineInfo.SetStyle( LineStyle::Dash ); aLineInfo.SetDashCount( 1 ); aLineInfo.SetDotCount( 2 ); break; case PS_DASHDOT : - aLineInfo.SetStyle( LINE_DASH ); + aLineInfo.SetStyle( LineStyle::Dash ); aLineInfo.SetDashCount( 1 ); aLineInfo.SetDotCount( 1 ); break; case PS_DOT : - aLineInfo.SetStyle( LINE_DASH ); + aLineInfo.SetStyle( LineStyle::Dash ); aLineInfo.SetDashCount( 0 ); aLineInfo.SetDotCount( 1 ); break; case PS_DASH : - aLineInfo.SetStyle( LINE_DASH ); + aLineInfo.SetStyle( LineStyle::Dash ); aLineInfo.SetDashCount( 1 ); aLineInfo.SetDotCount( 0 ); break; case PS_NULL : bTransparent = true; - aLineInfo.SetStyle( LINE_NONE ); + aLineInfo.SetStyle( LineStyle::NONE ); break; default : case PS_INSIDEFRAME : case PS_SOLID : - aLineInfo.SetStyle( LINE_SOLID ); + aLineInfo.SetStyle( LineStyle::Solid ); } switch( nStyle & 0xF00 ) { diff --git a/vcl/source/filter/wmf/wmfwr.cxx b/vcl/source/filter/wmf/wmfwr.cxx index 9bf1431e83b1..dfdb36e21e1d 100644 --- a/vcl/source/filter/wmf/wmfwr.cxx +++ b/vcl/source/filter/wmf/wmfwr.cxx @@ -375,7 +375,7 @@ void WMFWriter::WMFRecord_CreatePenIndirect(const Color& rColor, const LineInfo& sal_uInt16 nStyle = rColor == Color( COL_TRANSPARENT ) ? W_PS_NULL : W_PS_SOLID; switch( rLineInfo.GetStyle() ) { - case LINE_DASH : + case LineStyle::Dash : { if ( rLineInfo.GetDotCount() ) { @@ -393,7 +393,7 @@ void WMFWriter::WMFRecord_CreatePenIndirect(const Color& rColor, const LineInfo& nStyle = W_PS_DASH; } break; - case LINE_NONE : + case LineStyle::NONE : nStyle = W_PS_NULL; break; default: diff --git a/vcl/source/gdi/lineinfo.cxx b/vcl/source/gdi/lineinfo.cxx index 608ce4d7b995..a82d82cf2103 100644 --- a/vcl/source/gdi/lineinfo.cxx +++ b/vcl/source/gdi/lineinfo.cxx @@ -28,7 +28,7 @@ ImplLineInfo::ImplLineInfo() : - meStyle ( LINE_SOLID ), + meStyle ( LineStyle::Solid ), mnWidth ( 0 ), mnDashCount ( 0 ), mnDashLen ( 0 ), @@ -157,7 +157,7 @@ void LineInfo::SetLineCap(css::drawing::LineCap eLineCap) bool LineInfo::IsDefault() const { return( !mpImplLineInfo->mnWidth - && ( LINE_SOLID == mpImplLineInfo->meStyle ) + && ( LineStyle::Solid == mpImplLineInfo->meStyle ) && ( css::drawing::LineCap_BUTT == mpImplLineInfo->meLineCap)); } @@ -202,7 +202,7 @@ SvStream& WriteLineInfo( SvStream& rOStm, const LineInfo& rLineInfo ) VersionCompat aCompat( rOStm, StreamMode::WRITE, 4 ); // version 1 - rOStm.WriteUInt16( rLineInfo.mpImplLineInfo->meStyle ) + rOStm.WriteUInt16( (sal_uInt16)rLineInfo.mpImplLineInfo->meStyle ) .WriteInt32( rLineInfo.mpImplLineInfo->mnWidth ); // since version2 @@ -229,7 +229,7 @@ void LineInfo::applyToB2DPolyPolygon( if(io_rLinePolyPolygon.count()) { - if(LINE_DASH == GetStyle()) + if(LineStyle::Dash == GetStyle()) { ::std::vector< double > fDotDashArray; const double fDashLen(GetDashLen()); diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 6a62eacc9e28..5f232b1f688d 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -330,7 +330,7 @@ void doTestCode() aWriter.EndStructureElement(); aWriter.EndStructureElement(); - LineInfo aLI( LINE_DASH, 3 ); + LineInfo aLI( LineStyle::Dash, 3 ); aLI.SetDashCount( 2 ); aLI.SetDashLen( 50 ); aLI.SetDotCount( 2 ); @@ -1604,7 +1604,7 @@ void PDFWriterImpl::PDFPage::appendMappedLength( double fLength, OStringBuffer& bool PDFWriterImpl::PDFPage::appendLineInfo( const LineInfo& rInfo, OStringBuffer& rBuffer ) const { - if(LINE_DASH == rInfo.GetStyle() && rInfo.GetDashLen() != rInfo.GetDotLen()) + if(LineStyle::Dash == rInfo.GetStyle() && rInfo.GetDashLen() != rInfo.GetDotLen()) { // dashed and non-degraded case, check for implementation limits of dash array // in PDF reader apps (e.g. acroread) @@ -1626,7 +1626,7 @@ bool PDFWriterImpl::PDFPage::appendLineInfo( const LineInfo& rInfo, OStringBuffe return false; } - if( rInfo.GetStyle() == LINE_DASH ) + if( rInfo.GetStyle() == LineStyle::Dash ) { rBuffer.append( "[ " ); if( rInfo.GetDashLen() == rInfo.GetDotLen() ) // degraded case @@ -9365,7 +9365,7 @@ void PDFWriterImpl::drawLine( const Point& rStart, const Point& rStop, const Lin if( m_aGraphicsStack.front().m_aLineColor == Color( COL_TRANSPARENT ) ) return; - if( rInfo.GetStyle() == LINE_SOLID && rInfo.GetWidth() < 2 ) + if( rInfo.GetStyle() == LineStyle::Solid && rInfo.GetWidth() < 2 ) { drawLine( rStart, rStop ); return; @@ -10418,7 +10418,7 @@ void PDFWriterImpl::drawPolyLine( const tools::Polygon& rPoly, const LineInfo& r void PDFWriterImpl::convertLineInfoToExtLineInfo( const LineInfo& rIn, PDFWriter::ExtLineInfo& rOut ) { - SAL_WARN_IF( rIn.GetStyle() != LINE_DASH, "vcl", "invalid conversion" ); + SAL_WARN_IF( rIn.GetStyle() != LineStyle::Dash, "vcl", "invalid conversion" ); rOut.m_fLineWidth = rIn.GetWidth(); rOut.m_fTransparency = 0.0; rOut.m_eCap = PDFWriter::capButt; diff --git a/vcl/source/gdi/svmconverter.cxx b/vcl/source/gdi/svmconverter.cxx index 7086c21d8d30..e25df3127dcc 100644 --- a/vcl/source/gdi/svmconverter.cxx +++ b/vcl/source/gdi/svmconverter.cxx @@ -497,7 +497,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) return; } - LineInfo aLineInfo( LINE_NONE, 0 ); + LineInfo aLineInfo( LineStyle::NONE, 0 ); ::std::stack< LineInfo* > aLIStack; ScopedVclPtrInstance< VirtualDevice > aFontVDev; rtl_TextEncoding eActualCharSet = osl_getThreadTextEncoding(); @@ -588,7 +588,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) || (aLineInfo.GetDotCount() && aLineInfo.GetDotLen())) && aLineInfo.GetDistance()) { - aLineInfo.SetStyle(LINE_DASH); + aLineInfo.SetStyle(LineStyle::Dash); } } break; @@ -997,7 +997,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) ImplReadColor( rIStm, aActionColor ); rIStm.ReadInt32( nPenWidth ).ReadInt16( nPenStyle ); - aLineInfo.SetStyle( nPenStyle ? LINE_SOLID : LINE_NONE ); + aLineInfo.SetStyle( nPenStyle ? LineStyle::Solid : LineStyle::NONE ); aLineInfo.SetWidth( nPenWidth ); bFatLine = nPenStyle && !aLineInfo.IsDefault(); @@ -1154,7 +1154,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) { aLineInfo = *pLineInfo; delete pLineInfo; - bFatLine = ( LINE_NONE != aLineInfo.GetStyle() ) && !aLineInfo.IsDefault(); + bFatLine = ( LineStyle::NONE != aLineInfo.GetStyle() ) && !aLineInfo.IsDefault(); } rMtf.AddAction( new MetaPopAction() ); @@ -1448,10 +1448,10 @@ 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 bFatLine(!rInfo.IsDefault() && (LineStyle::NONE != rInfo.GetStyle())); const bool bLineJoin(bFatLine && basegfx::B2DLineJoin::Round != rInfo.GetLineJoin()); const bool bLineCap(bFatLine && css::drawing::LineCap_BUTT != rInfo.GetLineCap()); - const bool bLineDashDot(LINE_DASH == rInfo.GetStyle()); + const bool bLineDashDot(LineStyle::Dash == rInfo.GetStyle()); if( bFatLine ) { @@ -1604,10 +1604,10 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, pAct->GetPolygon().AdaptiveSubdivide(aSimplePoly); const LineInfo& rInfo = pAct->GetLineInfo(); const sal_uInt16 nPoints(aSimplePoly.GetSize()); - const bool bFatLine(!rInfo.IsDefault() && (LINE_NONE != rInfo.GetStyle())); + const bool bFatLine(!rInfo.IsDefault() && (LineStyle::NONE != rInfo.GetStyle())); const bool bLineJoin(bFatLine && basegfx::B2DLineJoin::Round != rInfo.GetLineJoin()); const bool bLineCap(bFatLine && css::drawing::LineCap_BUTT != rInfo.GetLineCap()); - const bool bLineDashDot(LINE_DASH == rInfo.GetStyle()); + const bool bLineDashDot(LineStyle::Dash == rInfo.GetStyle()); if( bFatLine ) { diff --git a/vcl/source/outdev/line.cxx b/vcl/source/outdev/line.cxx index 990efb555e34..83c755893d71 100644 --- a/vcl/source/outdev/line.cxx +++ b/vcl/source/outdev/line.cxx @@ -47,7 +47,7 @@ void OutputDevice::DrawLine( const Point& rStartPt, const Point& rEndPt, if ( mpMetaFile ) mpMetaFile->AddAction( new MetaLineAction( rStartPt, rEndPt, rLineInfo ) ); - if ( !IsDeviceOutputNecessary() || !mbLineColor || ( LINE_NONE == rLineInfo.GetStyle() ) || ImplIsRecordLayout() ) + if ( !IsDeviceOutputNecessary() || !mbLineColor || ( LineStyle::NONE == rLineInfo.GetStyle() ) || ImplIsRecordLayout() ) return; if( !mpGraphics ) @@ -65,7 +65,7 @@ void OutputDevice::DrawLine( const Point& rStartPt, const Point& rEndPt, const Point aStartPt( ImplLogicToDevicePixel( rStartPt ) ); const Point aEndPt( ImplLogicToDevicePixel( rEndPt ) ); const LineInfo aInfo( ImplLogicToDevicePixel( rLineInfo ) ); - const bool bDashUsed(LINE_DASH == aInfo.GetStyle()); + const bool bDashUsed(LineStyle::Dash == aInfo.GetStyle()); const bool bLineWidthUsed(aInfo.GetWidth() > 1); if ( mbInitLineColor ) @@ -163,7 +163,7 @@ void OutputDevice::drawLine( basegfx::B2DPolyPolygon aLinePolyPolygon, const Lin && RasterOp::OverPaint == GetRasterOp() && IsLineColor()); basegfx::B2DPolyPolygon aFillPolyPolygon; - const bool bDashUsed(LINE_DASH == rInfo.GetStyle()); + const bool bDashUsed(LineStyle::Dash == rInfo.GetStyle()); const bool bLineWidthUsed(rInfo.GetWidth() > 1); if(bDashUsed && aLinePolyPolygon.count()) diff --git a/vcl/source/outdev/map.cxx b/vcl/source/outdev/map.cxx index 871407dec5d3..24ca3306604e 100644 --- a/vcl/source/outdev/map.cxx +++ b/vcl/source/outdev/map.cxx @@ -593,7 +593,7 @@ LineInfo OutputDevice::ImplLogicToDevicePixel( const LineInfo& rLineInfo ) const { LineInfo aInfo( rLineInfo ); - if( aInfo.GetStyle() == LINE_DASH ) + if( aInfo.GetStyle() == LineStyle::Dash ) { if( aInfo.GetDotCount() && aInfo.GetDotLen() ) aInfo.SetDotLen( std::max( ImplLogicWidthToDevicePixel( aInfo.GetDotLen() ), 1L ) ); @@ -608,7 +608,7 @@ LineInfo OutputDevice::ImplLogicToDevicePixel( const LineInfo& rLineInfo ) const aInfo.SetDistance( ImplLogicWidthToDevicePixel( aInfo.GetDistance() ) ); if( ( !aInfo.GetDashCount() && !aInfo.GetDotCount() ) || !aInfo.GetDistance() ) - aInfo.SetStyle( LINE_SOLID ); + aInfo.SetStyle( LineStyle::Solid ); } aInfo.SetWidth( ImplLogicWidthToDevicePixel( aInfo.GetWidth() ) ); diff --git a/vcl/source/outdev/polyline.cxx b/vcl/source/outdev/polyline.cxx index 289d7926acff..b3e47804ef75 100644 --- a/vcl/source/outdev/polyline.cxx +++ b/vcl/source/outdev/polyline.cxx @@ -121,7 +121,7 @@ void OutputDevice::DrawPolyLine( const tools::Polygon& rPoly, const LineInfo& rL // #i101491# // Try direct Fallback to B2D-Version of DrawPolyLine if((mnAntialiasing & AntialiasingFlags::EnableB2dDraw) && - LINE_SOLID == rLineInfo.GetStyle()) + LineStyle::Solid == rLineInfo.GetStyle()) { DrawPolyLine( rPoly.getB2DPolygon(), @@ -240,7 +240,7 @@ void OutputDevice::drawPolyLine(const tools::Polygon& rPoly, const LineInfo& rLi { sal_uInt16 nPoints(rPoly.GetSize()); - if ( !IsDeviceOutputNecessary() || !mbLineColor || ( nPoints < 2 ) || ( LINE_NONE == rLineInfo.GetStyle() ) || ImplIsRecordLayout() ) + if ( !IsDeviceOutputNecessary() || !mbLineColor || ( nPoints < 2 ) || ( LineStyle::NONE == rLineInfo.GetStyle() ) || ImplIsRecordLayout() ) return; tools::Polygon aPoly = ImplLogicToDevicePixel( rPoly ); @@ -259,7 +259,7 @@ void OutputDevice::drawPolyLine(const tools::Polygon& rPoly, const LineInfo& rLi InitLineColor(); const LineInfo aInfo( ImplLogicToDevicePixel( rLineInfo ) ); - const bool bDashUsed(LINE_DASH == aInfo.GetStyle()); + const bool bDashUsed(LineStyle::Dash == aInfo.GetStyle()); const bool bLineWidthUsed(aInfo.GetWidth() > 1); if(bDashUsed || bLineWidthUsed) diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx index 50c4dfe7d770..fe473fff994d 100644 --- a/vcl/source/window/dockmgr.cxx +++ b/vcl/source/window/dockmgr.cxx @@ -632,7 +632,7 @@ void ImplPopupFloatWin::DrawGrip(vcl::RenderContext& rRenderContext) { #ifdef TEAROFF_DASHED // draw single dashed line - LineInfo aLineInfo(LINE_DASH); + LineInfo aLineInfo(LineStyle::Dash); aLineInfo.SetDistance(4); aLineInfo.SetDashLen(12); aLineInfo.SetDashCount(1); diff --git a/vcl/source/window/split.cxx b/vcl/source/window/split.cxx index daf4dd16e5a3..2dbe388c1916 100644 --- a/vcl/source/window/split.cxx +++ b/vcl/source/window/split.cxx @@ -679,7 +679,7 @@ void Splitter::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rPaint if (mbKbdSplitting) { - LineInfo aInfo( LINE_DASH ); + LineInfo aInfo( LineStyle::Dash ); //aInfo.SetDashLen( 2 ); //aInfo.SetDashCount( 1 ); aInfo.SetDistance( 1 ); diff --git a/vcl/workben/outdevgrind.cxx b/vcl/workben/outdevgrind.cxx index ced001f178a2..01bbefca691d 100644 --- a/vcl/workben/outdevgrind.cxx +++ b/vcl/workben/outdevgrind.cxx @@ -103,7 +103,7 @@ void setupMethodStubs( functor_vector_type& res ) aPolyPoly.Insert( aPoly2 ); tools::Polygon aPoly3(aPoly2); aPoly3.Rotate( aPoly3.GetBoundRect().Center(), 900 ); - const LineInfo aLineInfo(LINE_SOLID,5); + const LineInfo aLineInfo(LineStyle::Solid,5); #ifdef FIXME_VDEV const OUString aString("This is a test"); diff --git a/vcl/workben/svptest.cxx b/vcl/workben/svptest.cxx index 1610fb3d3633..357a56b8dea8 100644 --- a/vcl/workben/svptest.cxx +++ b/vcl/workben/svptest.cxx @@ -314,7 +314,7 @@ void MyWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) Size(aPaperSize.Width() - 2000, 500)), aGradient); - LineInfo aLineInfo(LINE_SOLID, 200); + LineInfo aLineInfo(LineStyle::Solid, 200); double sind = sin(DELTA * M_PI / 180.0); double cosd = cos(DELTA * M_PI / 180.0); double factor = 1 + (DELTA / 1000.0); |