[Libreoffice-commits] core.git: sc/source

Jan Holesovsky kendy at collabora.com
Wed Jun 10 06:51:19 PDT 2015


 sc/source/ui/cctrl/dpcontrol.cxx |    7 -------
 sc/source/ui/view/gridwin4.cxx   |    3 +++
 2 files changed, 3 insertions(+), 7 deletions(-)

New commits:
commit 342d84218c17da40d0a4f96bc3b07b536d64517a
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Wed Jun 10 15:01:15 2015 +0200

    sc tiled editing: Mapping has to be turned off after drawing the buttons.
    
    Otherwise the redlines are on wrong positions in the tiled rendering case.
    
    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.
    
    Change-Id: I8da07dd5448b8863df3148882ec50e6746760cca

diff --git a/sc/source/ui/cctrl/dpcontrol.cxx b/sc/source/ui/cctrl/dpcontrol.cxx
index 90d8783..f020024 100644
--- a/sc/source/ui/cctrl/dpcontrol.cxx
+++ b/sc/source/ui/cctrl/dpcontrol.cxx
@@ -95,11 +95,6 @@ void ScDPFieldButton::setPopupLeft(bool b)
 
 void ScDPFieldButton::draw()
 {
-    bool bOldMapEnabled = mpOutDev->IsMapModeEnabled();
-
-    if (mpOutDev->GetMapMode().GetMapUnit() != MAP_PIXEL )
-        mpOutDev->EnableMapMode(false);
-
     if (mbBaseButton)
     {
         // Background
@@ -146,8 +141,6 @@ void ScDPFieldButton::draw()
 
     if (mbPopupButton)
         drawPopupButton();
-
-    mpOutDev->EnableMapMode(bOldMapEnabled);
 }
 
 void ScDPFieldButton::getPopupBoundingBox(Point& rPos, Size& rSize) const
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index c8f234b..a5042cd 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -763,6 +763,7 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI
         aOutputData.DrawStrings(true);      // in logic MapMode if bLogicText is set
     aOutputData.DrawEdit(true);
 
+    // the buttons are painted in absolute coordinates
     if (bIsTiledRendering)
     {
         // Tiled offset nScrX, nScrY
@@ -777,6 +778,8 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI
 
     DrawButtons(nX1, nX2, rTableInfo, pContentDev);          // Pixel
 
+    pContentDev->SetMapMode(MAP_PIXEL);
+
     aOutputData.DrawClipMarks();
 
     //  Szenario / ChangeTracking muss auf jeden Fall nach DrawGrid sein, auch bei !bGridFirst


More information about the Libreoffice-commits mailing list