summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMarco Cecchetti <marco.cecchetti@collabora.com>2017-03-13 11:42:31 +0100
committerJan Holesovsky <kendy@collabora.com>2017-03-29 13:17:12 +0000
commit4b1e2d09ffbab74c559340f947d6b80d63a2ace0 (patch)
tree6cee49ac3d869ad0f305b5909d2961406bd67cec /sc
parent435011a6a7924ac56ab1a0ee78a2eecb99bdb353 (diff)
LOK: Calc - images are not painted below row 1000
The problem was not due to some missing tile invalidation: it was at the painting stage. There was no overlap btw the view range and the object range. Now images and shape are painted correctly. There is still problems with control forms and charts. Change-Id: Ib74e3bb79b444df21844086ae666fc206aa48906 Reviewed-on: https://gerrit.libreoffice.org/35215 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/view/gridwin4.cxx11
1 files changed, 3 insertions, 8 deletions
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 4d1121ee92f1..c8387a336bae 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -807,15 +807,9 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI
const MapMode aOrig = pContentDev->GetMapMode();
if (bIsTiledRendering)
{
- MapMode aNew = aOrig;
Point 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() - aOrigin.getX() / twipFactor,
- aOrigin.getY() - aOrigin.getY() / twipFactor);
- aNew.SetOrigin(aOrigin);
- pContentDev->SetMapMode(aNew);
+ Size aPixelOffset(aOrigin.getX() / TWIPS_PER_PIXEL, aOrigin.getY() / TWIPS_PER_PIXEL);
+ pContentDev->SetPixelOffset(aPixelOffset);
comphelper::LibreOfficeKit::setLocalRendering();
}
@@ -825,6 +819,7 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI
if (bIsTiledRendering)
{
+ pContentDev->SetPixelOffset(Size());
pContentDev->SetMapMode(aOrig);
}