[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.0' - sc/source

Ashod Nakashian ashod.nakashian at collabora.co.uk
Mon Jun 13 03:09:48 UTC 2016


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

New commits:
commit 0dbffca63191712d9f77297061a3d4651b8410aa
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>

diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 99ff1ba..dc6d66b 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -937,6 +937,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