vcl/source/outdev/polyline.cxx | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-)
New commits: commit e843db51c74519acf41e377237914f603e0f6bab Author: Caolán McNamara <[email protected]> AuthorDate: Sun May 15 16:50:06 2022 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Mon May 16 00:25:03 2022 +0200 ofz#46070 handle unknown line styles Change-Id: I8cc8f6d832e72483d27b09cc57afbde04df770ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134351 Tested-by: Caolán McNamara <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> diff --git a/vcl/source/outdev/polyline.cxx b/vcl/source/outdev/polyline.cxx index 499651c78879..f699147c2edf 100644 --- a/vcl/source/outdev/polyline.cxx +++ b/vcl/source/outdev/polyline.cxx @@ -116,17 +116,28 @@ void OutputDevice::DrawPolyLine( const tools::Polygon& rPoly, const LineInfo& rL return; } - // #i101491# - // Try direct Fallback to B2D-Version of DrawPolyLine - if (LineStyle::Solid == rLineInfo.GetStyle() && IsDeviceOutputNecessary()) + if (IsDeviceOutputNecessary()) { - DrawPolyLine( - rPoly.getB2DPolygon(), - rLineInfo.GetWidth(), - rLineInfo.GetLineJoin(), - rLineInfo.GetLineCap(), - basegfx::deg2rad(15.0) /* default fMiterMinimumAngle, value not available in LineInfo */); - return; + auto eLineStyle = rLineInfo.GetStyle(); + switch (eLineStyle) + { + case LineStyle::NONE: + case LineStyle::Dash: + // use drawPolyLine for these + break; + case LineStyle::Solid: + // #i101491# Try direct Fallback to B2D-Version of DrawPolyLine + DrawPolyLine( + rPoly.getB2DPolygon(), + rLineInfo.GetWidth(), + rLineInfo.GetLineJoin(), + rLineInfo.GetLineCap(), + basegfx::deg2rad(15.0) /* default fMiterMinimumAngle, value not available in LineInfo */); + return; + default: + SAL_WARN("vcl.gdi", "Unknown LineStyle: " << static_cast<int>(eLineStyle)); + return; + } } if ( mpMetaFile )
