diff options
Diffstat (limited to 'sc/source/ui/inc/validate.hxx')
-rw-r--r-- | sc/source/ui/inc/validate.hxx | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/sc/source/ui/inc/validate.hxx b/sc/source/ui/inc/validate.hxx index edda7dc26bad..12db0e7736c1 100644 --- a/sc/source/ui/inc/validate.hxx +++ b/sc/source/ui/inc/validate.hxx @@ -97,7 +97,11 @@ class ScValidationDlg public: explicit ScValidationDlg( Window* pParent, const SfxItemSet* pArgSet, ScTabViewShell * pTabViewSh, SfxBindings *pB = NULL ); - virtual ~ScValidationDlg(); + virtual ~ScValidationDlg() + { + if( m_bOwnRefHdlr ) + RemoveRefDlg( false ); + } static ScValidationDlg * Find1AliveObject( Window *pAncestor ) { return static_cast<ScValidationDlg *>( SC_MOD()->Find1RefWindow( SLOTID, pAncestor ) ); @@ -169,7 +173,7 @@ public: enum { SLOTID = SID_VALIDITY_REFERENCE }; - bool Close() SAL_OVERRIDE; + inline bool Close() SAL_OVERRIDE; }; /** The tab page "Criteria" from the Validation dialog. */ @@ -257,6 +261,17 @@ public: void RemoveRefDlg(); }; +bool ScValidationDlg::Close() +{ + if( m_bOwnRefHdlr ) + { + if (SfxTabPage* pPage = GetTabPage(m_nValuePageId)) + static_cast<ScTPValidationValue*>(pPage)->RemoveRefDlg(); + } + + return ScValidationDlgBase::Close(); +} + class ScTPValidationHelp : public SfxTabPage { private: |