sc/source/ui/cctrl/dpcontrol.cxx |    7 +++++++
 1 file changed, 7 insertions(+)

New commits:
commit bed6b7356e4bba1604ee5f760c80acc16ae54bae
Author:     Justin Luth <justin_l...@sil.org>
AuthorDate: Fri Nov 26 13:53:42 2021 +0200
Commit:     Justin Luth <jl...@mail.com>
CommitDate: Fri Nov 26 18:13:06 2021 +0100

    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 <jl...@mail.com>

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

Reply via email to