[Libreoffice-commits] .: basic/source

Noel Power noelp at kemper.freedesktop.org
Tue Aug 23 07:18:54 PDT 2011


 basic/source/classes/sbxmod.cxx |    9 +++++++++
 1 file changed, 9 insertions(+)

New commits:
commit 1640c883df327204113aa59c8e39669387aab617
Author: Noel Power <noel.power at novell.com>
Date:   Tue Aug 23 15:20:10 2011 +0100

    make sure dialog api object is reset when window is closed ( but not vetoed )

diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index ba97917..446d246 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();


More information about the Libreoffice-commits mailing list