ooo-build r13038 - in trunk: . patches/dev300 patches/vba



Author: jiaojh
Date: Thu Jul  3 07:51:29 2008
New Revision: 13038
URL: http://svn.gnome.org/viewvc/ooo-build?rev=13038&view=rev

Log:
    * patches/vba/vba-userform-activate-fix.diff:
    * patches/dev300/apply:
      Fix userform activate event re-compute bug.


Added:
   trunk/patches/vba/vba-userform-activate-fix.diff
Modified:
   trunk/ChangeLog
   trunk/patches/dev300/apply

Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply	(original)
+++ trunk/patches/dev300/apply	Thu Jul  3 07:51:29 2008
@@ -1515,6 +1515,8 @@
 vba-spin-button.diff, n#405308, Jianhua
 # erro compile switch
 vba-scroll-bar-idl-switch.diff, Jianhua
+# fix userform activate event re-compute
+vba-userform-activate-fix.diff, Jianhua
 [ VBAUntested ]
 SectionOwner => noelpwer
 vba-basic-null.diff i#85349, jjiao

Added: trunk/patches/vba/vba-userform-activate-fix.diff
==============================================================================
--- (empty file)
+++ trunk/patches/vba/vba-userform-activate-fix.diff	Thu Jul  3 07:51:29 2008
@@ -0,0 +1,52 @@
+--- basic/source/classes/sbxmod.cxx.bak	2008-07-03 15:35:16.000000000 +0800
++++ basic/source/classes/sbxmod.cxx	2008-07-03 15:48:45.000000000 +0800
+@@ -2296,10 +2296,12 @@ class FormObjEventListenerImpl : public 
+     SbUserFormModule* mpUserForm;
+     uno::Reference< lang::XComponent > mxComponent;
+     bool mbDisposed;
++    sal_Bool mbOpened;
++    sal_Bool mbActivated;
+     FormObjEventListenerImpl(); // not defined
+     FormObjEventListenerImpl(const FormObjEventListenerImpl&); // not defined
+ public:
+-    FormObjEventListenerImpl( SbUserFormModule* pUserForm, const uno::Reference< lang::XComponent >& xComponent ) : mpUserForm( pUserForm ), mxComponent( xComponent) , mbDisposed( false )
++    FormObjEventListenerImpl( SbUserFormModule* pUserForm, const uno::Reference< lang::XComponent >& xComponent ) : mpUserForm( pUserForm ), mxComponent( xComponent) , mbDisposed( false ), mbOpened( sal_False ), mbActivated( sal_False )
+     {
+         if ( mxComponent.is() );
+         {
+@@ -2328,7 +2330,18 @@ public:
+         }
+         catch( uno::Exception& ) {}
+     } 
+-    virtual void SAL_CALL windowOpened( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException) {}
++    virtual void SAL_CALL windowOpened( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException)
++    {
++        if ( mpUserForm  )
++        {
++            mbOpened = sal_True;
++            if ( mbActivated )
++            {
++                mbOpened = mbActivated = sal_False;
++                mpUserForm->triggerActivateEvent();
++            }
++        }
++    }
+     virtual void SAL_CALL windowClosing( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException) {}
+     virtual void SAL_CALL windowClosed( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException) {}
+     virtual void SAL_CALL windowMinimized( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException) {}
+@@ -2336,7 +2349,14 @@ public:
+     virtual void SAL_CALL windowActivated( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException)
+     {
+         if ( mpUserForm  )
+-            mpUserForm->triggerActivateEvent();
++        {
++            mbActivated = sal_True;
++            if ( mbOpened )
++            {
++                mbOpened = mbActivated = sal_False;
++                mpUserForm->triggerActivateEvent();
++            }
++        }
+     }
+    
+     virtual void SAL_CALL windowDeactivated( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]