ooo-build r12951 - trunk/patches/test/vba
- From: noelpwer svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r12951 - trunk/patches/test/vba
- Date: Tue, 24 Jun 2008 13:58:39 +0000 (UTC)
Author: noelpwer
Date: Tue Jun 24 13:58:39 2008
New Revision: 12951
URL: http://svn.gnome.org/viewvc/ooo-build?rev=12951&view=rev
Log:
fix ( I hope ) for early initialize event for Userforms
Modified:
trunk/patches/test/vba/ObjectModule.diff
Modified: trunk/patches/test/vba/ObjectModule.diff
==============================================================================
--- trunk/patches/test/vba/ObjectModule.diff (original)
+++ trunk/patches/test/vba/ObjectModule.diff Tue Jun 24 13:58:39 2008
@@ -223,7 +223,7 @@
};
diff --git basic/inc/basic/sbobjmod.hxx basic/inc/basic/sbobjmod.hxx
-index bdc23d9..15f6352 100644
+index bdc23d9..ecc1a8c 100644
--- basic/inc/basic/sbobjmod.hxx
+++ basic/inc/basic/sbobjmod.hxx
@@ -56,6 +56,7 @@ public:
@@ -234,6 +234,15 @@
};
class SbUserFormModule : public SbObjModule
+@@ -66,7 +67,7 @@ class SbUserFormModule : public SbObjMod
+ String sFormName;
+ SbUserFormModule( const SbUserFormModule& );
+ SbUserFormModule();
+-
++ bool mbInit;
+ protected:
+ virtual void InitObject();
+ public:
diff --git basic/source/basmgr/basmgr.cxx basic/source/basmgr/basmgr.cxx
index b5394ae..f12312e 100644
--- basic/source/basmgr/basmgr.cxx
@@ -346,7 +355,7 @@
if( xScriptCont.is() )
{
diff --git basic/source/classes/sbxmod.cxx basic/source/classes/sbxmod.cxx
-index 3f9e76c..8083eaa 100644
+index 3f9e76c..af126c2 100644
--- basic/source/classes/sbxmod.cxx
+++ basic/source/classes/sbxmod.cxx
@@ -2250,25 +2250,26 @@ SbObjModule::SbObjModule( const com::sun
@@ -400,6 +409,48 @@
{
uno::Reference< awt::XTopWindow > xList( mxComponent, uno::UNO_QUERY_THROW );;
//uno::Reference< awt::XWindow > xList( mxComponent, uno::UNO_QUERY_THROW );;
+@@ -2359,7 +2360,7 @@ public:
+ };
+
+ SbUserFormModule::SbUserFormModule( const com::sun::star::script::ModuleInfo& mInfo, bool bIsCompat )
+- :SbObjModule( mInfo, bIsCompat )
++ :SbObjModule( mInfo, bIsCompat ), mbInit( false )
+ {
+ m_xModel.set( mInfo.ModuleObject, uno::UNO_QUERY_THROW );
+ }
+@@ -2400,12 +2401,13 @@ void SbUserFormModule::triggerDeActivate
+ }
+
+ void SbUserFormModule::triggerInitializeEvent( void )
+-
+ {
++ if ( mbInit )
++ return;
+ OSL_TRACE("**** SbUserFormModule::triggerInitializeEvent");
+ static String aInitMethodName( RTL_CONSTASCII_USTRINGPARAM("Userform_Initialize") );
++ mbInit = true;
+ triggerMethod( aInitMethodName );
+-
+ }
+
+ void SbUserFormModule::triggerTerminateEvent( void )
+@@ -2413,6 +2415,7 @@ void SbUserFormModule::triggerTerminateE
+ OSL_TRACE("**** SbUserFormModule::triggerTerminateEvent");
+ static String aTermMethodName( RTL_CONSTASCII_USTRINGPARAM("Userform_Terminate") );
+ triggerMethod( aTermMethodName );
++ mbInit=false;
+ }
+
+ void SbUserFormModule::load()
+@@ -2470,7 +2473,7 @@ void SbUserFormModule::InitObject()
+ m_DialogListener = new FormObjEventListenerImpl( this, xComponent );
+
+ // trigger initialise event
+- triggerInitializeEvent();
++ //triggerInitializeEvent();
+ }
+ }
+ catch( uno::Exception& e )
diff --git basic/source/inc/namecont.hxx basic/source/inc/namecont.hxx
index e5b3d76..ac4278b 100644
--- basic/source/inc/namecont.hxx
@@ -525,6 +576,32 @@
);
};
+diff --git basic/source/runtime/step2.cxx basic/source/runtime/step2.cxx
+index 0e7e68d..af41ee1 100644
+--- basic/source/runtime/step2.cxx
++++ basic/source/runtime/step2.cxx
+@@ -39,6 +39,7 @@
+ #include "sbintern.hxx"
+ #include "sbunoobj.hxx"
+ #include "opcodes.hxx"
++#include "basic/sbobjmod.hxx"
+
+ #include <com/sun/star/container/XIndexAccess.hpp>
+ #include <com/sun/star/script/XDefaultMethod.hpp>
+@@ -707,8 +708,12 @@ void SbiRuntime::StepELEM( UINT32 nOp1,
+ // zu fueh die Referenz verlieren
+ // #74254 Jetzt per Liste
+ if( pObj )
++ {
++ SbUserFormModule* pUserForm = PTR_CAST(SbUserFormModule,(SbxVariable*) pObjVar);
++ if ( pUserForm )
++ pUserForm->triggerInitializeEvent();
+ SaveRef( (SbxVariable*)pObj );
+-
++ }
+ PushVar( FindElement( pObj, nOp1, nOp2, SbERR_NO_METHOD, FALSE ) );
+ }
+
diff --git basic/source/uno/dlgcont.cxx basic/source/uno/dlgcont.cxx
index 91efe9d..9920651 100644
--- basic/source/uno/dlgcont.cxx
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]