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

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Tue May 21 10:53:05 UTC 2019


 include/svx/graphctl.hxx       |    2 ++
 svx/source/dialog/graphctl.cxx |   12 ++++++++++++
 2 files changed, 14 insertions(+)

New commits:
commit 654d5434e50e72456ce11bfe69d9d86ef0551159
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue May 21 09:53:13 2019 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue May 21 12:52:01 2019 +0200

    turn off OutputToWindow during dtor
    
    Change-Id: I46d45c2487b7d4ac99d48ce0fc49bed120291f3c
    Reviewed-on: https://gerrit.libreoffice.org/72668
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/include/svx/graphctl.hxx b/include/svx/graphctl.hxx
index d4fe23b3abca..d6b1d2de553e 100644
--- a/include/svx/graphctl.hxx
+++ b/include/svx/graphctl.hxx
@@ -261,6 +261,8 @@ public:
     {
     }
 
+    virtual ~SvxGraphCtrlView() override;
+
     // override these so we can get the occasions SdrPaintView would call Window::Invalidate on its vcl::Window
     // if it had one, and route to WidgetController::Invalidate instead
     virtual rtl::Reference<sdr::overlay::OverlayManager> CreateOverlayManager(OutputDevice& rDevice) const override;
diff --git a/svx/source/dialog/graphctl.cxx b/svx/source/dialog/graphctl.cxx
index 470912a649c5..fea3d733157b 100644
--- a/svx/source/dialog/graphctl.cxx
+++ b/svx/source/dialog/graphctl.cxx
@@ -1516,6 +1516,18 @@ void SvxGraphCtrlView::InvalidateOneWin(OutputDevice& rDevice, const tools::Rect
     SdrView::InvalidateOneWin(rDevice, rArea);
 }
 
+SvxGraphCtrlView::~SvxGraphCtrlView()
+{
+    // turn SetOutputToWindow back off again before
+    // turning back into our baseclass during dtoring
+    const sal_uInt32 nWindowCount(PaintWindowCount());
+    for (sal_uInt32 nWinNum(0); nWinNum < nWindowCount; nWinNum++)
+    {
+        SdrPaintWindow* pPaintWindow = GetPaintWindow(nWinNum);
+        pPaintWindow->SetOutputToWindow(false);
+    }
+}
+
 Point SvxGraphCtrl::GetPositionInDialog() const
 {
     int x, y, width, height;


More information about the Libreoffice-commits mailing list