diff options
author | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2016-06-12 22:04:50 -0400 |
---|---|---|
committer | Ashod Nakashian <ashnakash@gmail.com> | 2016-06-17 23:38:34 +0000 |
commit | 63f15b36f7a196edb20ce7a0aba6f6b3d28dd652 (patch) | |
tree | 7c59e8cb8ea92d344f387ae8d91b2c166be19602 | |
parent | 9d6f4cf26e59b846bcdf4139c6aeb76db5a554f7 (diff) |
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@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
(cherry picked from commit 0dbffca63191712d9f77297061a3d4651b8410aa)
Reviewed-on: https://gerrit.libreoffice.org/26377
Tested-by: Jenkins <ci@libreoffice.org>
-rw-r--r-- | sc/source/ui/view/gridwin4.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
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); |