diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-05-16 10:37:53 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-05-17 09:54:18 +0200 |
commit | f90a48046331eaa1ca60c5298ccdbaf0738077aa (patch) | |
tree | 541bf4f881c3d15126319f7c25bfd2173177d060 | |
parent | 5ccaa8976fc9bffddacfbe804646f4dce099ddb0 (diff) |
split out toplevel window area invalidate
Change-Id: I840ed6cbb3f7950230b1f7169ae3245a4a669249
Reviewed-on: https://gerrit.libreoffice.org/72410
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | include/svx/svdpntv.hxx | 1 | ||||
-rw-r--r-- | svx/source/svdraw/sdrpagewindow.cxx | 8 | ||||
-rw-r--r-- | svx/source/svdraw/sdrpaintwindow.cxx | 6 |
3 files changed, 11 insertions, 4 deletions
diff --git a/include/svx/svdpntv.hxx b/include/svx/svdpntv.hxx index a5eee136faec..bdfa2c705484 100644 --- a/include/svx/svdpntv.hxx +++ b/include/svx/svdpntv.hxx @@ -238,6 +238,7 @@ public: SdrPaintWindow* GetPaintWindow(sal_uInt32 nIndex) const; // Replacement for GetWin(0), may return 0L (!) OutputDevice* GetFirstOutputDevice() const; + static void InvalidateWindow(const tools::Rectangle& rArea, OutputDevice& rDevice); private: SVX_DLLPRIVATE void ImpClearVars(); diff --git a/svx/source/svdraw/sdrpagewindow.cxx b/svx/source/svdraw/sdrpagewindow.cxx index 573fd792284f..cae3610c839f 100644 --- a/svx/source/svdraw/sdrpagewindow.cxx +++ b/svx/source/svdraw/sdrpagewindow.cxx @@ -413,11 +413,11 @@ void SdrPageWindow::InvalidatePageWindow(const basegfx::B2DRange& rRange) if (GetPageView().IsVisible() && GetPaintWindow().OutputToWindow()) { const SvtOptionsDrawinglayer aDrawinglayerOpt; - vcl::Window& rWindow(static_cast< vcl::Window& >(GetPaintWindow().GetOutputDevice())); + OutputDevice& rWindow(GetPaintWindow().GetOutputDevice()); basegfx::B2DRange aDiscreteRange(rRange); aDiscreteRange.transform(rWindow.GetViewTransformation()); - if(aDrawinglayerOpt.IsAntiAliasing()) + if (aDrawinglayerOpt.IsAntiAliasing()) { // invalidate one discrete unit more under the assumption that AA // needs one pixel more @@ -429,10 +429,10 @@ void SdrPageWindow::InvalidatePageWindow(const basegfx::B2DRange& rRange) static_cast<long>(floor(aDiscreteRange.getMinY())), static_cast<long>(ceil(aDiscreteRange.getMaxX())), static_cast<long>(ceil(aDiscreteRange.getMaxY()))); - const bool bWasMapModeEnabled(rWindow.IsMapModeEnabled()); + const bool bWasMapModeEnabled(rWindow.IsMapModeEnabled()); rWindow.EnableMapMode(false); - rWindow.Invalidate(aVCLDiscreteRectangle, InvalidateFlags::NoErase); + SdrPaintView::InvalidateWindow(aVCLDiscreteRectangle, rWindow); rWindow.EnableMapMode(bWasMapModeEnabled); } else if (comphelper::LibreOfficeKit::isActive()) diff --git a/svx/source/svdraw/sdrpaintwindow.cxx b/svx/source/svdraw/sdrpaintwindow.cxx index 666a81c92312..f160ff2341c3 100644 --- a/svx/source/svdraw/sdrpaintwindow.cxx +++ b/svx/source/svdraw/sdrpaintwindow.cxx @@ -225,6 +225,12 @@ rtl::Reference<sdr::overlay::OverlayManager> SdrPaintView::CreateOverlayManager( return xOverlayManager; } +void SdrPaintView::InvalidateWindow(const tools::Rectangle& rArea, OutputDevice& rDevice) +{ + vcl::Window& rWindow(static_cast<vcl::Window&>(rDevice)); + rWindow.Invalidate(rArea, InvalidateFlags::NoErase); +} + void SdrPaintWindow::impCreateOverlayManager() { // not yet one created? |