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 | |
parent | Resolves: fdo#40099 don't break incremental builds on removed headers (diff) | |
download | core-1640c883df327204113aa59c8e39669387aab617.tar.gz core-1640c883df327204113aa59c8e39669387aab617.zip |
make sure dialog api object is reset when window is closed ( but not vetoed )
Diffstat (limited to 'basic')
-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(); |