From 63f15b36f7a196edb20ce7a0aba6f6b3d28dd652 Mon Sep 17 00:00:00 2001 From: Ashod Nakashian Date: Sun, 12 Jun 2016 22:04:50 -0400 Subject: 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 Tested-by: Ashod Nakashian (cherry picked from commit 0dbffca63191712d9f77297061a3d4651b8410aa) Reviewed-on: https://gerrit.libreoffice.org/26377 Tested-by: Jenkins --- sc/source/ui/view/gridwin4.cxx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index fb2a9c147953..39999bd5099c 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); -- cgit