summaryrefslogtreecommitdiff
path: root/sw/inc/viewsh.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-04-18 11:21:44 +0200
committerAshod Nakashian <ashod.nakashian@collabora.co.uk>2016-07-20 01:26:03 -0400
commit46429c9920650c722f541445f186a34a752388a1 (patch)
tree3bf9ba06cc47a45936c50eebbc035b1b03b2d50f /sw/inc/viewsh.hxx
parentd4b38602c6ae1f0ae45d3f52e15795bfaabd523c (diff)
tdf#99352 - Some VclPtrs leak past DeInitVCL
Change-Id: I74b27b1d8b662a644df580ae128643b8495355f8 Reviewed-on: https://gerrit.libreoffice.org/24204 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com> (cherry picked from commit 67d333c608a662621c1069aacdec75e45e33a183)
Diffstat (limited to 'sw/inc/viewsh.hxx')
-rw-r--r--sw/inc/viewsh.hxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx
index fca7c57b3cca..dbc593b60ac4 100644
--- a/sw/inc/viewsh.hxx
+++ b/sw/inc/viewsh.hxx
@@ -30,6 +30,7 @@
#include <vcl/mapmod.hxx>
#include <vcl/print.hxx>
#include <vcl/vclptr.hxx>
+#include <vcl/lazydelete.hxx>
#include <LibreOfficeKit/LibreOfficeKitTypes.h>
@@ -180,7 +181,7 @@ class SW_DLLPUBLIC SwViewShell : public sw::Ring<SwViewShell>
protected:
static ShellResource* mpShellRes; ///< Resources for the Shell.
- static VclPtr<vcl::Window> mpCareWindow; ///< Avoid this window.
+ static vcl::DeleteOnDeinit< VclPtr<vcl::Window> > mpCareWindow; ///< Avoid this window.
SwRect maVisArea; ///< The modern version of VisArea.
SwDoc *mpDoc; ///< The document; never 0.
@@ -438,7 +439,7 @@ public:
static void SetCareWin( vcl::Window* pNew );
static vcl::Window* GetCareWin(SwViewShell& rVSh)
- { return mpCareWindow ? mpCareWindow.get() : CareChildWin(rVSh); }
+ { return (*mpCareWindow.get()) ? mpCareWindow.get()->get() : CareChildWin(rVSh); }
static vcl::Window* CareChildWin(SwViewShell& rVSh);
inline SfxViewShell *GetSfxViewShell() const { return mpSfxViewShell; }