diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2024-09-25 15:52:44 +0500 |
---|---|---|
committer | Aron Budea <aron.budea@collabora.com> | 2024-09-27 17:04:45 +0930 |
commit | 42c282997666e84ef2be30e051dac21751393750 (patch) | |
tree | 35cc1f67b7d5a623c779bd09c437d45c1bae0f26 | |
parent | 8927e65b27fc57fc1c4dba2e8e7aa64df11e33ae (diff) |
tdf#163145: revert commit 6f224a17dbf635319503a81ce4038b1ae2ad6de0
I can't reproduce the problem from tdf#136933 anymore (using kf5
and qt5), while it's reproducible using v.7.0 bibisect repo with
qt5. I conclude, that the problem got resolved in the meanwhile.
So it seems to make sense to just revert the problematic commit.
The incorrect line drawing still may need to be fixed eventually.
There seem to be no way to test SlideImpl::getCurrentSlideBitmap,
which eventually calls CanvasHelper::strokePolyPolygon. So this
change has no unit test, unfortunately.
Change-Id: I1d82b6f734a4f69d93c9d61732f55ef8158cfbe6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173933
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit 12e08b3cba0e75f1bd3a42f30e4830d723b24ece)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173910
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
(cherry picked from commit f3e221388e10826aaac6d31631f81709951aae2a)
-rw-r--r-- | canvas/source/vcl/canvashelper.cxx | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/canvas/source/vcl/canvashelper.cxx b/canvas/source/vcl/canvashelper.cxx index cbbd18a376d9..3aa16f1baf4e 100644 --- a/canvas/source/vcl/canvashelper.cxx +++ b/canvas/source/vcl/canvashelper.cxx @@ -315,31 +315,12 @@ namespace vclcanvas ::basegfx::B2DPolyPolygon aPolyPoly( ::basegfx::unotools::b2DPolyPolygonFromXPolyPolygon2D(xPolyPolygon) ); - std::vector<double> aDashArray; - if( strokeAttributes.DashArray.hasElements() ) - aDashArray = ::comphelper::sequenceToContainer< std::vector<double> >(strokeAttributes.DashArray); - - // First try to draw directly using VCL. - bool directFailed = false; - setupOutDevState( viewState, renderState, LINE_COLOR ); - for( sal_uInt32 i=0; i<aPolyPoly.count(); ++i ) - { - if( !mpOutDevProvider->getOutDev().DrawPolyLineDirect( aMatrix, aPolyPoly.getB2DPolygon(i), - strokeAttributes.StrokeWidth, 0, !aDashArray.empty() ? &aDashArray : nullptr, - b2DJoineFromJoin(strokeAttributes.JoinType), unoCapeFromCap(strokeAttributes.StartCapType))) - { - directFailed = true; - break; - } - } - if(!directFailed) - return uno::Reference< rendering::XCachedPrimitive >(nullptr); - - // Do it all manually. - // apply dashing, if any if( strokeAttributes.DashArray.hasElements() ) { + const std::vector<double>& aDashArray( + ::comphelper::sequenceToContainer< std::vector<double> >(strokeAttributes.DashArray) ); + ::basegfx::B2DPolyPolygon aDashedPolyPoly; for( sal_uInt32 i=0; i<aPolyPoly.count(); ++i ) |