tdf#163145: revert commit 6f224a17db

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>
This commit is contained in:
Mike Kaganski
2024-09-25 15:52:44 +05:00
parent 828a836031
commit 12e08b3cba

View File

@@ -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 )