diff options
author | Noel Grandin <noel@peralex.com> | 2015-04-14 15:53:01 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-04-14 15:53:01 +0200 |
commit | e8eed1d31dedd28cfe649d18d09de3b77add6f10 (patch) | |
tree | 3cc3ae2408d6764fc706b9148b2fcd95012811b3 | |
parent | 734e4dc9f2676f59ed264abd16aae9afdef5ed84 (diff) |
wrap field in VclPtr
Change-Id: Ica765d313edaf45eefeee49b2c40b1b595fa9daf
-rw-r--r-- | sw/source/uibase/inc/workctrl.hxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/ribbar/workctrl.cxx | 12 |
2 files changed, 14 insertions, 2 deletions
diff --git a/sw/source/uibase/inc/workctrl.hxx b/sw/source/uibase/inc/workctrl.hxx index 31638e22679a..ba68c1f04d97 100644 --- a/sw/source/uibase/inc/workctrl.hxx +++ b/sw/source/uibase/inc/workctrl.hxx @@ -114,7 +114,7 @@ class SwScrollNaviPopup; class SwScrollNaviToolBox : public ToolBox { - SwScrollNaviPopup *m_pNaviPopup; + VclPtr<SwScrollNaviPopup> m_pNaviPopup; virtual void MouseButtonUp( const MouseEvent& rMEvt ) SAL_OVERRIDE; virtual void RequestHelp( const HelpEvent& rHEvt ) SAL_OVERRIDE; @@ -125,6 +125,8 @@ public: , m_pNaviPopup(pNaviPopup) { } + virtual ~SwScrollNaviToolBox(); + virtual void dispose() SAL_OVERRIDE; }; class SwScrollNaviPopup : public SfxPopupWindow diff --git a/sw/source/uibase/ribbar/workctrl.cxx b/sw/source/uibase/ribbar/workctrl.cxx index a6c9415d3ee1..8fe62f95f5ca 100644 --- a/sw/source/uibase/ribbar/workctrl.cxx +++ b/sw/source/uibase/ribbar/workctrl.cxx @@ -510,6 +510,17 @@ IMPL_LINK(SwScrollNaviPopup, SelectHdl, ToolBox*, pSet) return 0; } +SwScrollNaviToolBox::~SwScrollNaviToolBox() +{ + disposeOnce(); +} + +void SwScrollNaviToolBox::dispose() +{ + m_pNaviPopup.disposeAndClear(); + ToolBox::dispose(); +} + void SwScrollNaviToolBox::MouseButtonUp( const MouseEvent& rMEvt ) { ToolBox::MouseButtonUp(rMEvt); @@ -522,7 +533,6 @@ void SwScrollNaviToolBox::RequestHelp( const HelpEvent& rHEvt ) SetItemText(NID_NEXT, SwScrollNaviPopup::GetQuickHelpText(true)); SetItemText(NID_PREV, SwScrollNaviPopup::GetQuickHelpText(false)); ToolBox::RequestHelp( rHEvt ); - } OUString SwScrollNaviPopup::GetQuickHelpText(bool bNext) |