diff options
author | Noel Grandin <noel@peralex.com> | 2016-04-18 11:21:44 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-04-18 10:51:54 +0000 |
commit | 67d333c608a662621c1069aacdec75e45e33a183 (patch) | |
tree | 9b2715c5d159acc881627fe461c501fd4db91abf /sw/inc/viewsh.hxx | |
parent | 0c1e6136ca84ec3bd2c0bb96689c0235b8585b25 (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>
Diffstat (limited to 'sw/inc/viewsh.hxx')
-rw-r--r-- | sw/inc/viewsh.hxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx index e4ee7d609ef6..3df2cd89ee93 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. @@ -436,7 +437,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; } |