[Libreoffice-commits] core.git: Branch 'feature/vclptr' - sw/source
Noel Grandin
noel at peralex.com
Tue Apr 14 06:53:37 PDT 2015
sw/source/uibase/inc/workctrl.hxx | 4 +++-
sw/source/uibase/ribbar/workctrl.cxx | 12 +++++++++++-
2 files changed, 14 insertions(+), 2 deletions(-)
New commits:
commit e8eed1d31dedd28cfe649d18d09de3b77add6f10
Author: Noel Grandin <noel at peralex.com>
Date: Tue Apr 14 15:53:01 2015 +0200
wrap field in VclPtr
Change-Id: Ica765d313edaf45eefeee49b2c40b1b595fa9daf
diff --git a/sw/source/uibase/inc/workctrl.hxx b/sw/source/uibase/inc/workctrl.hxx
index 31638e2..ba68c1f 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 a6c9415..8fe62f9 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)
More information about the Libreoffice-commits
mailing list