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

Ashod Nakashian ashod.nakashian at collabora.co.uk
Fri Jun 17 23:39:05 UTC 2016


 sc/source/ui/view/gridwin4.cxx |   13 +++++++++++++
 1 file changed, 13 insertions(+)

New commits:
commit 63f15b36f7a196edb20ce7a0aba6f6b3d28dd652
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date:   Sun Jun 12 22:04:50 2016 -0400

    LOK: fast tile rendering (cell editing)
    
    Cell editing uses editeng which has a different
    set of requirements. The coordinates are in
    100th mm and so we have to convert the ofsets
    to 100mm.
    
    Change-Id: I278457ffc2273eb786101875c85ddfb959d4c5e3
    Reviewed-on: https://gerrit.libreoffice.org/26205
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
    Tested-by: Ashod Nakashian <ashnakash at gmail.com>
    (cherry picked from commit 0dbffca63191712d9f77297061a3d4651b8410aa)
    Reviewed-on: https://gerrit.libreoffice.org/26377
    Tested-by: Jenkins <ci at libreoffice.org>

diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index fb2a9c1..39999bd 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -943,6 +943,19 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI
         // paint the background
         rDevice.DrawRect(rDevice.PixelToLogic(aBackground));
 
+        if (bIsTiledRendering)
+        {
+            auto aOrigin = aOriginalMode.GetOrigin();
+            aOrigin.setX(aOrigin.getX() / TWIPS_PER_PIXEL + nScrX);
+            aOrigin.setY(aOrigin.getY() / TWIPS_PER_PIXEL + nScrY);
+            static const double twipFactor = 15 * 1.76388889; // 26.45833335
+            aOrigin = Point(aOrigin.getX() * twipFactor,
+                            aOrigin.getY() * twipFactor);
+            MapMode aNew = rDevice.GetMapMode();
+            aNew.SetOrigin(aOrigin);
+            rDevice.SetMapMode(aNew);
+        }
+
         // paint the editeng text
         pEditView->Paint(rDevice.PixelToLogic(Rectangle(Point(nScrX, nScrY), Size(aOutputData.GetScrW(), aOutputData.GetScrH()))), &rDevice);
         rDevice.SetMapMode(MAP_PIXEL);


More information about the Libreoffice-commits mailing list