ooo-build r13622 - in trunk: . patches/vba
- From: noelpwer svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r13622 - in trunk: . patches/vba
- Date: Tue, 19 Aug 2008 10:09:02 +0000 (UTC)
Author: noelpwer
Date: Tue Aug 19 10:09:01 2008
New Revision: 13622
URL: http://svn.gnome.org/viewvc/ooo-build?rev=13622&view=rev
Log:
2008-08-19 Noel Power <noel power novell com>
* patches/vba/vba-userform.diff: oops neglected commit to fix false
initialise event call when using userform module scope variables. Also
fix core when attempting to unload ( an un-shown ) userform object
Modified:
trunk/ChangeLog
trunk/patches/vba/vba-userform.diff
Modified: trunk/patches/vba/vba-userform.diff
==============================================================================
--- trunk/patches/vba/vba-userform.diff (original)
+++ trunk/patches/vba/vba-userform.diff Tue Aug 19 10:09:01 2008
@@ -12,7 +12,7 @@
protected:
::rtl::OUString aOUSource;
diff --git basic/inc/basic/sbobjmod.hxx basic/inc/basic/sbobjmod.hxx
-index 7a8f096..bdc23d9 100644
+index 7a8f096..eeb7869 100644
--- basic/inc/basic/sbobjmod.hxx
+++ basic/inc/basic/sbobjmod.hxx
@@ -41,6 +41,7 @@
@@ -32,7 +32,7 @@
public:
TYPEINFO();
SbObjModule( const com::sun::star::script::ModuleInfo& mInfo, bool bIsVbaCompatible );
-@@ -55,6 +58,31 @@ public:
+@@ -55,6 +58,32 @@ public:
SbxVariable* GetObject();
};
@@ -42,6 +42,7 @@
+ css::uno::Reference<css::awt::XDialog> m_xDialog;
+ css::uno::Reference<css::frame::XModel> m_xModel;
+ String sFormName;
++ bool mbInit;
+ SbUserFormModule( const SbUserFormModule& );
+ SbUserFormModule();
+
@@ -68,7 +69,7 @@
index 5226d3f..e47234f 100644
--- basic/source/classes/sb.cxx
+++ basic/source/classes/sb.cxx
-@@ -715,6 +715,9 @@ SbModule* StarBASIC::MakeModule32( const ModuleInfo& mInfo )
+@@ -715,6 +715,9 @@ SbModule* StarBASIC::MakeModule32( const
p = new SbModule( mInfo.ModuleName, isVBAEnabled() );
p->SetModuleType( com::sun::star::script::ModuleType::Class );
break;
@@ -78,7 +79,7 @@
default:
p = new SbModule( mInfo.ModuleName, isVBAEnabled() );
-@@ -900,9 +903,8 @@ SbxVariable* StarBASIC::Find( const String& rName, SbxClassType t )
+@@ -900,9 +903,8 @@ SbxVariable* StarBASIC::Find( const Stri
// Only variables qualified by the Module Name e.g. Sheet1.foo
// should work for Documant && Class type Modules
INT32 nType = p->GetModuleType();
@@ -91,7 +92,7 @@
// GBLSEARCH-Flag rausnehmen (wg. Rekursion)
USHORT nGblFlag = p->GetFlags() & SBX_GBLSEARCH;
diff --git basic/source/classes/sbxmod.cxx basic/source/classes/sbxmod.cxx
-index 5ad04db..24921f8 100644
+index 5ad04db..bfb0cf6 100644
--- basic/source/classes/sbxmod.cxx
+++ basic/source/classes/sbxmod.cxx
@@ -73,7 +73,6 @@
@@ -102,7 +103,7 @@
#include <cppuhelper/implbase1.hxx>
#include <comphelper/anytostring.hxx>
-@@ -86,6 +85,7 @@ TYPEINIT1(SbProcedureProperty,SbxProperty)
+@@ -86,6 +85,7 @@ TYPEINIT1(SbProcedureProperty,SbxPropert
TYPEINIT1(SbJScriptModule,SbModule)
TYPEINIT1(SbJScriptMethod,SbMethod)
TYPEINIT1(SbObjModule,SbModule)
@@ -110,7 +111,7 @@
SV_DECL_VARARR(SbiBreakpoints,USHORT,4,4)
SV_IMPL_VARARR(SbiBreakpoints,USHORT)
-@@ -2230,6 +2230,11 @@ SbObjModule::SbObjModule( const com::sun::star::script::ModuleInfo& mInfo, bool
+@@ -2230,6 +2230,11 @@ SbObjModule::SbObjModule( const com::sun
: SbModule( mInfo.ModuleName, bIsVbaCompatible )
{
SetModuleType( mInfo.ModuleType );
@@ -122,7 +123,7 @@
try
{
com::sun::star::uno::Any aObject( mInfo.ModuleObject );
-@@ -2266,6 +2271,224 @@ SbObjModule::Find( const XubString& rName, SbxClassType t )
+@@ -2266,6 +2271,228 @@ SbObjModule::Find( const XubString& rNam
pVar = SbModule::Find( rName, t );
return pVar;
}
@@ -217,7 +218,7 @@
+};
+
+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 );
+}
@@ -260,10 +261,12 @@
+void SbUserFormModule::triggerInitializeEvent( void )
+
+{
++ if ( mbInit )
++ return;
+ OSL_TRACE("**** SbUserFormModule::triggerInitializeEvent");
+ static String aInitMethodName( RTL_CONSTASCII_USTRINGPARAM("Userform_Initialize") );
+ triggerMethod( aInitMethodName );
-+
++ mbInit = true;
+}
+
+void SbUserFormModule::triggerTerminateEvent( void )
@@ -271,6 +274,7 @@
+ OSL_TRACE("**** SbUserFormModule::triggerTerminateEvent");
+ static String aTermMethodName( RTL_CONSTASCII_USTRINGPARAM("Userform_Terminate") );
+ triggerMethod( aTermMethodName );
++ mbInit=false;
+}
+
+void SbUserFormModule::load()
@@ -295,6 +299,8 @@
+ m_xDialog = NULL; //release ref to the uno object
+ SbxValues aVals;
+ pMeth->Get( aVals );
++ ResetApiObj();
++ OSL_TRACE("UnloadObject completed ( we hope )");
+ }
+}
+
@@ -327,7 +333,6 @@
+ pFormListener->removeListener();
+ m_DialogListener = new FormObjEventListenerImpl( this, xComponent );
+
-+ // trigger initialise event
+ triggerInitializeEvent();
+ }
+ }
@@ -340,7 +345,7 @@
+SbxVariable*
+SbUserFormModule::Find( const XubString& rName, SbxClassType t )
+{
-+ if ( !pDocObject )
++ if ( !pDocObject && pImage->bInit )
+ InitObject();
+ return SbObjModule::Find( rName, t );
+}
@@ -348,7 +353,7 @@
SbProperty::SbProperty( const String& r, SbxDataType t, SbModule* p )
diff --git basic/source/runtime/methods.cxx basic/source/runtime/methods.cxx
-index 7e7d42a..32cf5ad 100644
+index 792bce2..a0c3cad 100644
--- basic/source/runtime/methods.cxx
+++ basic/source/runtime/methods.cxx
@@ -126,6 +126,8 @@ using namespace com::sun::star::io;
@@ -360,7 +365,7 @@
static void FilterWhiteSpace( String& rStr )
{
rStr.EraseAllChars( ' ' );
-@@ -4128,7 +4130,12 @@ RTLFUNC(Load)
+@@ -4135,7 +4137,12 @@ RTLFUNC(Load)
// Diesen Call einfach an das Object weiterreichen
SbxBase* pObj = (SbxObject*)rPar.Get(1)->GetObject();
@@ -374,7 +379,7 @@
{
SbxVariable* pVar = ((SbxObject*)pObj)->
Find( String( RTL_CONSTASCII_USTRINGPARAM("Load") ), SbxCLASS_METHOD );
-@@ -4151,7 +4158,12 @@ RTLFUNC(Unload)
+@@ -4158,7 +4165,12 @@ RTLFUNC(Unload)
// Diesen Call einfach an das Object weitereichen
SbxBase* pObj = (SbxObject*)rPar.Get(1)->GetObject();
@@ -388,23 +393,11 @@
{
SbxVariable* pVar = ((SbxObject*)pObj)->
Find( String( RTL_CONSTASCII_USTRINGPARAM("Unload") ), SbxCLASS_METHOD );
-diff --git smoketestoo_native/smoketest.pl smoketestoo_native/smoketest.pl
-index b6381e2..757b212 100755
---- smoketestoo_native/smoketest.pl
-+++ smoketestoo_native/smoketest.pl
-@@ -485,6 +485,7 @@ sub doTest {
-
- createPath ($LOGPATH, $error_copyExtension);
- $Command = "$COPY_FILE \"$ExtensionDir" . "TestExtension.oxt\" " . "\"$LOGPATH$PathSeparator\"";
-+ print "***** $Command\n";
- execute_Command ($Command, $error_copyExtension, $show_Message, $command_withoutOutput);
-
-
diff --git svx/source/msfilter/svxmsbas.cxx svx/source/msfilter/svxmsbas.cxx
index 441562a..7acf7db 100644
--- svx/source/msfilter/svxmsbas.cxx
+++ svx/source/msfilter/svxmsbas.cxx
-@@ -425,15 +425,20 @@ BOOL SvxImportMSVBasic::ImportCode_Impl( const String& rStorageName,
+@@ -425,15 +425,20 @@ BOOL SvxImportMSVBasic::ImportCode_Impl(
Any aSourceAny;
OSL_TRACE("erm %d", mType );
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]