ooo-build r12719 - in trunk: . patches/dev300 patches/vba
- From: noelpwer svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r12719 - in trunk: . patches/dev300 patches/vba
- Date: Thu, 29 May 2008 21:40:16 +0000 (UTC)
Author: noelpwer
Date: Thu May 29 21:40:16 2008
New Revision: 12719
URL: http://svn.gnome.org/viewvc/ooo-build?rev=12719&view=rev
Log:
2008-05-29 Noel Power <noel power novell com>
* patches/dev300/apply: add controls tooltip patch
* patches/dev300/import-controls-tooltip.diff:
* patches/vba/vba-dialogs-fixsmoketest.diff:
* patches/vba/ObjectModule.diff: tweak for userforms
* patches/vba/vba-userform.diff: userforms
Added:
trunk/patches/dev300/import-controls-tooltip.diff
trunk/patches/vba/vba-dialogs-fixsmoketest.diff
trunk/patches/vba/vba-userform.diff
Modified:
trunk/ChangeLog
trunk/patches/dev300/apply
trunk/patches/vba/ObjectModule.diff
Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply (original)
+++ trunk/patches/dev300/apply Thu May 29 21:40:16 2008
@@ -467,6 +467,8 @@
# import/export form control's visibility
form-control-visibility.diff, i#88878, jianhua
+# import tooltip for userforms
+import-controls-tooltip.diff, i#90124, noelpwer
[ RadioButtons ]
# Add a GroupName property to RadioButtons so that RadioButtons don't need to
# share the same name to be part of the same group.
@@ -1486,6 +1488,10 @@
vba-support-properties-inmodules.diff
# object module support... getting there
ObjectModule.diff
+# userform ( depends on ObjectModule.diff )
+vba-userform.diff
+# another bug with event bindings for dialogs ( awaiting iz id from andreas )
+vba-dialogs-fixsmoketest.diff
[ VBAUntested ]
SectionOwner => noelpwer
# total hack at the moment, getting smaller
Added: trunk/patches/dev300/import-controls-tooltip.diff
==============================================================================
--- (empty file)
+++ trunk/patches/dev300/import-controls-tooltip.diff Thu May 29 21:40:16 2008
@@ -0,0 +1,60 @@
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/svx/inc/svx/msocximex.hxx 2008-04-02 12:14:58.000000000 +0100
++++ svx/inc/svx/msocximex.hxx 2008-04-01 15:22:20.000000000 +0100
+@@ -298,6 +298,7 @@ public:
+ sal_Int32 mnForeColor;
+ sal_uInt16 mnTabPos;
+ UniString sName;
++ UniString msToolTip;
+ OCX_FontData aFontData;
+ SfxObjectShell *pDocSh;
+ protected:
+@@ -908,7 +908,7 @@ public:
+ sal_uInt8 nKeepScrollBarsVisible;
+ sal_uInt8 nCycle;
+ sal_uInt16 nBorderStyle;
+- sal_uInt16 nSpecialEffect;
++ sal_uInt8 nSpecialEffect;
+ sal_uInt16 nPicture;
+ sal_uInt8 nPictureAlignment;
+ sal_uInt8 nPictureSizeMode;
+--- /data4/OOOBuildM12/ooo-build/build/ooh680-m12/svx/source/msfilter/msocximex.cxx 2008-04-02 15:01:33.000000000 +0100
++++ svx/source/msfilter/msocximex.cxx 2008-04-02 14:49:08.000000000 +0100
+@@ -746,13 +746,16 @@ class ContainerRecReader
+ ReadAlign( pS, pS->Tell() - nStartPos, 4 );
+ *pS >> rec.nLeft >> rec.nTop;
+ }
+-
++
+ // control infotip
+ sal_uInt32 nTipBufSize = lclGetBufferSize( nTipLen );
+ if( nTipBufSize > 0 )
+ {
++ std::auto_ptr< sal_Char > pTipName;
++ pTipName.reset( new sal_Char[ nTipBufSize ] );
+ ReadAlign( pS, pS->Tell() - nStartPos, 4 );
+- pS->SeekRel( nTipBufSize );
++ pS->Read( pTipName.get(), nTipBufSize );
++ rec.controlTip = lclCreateOUString( pTipName.get(), nTipLen );
+ }
+ // control id
+ sal_uInt32 nCntrlIdSize = lclGetBufferSize( nCntrlIdLen );
+@@ -1262,6 +1265,11 @@ sal_Bool OCX_Control::Import(uno::Refere
+ xPropSet->setPropertyValue(WW8_ASCII2STR("Width"), aTmp);
+ aTmp <<= sal_Int32((nHeight * 2) / 100);
+ xPropSet->setPropertyValue(WW8_ASCII2STR("Height"), aTmp);
++ if ( msToolTip.Len() > 0 )
++ {
++ uno::Any aTmp(&msToolTip,getCppuType((OUString *)0));
++ xPropSet->setPropertyValue(WW8_ASCII2STR("HelpText"), aTmp);
++ }
+
+ if ( mnStep )
+ {
+@@ -3664,6 +3666,7 @@ void OCX_ContainerControl::ProcessContro
+ }
+
+ pControl->sName = rec.cName;
++ pControl->msToolTip = rec.controlTip;
+ // Position of controls is relative to the container
+ pControl->mnTop = rec.nTop + mnTop;
+ pControl->mnLeft = rec.nLeft + mnLeft;
Modified: trunk/patches/vba/ObjectModule.diff
==============================================================================
--- trunk/patches/vba/ObjectModule.diff (original)
+++ trunk/patches/vba/ObjectModule.diff Thu May 29 21:40:16 2008
@@ -778,8 +778,8 @@
else
{
pCLASSFAC->RemoveClassModule( &rMod );
-+ // A Document module's type cannot be changed
-+ if ( rMod.mnType != com::sun::star::script::ModuleType::Document )
++ // Only a ClassModule can revert to Normal
++ if ( rMod.mnType == com::sun::star::script::ModuleType::Class )
+ rMod.mnType = com::sun::star::script::ModuleType::Normal;
+ rMod.bIsProxyModule = false;
}
Added: trunk/patches/vba/vba-dialogs-fixsmoketest.diff
==============================================================================
--- (empty file)
+++ trunk/patches/vba/vba-dialogs-fixsmoketest.diff Thu May 29 21:40:16 2008
@@ -0,0 +1,24 @@
+diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx
+index 81d7cd0..45f53ac 100644
+--- xmlscript/source/xmldlg_imexp/xmldlg_import.cxx
++++ xmlscript/source/xmldlg_imexp/xmldlg_import.cxx
+@@ -1452,7 +1452,18 @@ void ImportContext::importEvents(
+ descr.ScriptCode = buf.makeStringAndClear();
+ }
+ }
+-
++ else if ( descr.ScriptType.equals( OUString( RTL_CONSTASCII_USTRINGPARAM( "Script" ) ) ) )
++ {
++ // Check if there is a protocol, if not assume
++ // this is an early scripting framework url ( without
++ // the protocol ) and fix it up!!
++ if ( descr.ScriptCode.indexOf( ':' ) == -1 )
++ {
++ ::rtl::OUStringBuffer buf;
++ buf.append( OUString( RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.script:" ) ) );
++ buf.append( descr.ScriptCode );
++ }
++ }
+
+ // script:event element
+ if (aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("event") ))
Added: trunk/patches/vba/vba-userform.diff
==============================================================================
--- (empty file)
+++ trunk/patches/vba/vba-userform.diff Thu May 29 21:40:16 2008
@@ -0,0 +1,407 @@
+diff --git basic/inc/basic/sbmod.hxx basic/inc/basic/sbmod.hxx
+index e676a49..ab496bc 100644
+--- basic/inc/basic/sbmod.hxx
++++ basic/inc/basic/sbmod.hxx
+@@ -59,6 +59,8 @@ class SbModule : public SbxObject
+ friend class SbClassModuleObject;
+
+ SbModuleImpl* mpSbModuleImpl; // Impl data
++ SbModule();
++ SbModule(const SbModule&);
+
+ protected:
+ ::rtl::OUString aOUSource;
+diff --git basic/inc/basic/sbobjmod.hxx basic/inc/basic/sbobjmod.hxx
+index 7a8f096..bdc23d9 100644
+--- basic/inc/basic/sbobjmod.hxx
++++ basic/inc/basic/sbobjmod.hxx
+@@ -41,6 +41,7 @@
+ #include <com/sun/star/script/ModuleInfo.hpp>
+ #include <com/sun/star/lang/XEventListener.hpp>
+ #include <com/sun/star/awt/XDialog.hpp>
++#include <com/sun/star/frame/XModel.hpp>
+
+ namespace css = ::com::sun::star;
+
+@@ -48,6 +49,8 @@ namespace css = ::com::sun::star;
+
+ class SbObjModule : public SbModule
+ {
++ SbObjModule( const SbObjModule& );
++ SbObjModule();
+ public:
+ TYPEINFO();
+ SbObjModule( const com::sun::star::script::ModuleInfo& mInfo, bool bIsVbaCompatible );
+@@ -55,6 +58,31 @@ public:
+ SbxVariable* GetObject();
+ };
+
++class SbUserFormModule : public SbObjModule
++{
++ css::uno::Reference<css::lang::XEventListener> m_DialogListener;
++ css::uno::Reference<css::awt::XDialog> m_xDialog;
++ css::uno::Reference<css::frame::XModel> m_xModel;
++ String sFormName;
++ SbUserFormModule( const SbUserFormModule& );
++ SbUserFormModule();
++
++protected:
++ virtual void InitObject();
++public:
++ TYPEINFO();
++ SbUserFormModule( const com::sun::star::script::ModuleInfo& mInfo, bool bIsVBACompat );
++ virtual SbxVariable* Find( const XubString& rName, SbxClassType t );
++ void ResetApiObj();
++ void Unload();
++ void load();
++ void triggerMethod( const String& );
++ void triggerActivateEvent();
++ void triggerDeActivateEvent();
++ void triggerInitializeEvent();
++ void triggerTerminateEvent();
++};
++
+ #ifndef __SB_SBOBJMODULEREF_HXX
+ #define __SB_SBOBJMODULEREF_HXX
+
+diff --git basic/source/classes/sb.cxx basic/source/classes/sb.cxx
+index 5226d3f..e47234f 100644
+--- basic/source/classes/sb.cxx
++++ basic/source/classes/sb.cxx
+@@ -715,6 +715,9 @@ SbModule* StarBASIC::MakeModule32( const
+ p = new SbModule( mInfo.ModuleName, isVBAEnabled() );
+ p->SetModuleType( com::sun::star::script::ModuleType::Class );
+ break;
++ case ModuleType::Form:
++ p = new SbUserFormModule( mInfo, isVBAEnabled() );
++ break;
+ default:
+ p = new SbModule( mInfo.ModuleName, isVBAEnabled() );
+
+@@ -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();
+- //if ( nType == com::sun::star::script::ModuleType::Class || nType == com::sun::star::script::ModuleType::Document )
+- if ( nType == com::sun::star::script::ModuleType::Document )
+- continue;
++ if ( nType == com::sun::star::script::ModuleType::Document || nType == com::sun::star::script::ModuleType::Form )
++ continue;
+ // Sonst testen, ob das Element vorhanden ist
+ // GBLSEARCH-Flag rausnehmen (wg. Rekursion)
+ USHORT nGblFlag = p->GetFlags() & SBX_GBLSEARCH;
+diff --git basic/source/classes/sbxmod.cxx basic/source/classes/sbxmod.cxx
+index 388f437..3f9e76c 100644
+--- basic/source/classes/sbxmod.cxx
++++ basic/source/classes/sbxmod.cxx
+@@ -73,7 +73,6 @@
+ #include <com/sun/star/awt/XDialogProvider.hpp>
+ #include <com/sun/star/awt/XTopWindow.hpp>
+ #include <com/sun/star/awt/XControl.hpp>
+-#include <com/sun/star/frame/XModel.hpp>
+ #include <cppuhelper/implbase1.hxx>
+ #include <comphelper/anytostring.hxx>
+
+@@ -86,6 +85,7 @@ TYPEINIT1(SbProcedureProperty,SbxPropert
+ TYPEINIT1(SbJScriptModule,SbModule)
+ TYPEINIT1(SbJScriptMethod,SbMethod)
+ TYPEINIT1(SbObjModule,SbModule)
++TYPEINIT1(SbUserFormModule,SbObjModule)
+
+ SV_DECL_VARARR(SbiBreakpoints,USHORT,4,4)
+ SV_IMPL_VARARR(SbiBreakpoints,USHORT)
+@@ -2247,6 +2247,11 @@ SbObjModule::SbObjModule( const com::sun
+ : SbModule( mInfo.ModuleName, bIsVbaCompatible )
+ {
+ SetModuleType( mInfo.ModuleType );
++ if ( mInfo.ModuleType == script::ModuleType::Form )
++ {
++ SetClassName( rtl::OUString::createFromAscii( "Form" ) );
++ return;
++ }
+ try
+ {
+ com::sun::star::uno::Any aObject( mInfo.ModuleObject );
+@@ -2283,3 +2288,201 @@ SbObjModule::Find( const XubString& rNam
+ pVar = SbModule::Find( rName, t );
+ return pVar;
+ }
++
++typedef ::cppu::WeakImplHelper1< awt::XTopWindowListener > EventListener_BASE;
++
++class FormObjEventListenerImpl : public EventListener_BASE
++{
++ SbUserFormModule* mpUserForm;
++ uno::Reference< lang::XComponent > mxComponent;
++ bool mbDisposed;
++ FormObjEventListenerImpl(); // not defined
++ FormObjEventListenerImpl(const FormObjEventListenerImpl&); // not defined
++public:
++ FormObjEventListenerImpl( SbUserFormModule* pUserForm, const uno::Reference< lang::XComponent >& xComponent ) : mpUserForm( pUserForm ), mxComponent( xComponent) , mbDisposed( false )
++ {
++ if ( mxComponent.is() );
++ {
++ uno::Reference< awt::XTopWindow > xList( mxComponent, uno::UNO_QUERY_THROW );;
++ //uno::Reference< awt::XWindow > xList( mxComponent, uno::UNO_QUERY_THROW );;
++ OSL_TRACE("*********** Registering the listener");
++ xList->addTopWindowListener( this );
++ }
++ }
++
++ ~FormObjEventListenerImpl()
++ {
++ removeListener();
++ }
++ void removeListener()
++ {
++ try
++ {
++ if ( mxComponent.is() && !mbDisposed )
++ {
++ uno::Reference< awt::XTopWindow > xList( mxComponent, uno::UNO_QUERY_THROW );;
++ OSL_TRACE("*********** Removing the listener");
++ xList->removeTopWindowListener( this );
++ mxComponent = NULL;
++ }
++ }
++ catch( uno::Exception& ) {}
++ }
++ virtual void SAL_CALL windowOpened( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException) {}
++ 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) {}
++ virtual void SAL_CALL windowNormalized( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException){}
++ virtual void SAL_CALL windowActivated( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException)
++ {
++ if ( mpUserForm )
++ mpUserForm->triggerActivateEvent();
++ }
++
++ virtual void SAL_CALL windowDeactivated( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException)
++ {
++ if ( mpUserForm )
++ mpUserForm->triggerDeActivateEvent();
++ }
++
++
++ virtual void SAL_CALL disposing( const lang::EventObject& Source ) throw (uno::RuntimeException)
++ {
++ OSL_TRACE("** Userform/Dialog disposing");
++ mbDisposed = true;
++ uno::Any aSource;
++ aSource <<= Source;
++ mxComponent = NULL;
++ if ( mpUserForm )
++ mpUserForm->ResetApiObj();
++ }
++};
++
++SbUserFormModule::SbUserFormModule( const com::sun::star::script::ModuleInfo& mInfo, bool bIsCompat )
++ :SbObjModule( mInfo, bIsCompat )
++{
++ m_xModel.set( mInfo.ModuleObject, uno::UNO_QUERY_THROW );
++}
++
++void SbUserFormModule::ResetApiObj()
++{
++ if ( m_xDialog.is() ) // probably someone close the dialog window
++ {
++ triggerTerminateEvent();
++ }
++ pDocObject = NULL;
++ m_xDialog = NULL;
++}
++
++void SbUserFormModule::triggerMethod( const String& aMethodToRun )
++{
++ OSL_TRACE("*** trigger %s ***", rtl::OUStringToOString( aMethodToRun, RTL_TEXTENCODING_UTF8 ).getStr() );
++ // Search method
++ SbxVariable* pMeth = SbObjModule::Find( aMethodToRun, SbxCLASS_METHOD );
++ if( pMeth )
++ {
++ SbxValues aVals;
++ pMeth->Get( aVals );
++ }
++}
++
++void SbUserFormModule::triggerActivateEvent( void )
++{
++ OSL_TRACE("**** entering SbUserFormModule::triggerActivate");
++ triggerMethod( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("UserForm_activate") ) );
++ OSL_TRACE("**** leaving SbUserFormModule::triggerActivate");
++}
++
++void SbUserFormModule::triggerDeActivateEvent( void )
++{
++ OSL_TRACE("**** SbUserFormModule::triggerDeActivate");
++ triggerMethod( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Userform_DeActivate") ) );
++}
++
++void SbUserFormModule::triggerInitializeEvent( void )
++
++{
++ OSL_TRACE("**** SbUserFormModule::triggerInitializeEvent");
++ static String aInitMethodName( RTL_CONSTASCII_USTRINGPARAM("Userform_Initialize") );
++ triggerMethod( aInitMethodName );
++
++}
++
++void SbUserFormModule::triggerTerminateEvent( void )
++{
++ OSL_TRACE("**** SbUserFormModule::triggerTerminateEvent");
++ static String aTermMethodName( RTL_CONSTASCII_USTRINGPARAM("Userform_Terminate") );
++ triggerMethod( aTermMethodName );
++}
++
++void SbUserFormModule::load()
++{
++ OSL_TRACE("** load() ");
++ // forces a load
++ if ( !pDocObject )
++ InitObject();
++}
++void SbUserFormModule::Unload()
++{
++ OSL_TRACE("** Unload() ");
++ if ( m_xDialog.is() )
++ {
++ triggerTerminateEvent();
++ }
++ // Search method
++ SbxVariable* pMeth = SbObjModule::Find( String( RTL_CONSTASCII_USTRINGPARAM( "UnloadObject" ) ), SbxCLASS_METHOD );
++ if( pMeth )
++ {
++ OSL_TRACE("Attempting too run the UnloadObjectMethod");
++ m_xDialog = NULL; //release ref to the uno object
++ SbxValues aVals;
++ pMeth->Get( aVals );
++ }
++}
++
++void SbUserFormModule::InitObject()
++{
++ try
++ {
++
++ if ( m_xModel.is() )
++ {
++ uno::Reference< lang::XMultiServiceFactory > xFactory = comphelper::getProcessServiceFactory();
++ uno::Sequence< uno::Any > aArgs(1);
++ aArgs[ 0 ] <<= m_xModel;
++ rtl::OUString sDialogUrl( RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.script:" ) );
++ sDialogUrl = sDialogUrl.concat( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Standard") ) ).concat( rtl::OUString( '.') ).concat( GetName() ).concat( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("?location=document") ) );
++
++ uno::Reference< awt::XDialogProvider > xProvider( xFactory->createInstanceWithArguments( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.DialogProvider")), aArgs ), uno::UNO_QUERY_THROW );
++ m_xDialog = xProvider->createDialog( sDialogUrl );
++
++ // create vba api object
++ aArgs.realloc( 3 );
++ aArgs[ 0 ] = uno::Any();
++ aArgs[ 1 ] <<= m_xDialog;
++ aArgs[ 2 ] <<= m_xModel;
++ pDocObject = new SbUnoObject( GetName(), uno::makeAny( xFactory->createInstanceWithArguments( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.UserForm")), aArgs ) ) );
++ uno::Reference< lang::XComponent > xComponent( aArgs[ 1 ], uno::UNO_QUERY_THROW );
++ // remove old listener if it exists
++ FormObjEventListenerImpl* pFormListener = dynamic_cast< FormObjEventListenerImpl* >( m_DialogListener.get() );
++ if ( pFormListener )
++ pFormListener->removeListener();
++ m_DialogListener = new FormObjEventListenerImpl( this, xComponent );
++
++ // trigger initialise event
++ triggerInitializeEvent();
++ }
++ }
++ catch( uno::Exception& e )
++ {
++ }
++
++}
++
++SbxVariable*
++SbUserFormModule::Find( const XubString& rName, SbxClassType t )
++{
++ if ( !pDocObject )
++ InitObject();
++ return SbObjModule::Find( rName, t );
++}
+diff --git basic/source/runtime/methods.cxx basic/source/runtime/methods.cxx
+index 2bbd6f1..a35a17a 100644
+--- basic/source/runtime/methods.cxx
++++ basic/source/runtime/methods.cxx
+@@ -124,6 +124,8 @@ using namespace com::sun::star::io;
+ #include <io.h>
+ #endif
+
++#include <basic/sbobjmod.hxx>
++
+ static void FilterWhiteSpace( String& rStr )
+ {
+ rStr.EraseAllChars( ' ' );
+@@ -4126,7 +4128,12 @@ RTLFUNC(Load)
+
+ // Diesen Call einfach an das Object weiterreichen
+ SbxBase* pObj = (SbxObject*)rPar.Get(1)->GetObject();
+- if( pObj && pObj->IsA( TYPE( SbxObject ) ) )
++ if( pObj && pObj->IsA( TYPE( SbUserFormModule ) ) )
++ {
++ SbUserFormModule* pFormModule = ( SbUserFormModule* )pObj;
++ pFormModule->load();
++ }
++ else if( pObj && pObj->IsA( TYPE( SbxObject ) ) )
+ {
+ SbxVariable* pVar = ((SbxObject*)pObj)->
+ Find( String( RTL_CONSTASCII_USTRINGPARAM("Load") ), SbxCLASS_METHOD );
+@@ -4149,7 +4156,12 @@ RTLFUNC(Unload)
+
+ // Diesen Call einfach an das Object weitereichen
+ SbxBase* pObj = (SbxObject*)rPar.Get(1)->GetObject();
+- if( pObj && pObj->IsA( TYPE( SbxObject ) ) )
++ if( pObj && pObj->IsA( TYPE( SbUserFormModule ) ) )
++ {
++ SbUserFormModule* pFormModule = ( SbUserFormModule* )pObj;
++ pFormModule->Unload();
++ }
++ else if( pObj && pObj->IsA( TYPE( SbxObject ) ) )
+ {
+ SbxVariable* pVar = ((SbxObject*)pObj)->
+ Find( String( RTL_CONSTASCII_USTRINGPARAM("Unload") ), SbxCLASS_METHOD );
+diff --git smoketestoo_native/smoketest.pl smoketestoo_native/smoketest.pl
+index 5fc4db2..376f871 100755
+--- smoketestoo_native/smoketest.pl
++++ smoketestoo_native/smoketest.pl
+@@ -486,6 +486,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 27d8054..0d09b04 100644
+--- svx/source/msfilter/svxmsbas.cxx
++++ svx/source/msfilter/svxmsbas.cxx
+@@ -403,15 +403,20 @@ BOOL SvxImportMSVBasic::ImportCode_Impl(
+
+ Any aSourceAny;
+ OSL_TRACE("erm %d", mType );
+- if ( xVBAObjectForCodeName.is() && ( mType == ModuleType::Document || mType == ModuleType::Class ) )
++ if ( xVBAObjectForCodeName.is() && ( mType == ModuleType::Document || mType == ModuleType::Class || mType == ModuleType::Form ) )
+ {
+ OSL_TRACE("vba processing %d", mType );
+ script::ModuleInfo sModuleInfo;
+ sModuleInfo.ModuleName = aModName;
+ sModuleInfo.ModuleSource = aSource;
+ sModuleInfo.ModuleType = mType;
+- if ( mType != ModuleType::Class )
+- sModuleInfo.ModuleObject.set( xVBAObjectForCodeName->getByName( aModName ), UNO_QUERY );
++ if ( mType == ModuleType::Form )
++ // hack, the module ( in document basic should...
++ // know the XModel... ) needs fixing in basic
++ // somewhere
++ sModuleInfo.ModuleObject.set( rDocSh.GetModel(), UNO_QUERY );
++ else if ( mType != ModuleType::Class )
++ sModuleInfo.ModuleObject.set( xVBAObjectForCodeName->getByName( aModName ), UNO_QUERY );
+ aSourceAny <<= sModuleInfo;
+ }
+ else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]