svx/source/svdraw/sdrpagewindow.cxx | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-)
New commits: commit 96b1e852c34d44cd07e3bf5a39ae810f135d61d5 Author: Jan Holesovsky <ke...@collabora.com> Date: Mon Apr 24 21:14:38 2017 +0200 lok: When we actually have the OutputDevice, prefer that. Writer invalidation functionality depends on this actually. Change-Id: I0933c56ff3999a09118112ccf49bf00062c42444 Reviewed-on: https://gerrit.libreoffice.org/36914 Reviewed-by: Andras Timar <andras.ti...@collabora.com> Tested-by: Andras Timar <andras.ti...@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/36915 Reviewed-by: Jan Holesovsky <ke...@collabora.com> Tested-by: Jan Holesovsky <ke...@collabora.com> diff --git a/svx/source/svdraw/sdrpagewindow.cxx b/svx/source/svdraw/sdrpagewindow.cxx index b88a1c48ffa8..c5e28ed56e93 100644 --- a/svx/source/svdraw/sdrpagewindow.cxx +++ b/svx/source/svdraw/sdrpagewindow.cxx @@ -409,23 +409,7 @@ void SdrPageWindow::RedrawLayer(const SdrLayerID* pId, // Invalidate call, used from ObjectContact(OfPageView) in InvalidatePartOfView(...) void SdrPageWindow::InvalidatePageWindow(const basegfx::B2DRange& rRange) { - if (comphelper::LibreOfficeKit::isActive()) - { - // we don't really have a paint window with LOK; OTOH we know that the - // drawinglayer units are 100ths of mm, so they are easy to convert to - // twips - const tools::Rectangle aRect100thMM( - static_cast<long>(floor(rRange.getMinX())), - static_cast<long>(floor(rRange.getMinY())), - static_cast<long>(ceil(rRange.getMaxX())), - static_cast<long>(ceil(rRange.getMaxY()))); - - const tools::Rectangle aRectTwips = OutputDevice::LogicToLogic(aRect100thMM, MapUnit::Map100thMM, MapUnit::MapTwip); - - if (SfxViewShell* pViewShell = SfxViewShell::Current()) - SfxLokHelper::notifyInvalidation(pViewShell, aRectTwips.toString()); - } - else if (GetPageView().IsVisible() && GetPaintWindow().OutputToWindow()) + if (GetPageView().IsVisible() && GetPaintWindow().OutputToWindow()) { const SvtOptionsDrawinglayer aDrawinglayerOpt; vcl::Window& rWindow(static_cast< vcl::Window& >(GetPaintWindow().GetOutputDevice())); @@ -450,6 +434,22 @@ void SdrPageWindow::InvalidatePageWindow(const basegfx::B2DRange& rRange) rWindow.Invalidate(aVCLDiscreteRectangle, InvalidateFlags::NoErase); rWindow.EnableMapMode(bWasMapModeEnabled); } + else if (comphelper::LibreOfficeKit::isActive()) + { + // we don't really have to have a paint window with LOK; OTOH we know + // that the drawinglayer units are 100ths of mm, so they are easy to + // convert to twips + const tools::Rectangle aRect100thMM( + static_cast<long>(floor(rRange.getMinX())), + static_cast<long>(floor(rRange.getMinY())), + static_cast<long>(ceil(rRange.getMaxX())), + static_cast<long>(ceil(rRange.getMaxY()))); + + const tools::Rectangle aRectTwips = OutputDevice::LogicToLogic(aRect100thMM, MapUnit::Map100thMM, MapUnit::MapTwip); + + if (SfxViewShell* pViewShell = SfxViewShell::Current()) + SfxLokHelper::notifyInvalidation(pViewShell, aRectTwips.toString()); + } } // ObjectContact section _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits