diff options
author | Noel Power <noel.power@novell.com> | 2011-08-23 15:20:10 +0100 |
---|---|---|
committer | Noel Power <noel.power@novell.com> | 2011-08-23 15:20:10 +0100 |
commit | 1640c883df327204113aa59c8e39669387aab617 (patch) | |
tree | 1443082af27ca3cca337b18b0df70406bcdab11d /basic/source/classes/sbxmod.cxx | |
parent | afb089282040b35d86da0a87d33b1ea7c40737fd (diff) |
make sure dialog api object is reset when window is closed ( but not vetoed )
Diffstat (limited to 'basic/source/classes/sbxmod.cxx')
-rw-r--r-- | basic/source/classes/sbxmod.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index ba97917922a9..446d24639e74 100644 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -2395,6 +2395,14 @@ public: mpUserForm->triggerMethod( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Userform_QueryClose") ), aParams); xVbaMethodParameter->setVbaMethodParameter( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Cancel")), aParams[0]); + // If we don't cancel then we want to make sure the dialog + // really is gone to make sure when we attempt to raise it again + // it will actually generate an initialise event + if ( !nCancel ) + { + removeListener(); // presumably we need to do this + mpUserForm->ResetApiObj(); + } return; } @@ -2497,6 +2505,7 @@ SbUserFormModule::~SbUserFormModule() void SbUserFormModule::ResetApiObj( bool bTriggerTerminateEvent ) { + OSL_TRACE(" SbUserFormModule::ResetApiObj( %s )", bTriggerTerminateEvent ? "true" : "false" ); if ( bTriggerTerminateEvent && m_xDialog.is() ) // probably someone close the dialog window { triggerTerminateEvent(); |