[Libreoffice-commits] core.git: sc/source
Michael Meeks
michael.meeks at collabora.com
Sat May 23 13:50:51 PDT 2015
sc/source/ui/inc/anyrefdg.hxx | 10 +++++++++-
sc/source/ui/miscdlgs/anyrefdg.cxx | 7 +++++++
2 files changed, 16 insertions(+), 1 deletion(-)
New commits:
commit ba203843f5a209cb48e2d6f4ec4e3649982185ea
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Sat May 23 19:59:55 2015 +0100
tdf#91499 - cleanup AnyRefDialog VclPtr's with an explicit dispose method.
Change-Id: Ib3571fc6d2aa9343bcfd2d6a5bdbd6b1d193c0f1
Reviewed-on: https://gerrit.libreoffice.org/15883
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
Tested-by: Michael Meeks <michael.meeks at collabora.com>
diff --git a/sc/source/ui/inc/anyrefdg.hxx b/sc/source/ui/inc/anyrefdg.hxx
index 5bcc688..5f717ff 100644
--- a/sc/source/ui/inc/anyrefdg.hxx
+++ b/sc/source/ui/inc/anyrefdg.hxx
@@ -127,6 +127,7 @@ private:
DECL_LINK_TYPED( UpdateFocusHdl, Idle*, void );
protected:
+ void disposeRefHandler();
bool DoClose( sal_uInt16 nId );
static void SetDispatcherLock( bool bLock );
@@ -280,9 +281,16 @@ struct ScRefHdlrImpl: ScRefHdlrImplBase< TBase, bBindRef >
SC_MOD()->RegisterRefWindow( static_cast<sal_uInt16>( static_cast<TDerived*>(this)->SLOTID ), this );
}
- ~ScRefHdlrImpl()
+ virtual void dispose() SAL_OVERRIDE
{
SC_MOD()->UnregisterRefWindow( static_cast<sal_uInt16>( static_cast<TDerived*>(this)->SLOTID ), this );
+ ScRefHdlrImplBase<TBase, bBindRef >::disposeRefHandler();
+ TBase::dispose();
+ }
+
+ ~ScRefHdlrImpl()
+ {
+ dispose();
}
};
diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx b/sc/source/ui/miscdlgs/anyrefdg.cxx
index 5219f96..aab5194 100644
--- a/sc/source/ui/miscdlgs/anyrefdg.cxx
+++ b/sc/source/ui/miscdlgs/anyrefdg.cxx
@@ -823,6 +823,13 @@ bool ScRefHandler::EnterRefMode()
ScRefHandler::~ScRefHandler()
{
+ disposeRefHandler();
+}
+
+void ScRefHandler::disposeRefHandler()
+{
+ m_rWindow.clear();
+ pActiveWin.clear();
LeaveRefMode();
}
More information about the Libreoffice-commits
mailing list