summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2016-06-12 22:04:50 -0400
committerAshod Nakashian <ashnakash@gmail.com>2016-06-13 03:09:26 +0000
commit0dbffca63191712d9f77297061a3d4651b8410aa (patch)
treea20ee508b8538dee35402ead48a70a2768df1573
parent5f01d80f75dc86b393cc2fdb66b94aece964c674 (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>
-rw-r--r--sc/source/ui/view/gridwin4.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 99ff1ba4d807..dc6d66b12631 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);