[Libreoffice-commits] core.git: include/svx svx/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Fri May 17 07:55:14 UTC 2019


 include/svx/svdpntv.hxx              |    1 +
 svx/source/svdraw/sdrpagewindow.cxx  |    8 ++++----
 svx/source/svdraw/sdrpaintwindow.cxx |    6 ++++++
 3 files changed, 11 insertions(+), 4 deletions(-)

New commits:
commit f90a48046331eaa1ca60c5298ccdbaf0738077aa
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu May 16 10:37:53 2019 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri May 17 09:54:18 2019 +0200

    split out toplevel window area invalidate
    
    Change-Id: I840ed6cbb3f7950230b1f7169ae3245a4a669249
    Reviewed-on: https://gerrit.libreoffice.org/72410
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

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?


More information about the Libreoffice-commits mailing list