vcl/qa/cppunit/outdev.cxx | 2 -- vcl/source/outdev/polyline.cxx | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-)
New commits: commit be052cbc459266db86c7ddd8daba1d30b7e66d57 Author: Chris Sherlock <chris.sherloc...@gmail.com> AuthorDate: Sat Oct 2 11:11:32 2021 +1000 Commit: Tomaž Vajngerl <qui...@gmail.com> CommitDate: Wed Oct 13 19:40:47 2021 +0200 vcl: DrawPolyLine() did not set metaaction line join or cap basegfx::B2DPolygon version of DrawPolyLine() doesn't set the metafile line cap or join, this fixes this issue. Change-Id: Id5d73537b0fc5e580789a98b7c5214d586da3cc9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122974 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <qui...@gmail.com> diff --git a/vcl/qa/cppunit/outdev.cxx b/vcl/qa/cppunit/outdev.cxx index b15bbe1785cb..6429e7c01220 100644 --- a/vcl/qa/cppunit/outdev.cxx +++ b/vcl/qa/cppunit/outdev.cxx @@ -1896,12 +1896,10 @@ void VclOutdevTest::testDrawPolyLine() pPolyLineAction->GetLineInfo().GetDotLen()); CPPUNIT_ASSERT_EQUAL_MESSAGE("Distance wrong", static_cast<double>(0), pPolyLineAction->GetLineInfo().GetDistance()); - /* these aren't set! CPPUNIT_ASSERT_EQUAL_MESSAGE("Line join", basegfx::B2DLineJoin::Bevel, pPolyLineAction->GetLineInfo().GetLineJoin()); CPPUNIT_ASSERT_EQUAL_MESSAGE("Line cap", css::drawing::LineCap_BUTT, pPolyLineAction->GetLineInfo().GetLineCap()); - */ } } diff --git a/vcl/source/outdev/polyline.cxx b/vcl/source/outdev/polyline.cxx index aeeb90845bd1..ef4f0a4a5f2d 100644 --- a/vcl/source/outdev/polyline.cxx +++ b/vcl/source/outdev/polyline.cxx @@ -149,6 +149,9 @@ void OutputDevice::DrawPolyLine( const basegfx::B2DPolygon& rB2DPolygon, if( fLineWidth != 0.0 ) aLineInfo.SetWidth( fLineWidth ); + aLineInfo.SetLineJoin(eLineJoin); + aLineInfo.SetLineCap(eLineCap); + const tools::Polygon aToolsPolygon( rB2DPolygon ); mpMetaFile->AddAction( new MetaPolyLineAction( aToolsPolygon, aLineInfo ) ); }