Kaydet (Commit) ba203843 authored tarafından Michael Meeks's avatar Michael Meeks

tdf#91499 - cleanup AnyRefDialog VclPtr's with an explicit dispose method.

Change-Id: Ib3571fc6d2aa9343bcfd2d6a5bdbd6b1d193c0f1
Reviewed-on: https://gerrit.libreoffice.org/15883Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMichael Meeks <michael.meeks@collabora.com>
Tested-by: 's avatarMichael Meeks <michael.meeks@collabora.com>
üst e18adb73
......@@ -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();
}
};
......
......@@ -823,6 +823,13 @@ bool ScRefHandler::EnterRefMode()
ScRefHandler::~ScRefHandler()
{
disposeRefHandler();
}
void ScRefHandler::disposeRefHandler()
{
m_rWindow.clear();
pActiveWin.clear();
LeaveRefMode();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment