sc/source/ui/cctrl/dpcontrol.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
New commits: commit ce76f9245d678f4894e2d4148204b994f0032626 Author: Dennis Francis <dennis.fran...@collabora.com> AuthorDate: Wed Nov 24 16:12:32 2021 +0530 Commit: Dennis Francis <dennis.fran...@collabora.com> CommitDate: Mon Jan 31 05:56:48 2022 +0100 lokCalcRTL: Workaround to avoid DrawPoly ghost drawings Conflicts: sc/source/ui/cctrl/dpcontrol.cxx Change-Id: Ib6c794766fe68305566a293892c9123d64a2fc47 (cherry picked from commit 85a986f25956518978381df097b1f7d88477fd3d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128902 Tested-by: Jenkins Reviewed-by: Dennis Francis <dennis.fran...@collabora.com> diff --git a/sc/source/ui/cctrl/dpcontrol.cxx b/sc/source/ui/cctrl/dpcontrol.cxx index f504b6c75089..4c9fbbc6abb3 100644 --- a/sc/source/ui/cctrl/dpcontrol.cxx +++ b/sc/source/ui/cctrl/dpcontrol.cxx @@ -21,6 +21,7 @@ #include <vcl/outdev.hxx> #include <vcl/settings.hxx> +#include <comphelper/lok.hxx> #include <scitems.hxx> #include <document.hxx> #include <docpool.hxx> @@ -190,7 +191,11 @@ void ScDPFieldButton::drawPopupButton() // the arrowhead Color aArrowColor = mbHasHiddenMember ? mpStyle->GetHighlightTextColor() : mpStyle->GetButtonTextColor(); - mpOutDev->SetLineColor(aArrowColor); + // FIXME: HACK: The following DrawPolygon draws twice in lok rtl mode for some reason. + // => one at the correct location with fill (possibly no outline) + // => and the other at an x offset with outline and without fill + // eg. Replacing this with a DrawRect() does not have any such problems. + comphelper::LibreOfficeKit::isActive() ? mpOutDev->SetLineColor() : mpOutDev->SetLineColor(aArrowColor); mpOutDev->SetFillColor(aArrowColor); Point aCenter(aPos.X() + (aSize.Width() / 2), aPos.Y() + (aSize.Height() / 2));