canvas/source/vcl/canvashelper.cxx |   25 +++----------------------
 1 file changed, 3 insertions(+), 22 deletions(-)

New commits:
commit 12e08b3cba0e75f1bd3a42f30e4830d723b24ece
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Wed Sep 25 15:52:44 2024 +0500
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Wed Sep 25 18:36:49 2024 +0200

    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.kagan...@collabora.com>

diff --git a/canvas/source/vcl/canvashelper.cxx 
b/canvas/source/vcl/canvashelper.cxx
index f323f9671173..26c730b851bd 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 )

Reply via email to