diff options
author | Dennis Francis <dennis.francis@collabora.com> | 2021-11-24 16:12:32 +0530 |
---|---|---|
committer | Dennis Francis <dennis.francis@collabora.com> | 2022-01-11 09:21:28 +0530 |
commit | 3b3108648af0561a7d7b3e20c273f64a765479dd (patch) | |
tree | 432fa4da00edeed16b947e9fcb17849abba9e035 | |
parent | 1c801b9d784085c37608019102f118b8769145b6 (diff) |
lokCalcRTL: Workaround to avoid DrawPoly ghost drawings
Change-Id: Ib6c794766fe68305566a293892c9123d64a2fc47
-rw-r--r-- | sc/source/ui/cctrl/dpcontrol.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sc/source/ui/cctrl/dpcontrol.cxx b/sc/source/ui/cctrl/dpcontrol.cxx index d7dd13dd5c4e..3c0600c76550 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> @@ -181,7 +182,11 @@ void ScDPFieldButton::drawPopupButton() // the arrowhead Color aArrowColor = mbHasHiddenMember ? mpStyle->GetHighlightLinkColor() : 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)); |