diff options
author | Dennis Francis <dennis.francis@collabora.com> | 2021-11-24 16:12:32 +0530 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2022-01-11 11:18:07 +0100 |
commit | 85a986f25956518978381df097b1f7d88477fd3d (patch) | |
tree | 432fa4da00edeed16b947e9fcb17849abba9e035 | |
parent | lokCalcRTL: draw autofilter buttons at correct coordinates (diff) | |
download | core-85a986f25956518978381df097b1f7d88477fd3d.tar.gz core-85a986f25956518978381df097b1f7d88477fd3d.zip |
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)); |