summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2021-11-26 13:53:42 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2021-11-29 09:59:36 +0100
commit5d331f3c92623fe6cba089bf2c49e8b518d225dd (patch)
treeccb33f59a099026b1fd64a1397b132e5ecbd46b3 /sc/source/ui
parent81b26582ed62db40e2be701ddefede7d8230d0d2 (diff)
tdf#126356 partial Revert "sc tiled editing: Mapping has to be
turned off after drawing the buttons." This partially reverts LO 5.0 commit 342d84218c17da40d0a4f96bc3b07b536d64517a which comments: Also - we are actually never call with something else than MAP_PIXEL, so let's kill the resetting of the mapmode; let's see if some obscure corner case bites us here. Several bug reports have indicated artifacts on screen, all coming from the use of autofilter, and in these cases the map mode is 0 (Map100thMM), so I restored the whimsically removed logic. Change-Id: I9bb5d7418fc4083ed71139a64329b11fa1e4cc13 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125879 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com> (cherry picked from commit bed6b7356e4bba1604ee5f760c80acc16ae54bae) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125894 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/cctrl/dpcontrol.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/sc/source/ui/cctrl/dpcontrol.cxx b/sc/source/ui/cctrl/dpcontrol.cxx
index 4b0bcc449f5b..f504b6c75089 100644
--- a/sc/source/ui/cctrl/dpcontrol.cxx
+++ b/sc/source/ui/cctrl/dpcontrol.cxx
@@ -89,6 +89,11 @@ void ScDPFieldButton::setPopupLeft(bool b)
void ScDPFieldButton::draw()
{
+ bool bOldMapEnabled = mpOutDev->IsMapModeEnabled();
+
+ if (mpOutDev->GetMapMode().GetMapUnit() != MapUnit::MapPixel)
+ mpOutDev->EnableMapMode(false);
+
if (mbBaseButton)
{
// Background
@@ -135,6 +140,8 @@ void ScDPFieldButton::draw()
if (mbPopupButton)
drawPopupButton();
+
+ mpOutDev->EnableMapMode(bOldMapEnabled);
}
void ScDPFieldButton::getPopupBoundingBox(Point& rPos, Size& rSize) const