diff options
author | Marco Cecchetti <marco.cecchetti@collabora.com> | 2017-03-13 11:42:31 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2017-03-29 13:17:12 +0000 |
commit | 4b1e2d09ffbab74c559340f947d6b80d63a2ace0 (patch) | |
tree | 6cee49ac3d869ad0f305b5909d2961406bd67cec | |
parent | 435011a6a7924ac56ab1a0ee78a2eecb99bdb353 (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>
-rw-r--r-- | sc/source/ui/view/gridwin4.cxx | 11 | ||||
-rw-r--r-- | svx/source/sdr/contact/objectcontactofpageview.cxx | 33 |
2 files changed, 14 insertions, 30 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); } diff --git a/svx/source/sdr/contact/objectcontactofpageview.cxx b/svx/source/sdr/contact/objectcontactofpageview.cxx index 0e81e850a727..7720c5fa13d5 100644 --- a/svx/source/sdr/contact/objectcontactofpageview.cxx +++ b/svx/source/sdr/contact/objectcontactofpageview.cxx @@ -205,7 +205,6 @@ namespace sdr { // use visible pixels, but transform to world coordinates aViewRange = basegfx::B2DRange(0.0, 0.0, aOutputSizePixel.getWidth(), aOutputSizePixel.getHeight()); - // if a clip region is set, use it if(!rDisplayInfo.GetRedrawArea().IsEmpty()) { @@ -230,16 +229,22 @@ namespace sdr aViewRange.intersect(aDiscreteClipRange); } + const MapMode aOrigMapMode = rTargetOutDev.GetMapMode(); + if (comphelper::LibreOfficeKit::isActive() && + comphelper::LibreOfficeKit::isLocalRendering()) + { + MapMode aMapMode = aOrigMapMode; + aMapMode.SetOrigin(Point()); + rTargetOutDev.SetMapMode(aMapMode); + } + // transform to world coordinates aViewRange.transform(rTargetOutDev.GetInverseViewTransformation()); + if (comphelper::LibreOfficeKit::isActive() && comphelper::LibreOfficeKit::isLocalRendering()) { - const int TWIPS_PER_PIXEL = 15; - aViewRange = basegfx::B2DRange(aViewRange.getMinimum().getX(), - aViewRange.getMinimum().getY(), - aViewRange.getMaximum().getX() * TWIPS_PER_PIXEL, - aViewRange.getMaximum().getY() * TWIPS_PER_PIXEL); + rTargetOutDev.SetMapMode(aOrigMapMode); } } @@ -315,26 +320,10 @@ namespace sdr drawinglayer::processor2d::createProcessor2DFromOutputDevice( rTargetOutDev, getViewInformation2D())); - if (comphelper::LibreOfficeKit::isActive() && - comphelper::LibreOfficeKit::isLocalRendering()) - { - // Restore the origin. - MapMode aMapMode = pOutDev->GetMapMode(); - aMapMode.SetOrigin(aOrigMapMode.GetOrigin()); - pOutDev->SetMapMode(aMapMode); - } - if(pProcessor2D) { pProcessor2D->process(xPrimitiveSequence); } - - if (comphelper::LibreOfficeKit::isActive() && - comphelper::LibreOfficeKit::isLocalRendering()) - { - // Restore the original map-mode. - pOutDev->SetMapMode(aOrigMapMode); - } } // #114359# restore old ClipReghion |