From 1f86fdd4b5428a8c7b253051cca93429dc71f894 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 23 Apr 2024 16:10:48 +0200 Subject: [PATCH] tdf#160787 Calc active cell cursor has small transparent corners clearly I don't understand something about B2DPolyPolygon, revert part of commit 7b1405689d4246e0e37e8759f03e1962af964cec Author: Noel Grandin Date: Fri Apr 19 22:56:04 2024 +0200 reduce the number of drawing primitives we create in OverlaySelection Change-Id: If8f07d021543e2686a3acfc6a0d38b2ebc962de4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166543 Reviewed-by: Noel Grandin --- svx/source/sdr/overlay/overlayselection.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/svx/source/sdr/overlay/overlayselection.cxx b/svx/source/sdr/overlay/overlayselection.cxx index d4a7b45beb8f..a5598c1d2125 100644 --- a/svx/source/sdr/overlay/overlayselection.cxx +++ b/svx/source/sdr/overlay/overlayselection.cxx @@ -214,6 +214,16 @@ namespace sdr::overlay aRGBColor = basegfx::BColor(1.0, 1.0, 1.0); } + aRetval.resize(nCount); + for(sal_uInt32 a(0);a < nCount; a++) + { + basegfx::B2DPolygon aPolygon(basegfx::utils::createPolygonFromRect(maRanges[a])); + aRetval[a] = + new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D( + basegfx::B2DPolyPolygon(std::move(aPolygon)), + aRGBColor); + } + basegfx::B2DPolyPolygon aPolyPolygon; aPolyPolygon.reserve(nCount); for(sal_uInt32 a(0);a < nCount; a++)