diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-05-15 16:50:06 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-05-16 00:25:03 +0200 |
commit | e843db51c74519acf41e377237914f603e0f6bab (patch) | |
tree | a9e45871e5d0b8ac167316843771010af30791dc | |
parent | d7cbd78a810b263fd2f53ca58ec678008a387e22 (diff) |
ofz#46070 handle unknown line styles
Change-Id: I8cc8f6d832e72483d27b09cc57afbde04df770ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134351
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | vcl/source/outdev/polyline.cxx | 31 |
1 files changed, 21 insertions, 10 deletions
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 ) |