ooo-build r11655 - in trunk: . patches/test/vba



Author: jiaojh
Date: Thu Feb 21 08:26:34 2008
New Revision: 11655
URL: http://svn.gnome.org/viewvc/ooo-build?rev=11655&view=rev

Log:
    * patches/test/vba/ModuleInfo.diff,
    patches/test/vba/ObjectModuleUITest.txt: update the BasicIDEShell
    inherent from XContainerListeneroption. And create Object Module
    UI test description.


Added:
   trunk/patches/test/vba/ObjectModuleUITest.txt
Modified:
   trunk/ChangeLog
   trunk/patches/test/vba/ModuleInfo.diff

Modified: trunk/patches/test/vba/ModuleInfo.diff
==============================================================================
--- trunk/patches/test/vba/ModuleInfo.diff	(original)
+++ trunk/patches/test/vba/ModuleInfo.diff	Thu Feb 21 08:26:34 2008
@@ -1,5 +1,5 @@
---- /dev/null	2007-09-22 05:50:58.000000000 +0800
-+++ udkapi/com/sun/star/script/ModuleInfo.idl	2007-12-28 13:15:09.000000000 +0800
+--- /dev/null	2007-05-04 18:54:36.000000000 +0800
++++ udkapi/com/sun/star/script/ModuleInfo.idl	2008-02-20 10:42:00.000000000 +0800
 @@ -0,0 +1,58 @@
 +/*************************************************************************
 + *
@@ -59,8 +59,8 @@
 +}; }; }; };
 +
 +#endif
---- /dev/null	2007-09-22 05:50:58.000000000 +0800
-+++ udkapi/com/sun/star/script/ModuleType.idl	2007-12-28 13:15:09.000000000 +0800
+--- /dev/null	2007-05-04 18:54:36.000000000 +0800
++++ udkapi/com/sun/star/script/ModuleType.idl	2008-02-20 10:42:00.000000000 +0800
 @@ -0,0 +1,58 @@
 +/*************************************************************************
 + *
@@ -120,8 +120,8 @@
 +}; }; }; };
 +
 +#endif
---- /dev/null	2007-09-22 05:50:58.000000000 +0800
-+++ udkapi/com/sun/star/script/XObjectProvider.idl	2007-12-28 13:15:09.000000000 +0800
+--- /dev/null	2007-05-04 18:54:36.000000000 +0800
++++ udkapi/com/sun/star/script/XObjectProvider.idl	2008-02-20 10:42:00.000000000 +0800
 @@ -0,0 +1,52 @@
 +/*************************************************************************
 + *
@@ -175,8 +175,8 @@
 +
 +};  };  };  };
 +#endif
---- udkapi/com/sun/star/script/makefile.mk.bak	2007-12-25 13:34:06.000000000 +0800
-+++ udkapi/com/sun/star/script/makefile.mk	2007-12-28 13:15:09.000000000 +0800
+--- udkapi/com/sun/star/script/makefile.mk.orig	2008-02-19 09:39:10.000000000 +0800
++++ udkapi/com/sun/star/script/makefile.mk	2008-02-20 10:42:59.000000000 +0800
 @@ -89,6 +89,9 @@ IDLFILES=\
  	XScriptEventsAttacher.idl\
  	XDefaultMethod.idl\
@@ -184,11 +184,11 @@
 +    ModuleInfo.idl\
 +    ModuleType.idl\
 +    XObjectProvider.idl\
+ 	DateType.idl\
  
  # ------------------------------------------------------------------
- 
---- svx/source/msfilter/msvbasic.hxx.bak	2007-12-25 13:34:06.000000000 +0800
-+++ svx/source/msfilter/msvbasic.hxx	2007-12-28 13:15:09.000000000 +0800
+--- svx/source/msfilter/msvbasic.hxx.orig	2006-06-20 00:20:43.000000000 +0800
++++ svx/source/msfilter/msvbasic.hxx	2008-02-20 10:42:00.000000000 +0800
 @@ -50,11 +50,13 @@
  #ifndef _DYNARY_HXX
  #include <tools/dynary.hxx>
@@ -212,8 +212,8 @@
  
  // #117718# define map to hold types of module
  //
---- svx/source/msfilter/svxmsbas.cxx.bak	2007-12-25 13:34:06.000000000 +0800
-+++ svx/source/msfilter/svxmsbas.cxx	2008-01-11 12:30:54.000000000 +0800
+--- svx/source/msfilter/svxmsbas.cxx.orig	2007-12-07 20:21:21.000000000 +0800
++++ svx/source/msfilter/svxmsbas.cxx	2008-02-20 10:42:00.000000000 +0800
 @@ -88,6 +88,7 @@ using namespace com::sun::star::awt;
  
  #include <com/sun/star/container/XNameContainer.hpp>
@@ -308,8 +308,8 @@
  		SFX_APP()->LeaveBasicCall();
  	}
  	return bRet;
---- svx/source/msfilter/msvbasic.cxx.bak	2007-12-25 13:34:06.000000000 +0800
-+++ svx/source/msfilter/msvbasic.cxx	2007-12-28 13:15:09.000000000 +0800
+--- svx/source/msfilter/msvbasic.cxx.orig	2006-09-17 13:28:12.000000000 +0800
++++ svx/source/msfilter/msvbasic.cxx	2008-02-20 10:42:00.000000000 +0800
 @@ -453,7 +453,7 @@ ModuleType VBA_Impl::GetModuleType( cons
      {
          return iter->second;
@@ -362,8 +362,8 @@
                      OSL_TRACE("Module %s is of type Normal VBA",
                          ::rtl::OUStringToOString( value ,
                              RTL_TEXTENCODING_ASCII_US ).pData->buffer );
---- sc/inc/servuno.hxx.bak	2007-12-25 13:34:06.000000000 +0800
-+++ sc/inc/servuno.hxx	2007-12-28 13:15:09.000000000 +0800
+--- sc/inc/servuno.hxx.orig	2008-02-18 11:24:53.000000000 +0800
++++ sc/inc/servuno.hxx	2008-02-20 10:42:00.000000000 +0800
 @@ -103,7 +103,8 @@ class ScDocShell;
  #define SC_SERVICE_FORMULAPARS  38
  #define SC_SERVICE_OPCODEMAPPER 39
@@ -374,8 +374,8 @@
  #define SC_SERVICE_INVALID		USHRT_MAX
  
  
---- sc/source/ui/unoobj/servuno.cxx.bak	2007-12-25 13:34:06.000000000 +0800
-+++ sc/source/ui/unoobj/servuno.cxx	2007-12-28 13:15:09.000000000 +0800
+--- sc/source/ui/unoobj/servuno.cxx.orig	2008-02-18 11:24:53.000000000 +0800
++++ sc/source/ui/unoobj/servuno.cxx	2008-02-20 10:42:00.000000000 +0800
 @@ -77,8 +77,106 @@
  #include <svx/xmlgrhlp.hxx>
  #endif
@@ -510,8 +510,8 @@
  	}
  	return xRet;
  }
---- sc/source/ui/unoobj/makefile.mk.bak	2007-12-25 13:34:06.000000000 +0800
-+++ sc/source/ui/unoobj/makefile.mk	2007-12-28 13:15:09.000000000 +0800
+--- sc/source/ui/unoobj/makefile.mk.orig	2008-02-18 11:24:53.000000000 +0800
++++ sc/source/ui/unoobj/makefile.mk	2008-02-20 10:42:00.000000000 +0800
 @@ -54,6 +54,7 @@ AUTOSEG=true
  .INCLUDE :  sc.mk
  .INCLUDE :  $(PRJ)$/util$/makefile.pmk
@@ -520,8 +520,8 @@
  # --- Files --------------------------------------------------------
  SLO1FILES =  \
          $(SLO)$/docuno.obj \
---- basctl/source/basicide/scriptdocument.cxx.bak	2007-12-25 13:34:06.000000000 +0800
-+++ basctl/source/basicide/scriptdocument.cxx	2007-12-28 13:15:09.000000000 +0800
+--- basctl/source/basicide/scriptdocument.cxx.orig	2007-10-09 23:24:54.000000000 +0800
++++ basctl/source/basicide/scriptdocument.cxx	2008-02-20 10:42:00.000000000 +0800
 @@ -61,6 +61,7 @@
  #include <com/sun/star/frame/XModel2.hpp>
  #include <com/sun/star/awt/XWindow2.hpp>
@@ -574,8 +574,8 @@
          return true;
      }
  
---- /dev/null	2007-09-22 05:50:58.000000000 +0800
-+++ basic/inc/basic/sbobjmod.hxx	2007-12-28 13:15:09.000000000 +0800
+--- /dev/null	2007-05-04 18:54:36.000000000 +0800
++++ basic/inc/basic/sbobjmod.hxx	2008-02-20 10:42:00.000000000 +0800
 @@ -0,0 +1,68 @@
 +/*************************************************************************
 + *
@@ -645,8 +645,8 @@
 +#endif
 +#endif
 +
---- basic/prj/d.lst.bak	2007-12-25 13:34:06.000000000 +0800
-+++ basic/prj/d.lst	2007-12-28 13:15:09.000000000 +0800
+--- basic/prj/d.lst.orig	2007-05-11 19:42:43.000000000 +0800
++++ basic/prj/d.lst	2008-02-20 10:42:00.000000000 +0800
 @@ -27,6 +27,7 @@ mkdir: %_DEST%\inc%_EXT%\basic
  
  ..\inc\basic\sbdef.hxx %_DEST%\inc%_EXT%\basic\sbdef.hxx
@@ -655,8 +655,8 @@
  ..\inc\basic\sbjsmod.hxx %_DEST%\inc%_EXT%\basic\sbjsmod.hxx
  ..\inc\basic\sbmeth.hxx %_DEST%\inc%_EXT%\basic\sbmeth.hxx
  ..\inc\basic\sbprop.hxx %_DEST%\inc%_EXT%\basic\sbprop.hxx
---- basic/source/classes/sbxmod.cxx.bak	2007-12-25 13:34:06.000000000 +0800
-+++ basic/source/classes/sbxmod.cxx	2008-01-10 21:37:45.000000000 +0800
+--- basic/source/classes/sbxmod.cxx.orig	2008-02-18 11:24:52.000000000 +0800
++++ basic/source/classes/sbxmod.cxx	2008-02-20 10:42:00.000000000 +0800
 @@ -62,6 +62,8 @@
  #include "sbunoobj.hxx"
  #include <basic/hilight.hxx>
@@ -779,8 +779,8 @@
  
  /////////////////////////////////////////////////////////////////////////
  // Implementation SbJScriptModule (Basic-Modul fuer JavaScript-Sourcen)
---- basic/source/classes/sb.cxx.bak	2007-12-25 13:34:06.000000000 +0800
-+++ basic/source/classes/sb.cxx	2008-01-11 00:33:53.000000000 +0800
+--- basic/source/classes/sb.cxx.orig	2008-02-18 11:24:52.000000000 +0800
++++ basic/source/classes/sb.cxx	2008-02-20 10:42:00.000000000 +0800
 @@ -70,6 +70,7 @@
  #include "disas.hxx"
  #include "runtime.hxx"
@@ -829,8 +829,8 @@
  			// Sonst testen, ob das Element vorhanden ist
  			// GBLSEARCH-Flag rausnehmen (wg. Rekursion)
  			USHORT nGblFlag = p->GetFlags() & SBX_GBLSEARCH;
---- basic/source/runtime/methods1.cxx.bak	2007-12-25 13:34:07.000000000 +0800
-+++ basic/source/runtime/methods1.cxx	2007-12-28 13:15:09.000000000 +0800
+--- basic/source/runtime/methods1.cxx.orig	2007-09-20 23:55:19.000000000 +0800
++++ basic/source/runtime/methods1.cxx	2008-02-20 10:42:00.000000000 +0800
 @@ -60,6 +60,9 @@
  #ifndef _SBX_HXX
  #include <basic/sbx.hxx>
@@ -865,8 +865,8 @@
  	}
  	else
  	{
---- basic/source/basmgr/basmgr.cxx.bak	2007-12-25 13:34:07.000000000 +0800
-+++ basic/source/basmgr/basmgr.cxx	2008-01-10 19:51:43.000000000 +0800
+--- basic/source/basmgr/basmgr.cxx.orig	2007-08-30 17:58:48.000000000 +0800
++++ basic/source/basmgr/basmgr.cxx	2008-02-20 10:42:00.000000000 +0800
 @@ -102,6 +102,8 @@
  #include <com/sun/star/script/XStarBasicDialogInfo.hpp>
  #include <com/sun/star/script/XStarBasicLibraryInfo.hpp>
@@ -973,8 +973,8 @@
  
  		pLib->SetModified( FALSE );
  	}
---- basic/inc/basic/sbstar.hxx.bak	2007-12-25 13:34:07.000000000 +0800
-+++ basic/inc/basic/sbstar.hxx	2007-12-28 13:15:09.000000000 +0800
+--- basic/inc/basic/sbstar.hxx.orig	2007-08-30 17:58:14.000000000 +0800
++++ basic/inc/basic/sbstar.hxx	2008-02-20 10:42:00.000000000 +0800
 @@ -51,6 +51,7 @@
  
  #include <basic/sbdef.hxx>
@@ -1010,8 +1010,8 @@
  
  	// #60175 TRUE: SFX-Resource wird bei Basic-Fehlern nicht angezogen
  	static void StaticSuppressSfxResource( BOOL bSuppress );
---- basic/inc/basic/sbdef.hxx.bak	2007-12-25 13:34:07.000000000 +0800
-+++ basic/inc/basic/sbdef.hxx	2007-12-28 13:15:09.000000000 +0800
+--- basic/inc/basic/sbdef.hxx.orig	2007-04-11 20:51:38.000000000 +0800
++++ basic/inc/basic/sbdef.hxx	2008-02-20 10:42:00.000000000 +0800
 @@ -100,6 +100,7 @@ void setBasicWatchMode( bool bOn );
  
  #define SBXID_BASIC			0x6273			// sb: StarBASIC
@@ -1020,8 +1020,8 @@
  #define SBXID_BASICPROP		0x7262			// pr: StarBASIC-Property
  #define	SBXID_BASICMETHOD	0x6d65          // me: StarBASIC-Methode
  #define	SBXID_JSCRIPTMOD	0x6a62			// jm: JavaScript-Modul
---- basic/source/uno/namecont.cxx.bak	2007-12-25 13:34:07.000000000 +0800
-+++ basic/source/uno/namecont.cxx	2007-12-28 13:15:09.000000000 +0800
+--- basic/source/uno/namecont.cxx.orig	2007-06-27 22:33:56.000000000 +0800
++++ basic/source/uno/namecont.cxx	2008-02-20 19:24:04.000000000 +0800
 @@ -139,6 +139,9 @@
  #endif
  #include <basic/sbmod.hxx>
@@ -1050,8 +1050,8 @@
  		throw IllegalArgumentException();
  
  	NameContainerNameMap::iterator aIt = mHashMap.find( aName );
---- sfx2/source/doc/objmisc.cxx.bak	2007-12-25 13:34:07.000000000 +0800
-+++ sfx2/source/doc/objmisc.cxx	2007-12-28 13:15:29.000000000 +0800
+--- sfx2/source/doc/objmisc.cxx.orig	2008-02-18 11:24:52.000000000 +0800
++++ sfx2/source/doc/objmisc.cxx	2008-02-20 10:42:00.000000000 +0800
 @@ -98,6 +98,9 @@
  #ifndef _COM_SUN_STAR_UTIL_XMODIFIABLE_HPP_
  #include <com/sun/star/util/XModifiable.hpp>
@@ -1062,8 +1062,8 @@
  
  #include <com/sun/star/script/provider/XScript.hpp>
  #include <com/sun/star/script/provider/XScriptProvider.hpp>
---- sfx2/source/doc/docmacromode.cxx.bak	2007-12-25 14:10:42.000000000 +0800
-+++ sfx2/source/doc/docmacromode.cxx	2008-01-11 17:34:58.000000000 +0800
+--- sfx2/source/doc/docmacromode.cxx.orig	2008-01-24 23:54:21.000000000 +0800
++++ sfx2/source/doc/docmacromode.cxx	2008-02-20 10:42:00.000000000 +0800
 @@ -45,6 +45,7 @@
  #include <com/sun/star/task/DocumentMacroConfirmationRequest.hpp>
  #include <com/sun/star/task/InteractionClassification.hpp>
@@ -1084,8 +1084,8 @@
  	/** === end UNO using === **/
      namespace MacroExecMode = ::com::sun::star::document::MacroExecMode;
  
-@@ -430,7 +434,7 @@ namespace sfx2
-                     bHasMacroLib = false;
+@@ -427,7 +431,7 @@ namespace sfx2
+                     bHasMacroLib = sal_False;
                  else
  			    {
 -				    ::rtl::OUString aStdLibName( RTL_CONSTASCII_USTRINGPARAM( "Standard" ) );
@@ -1093,7 +1093,7 @@
  				    Sequence< ::rtl::OUString > aElements = xContainer->getElementNames();
  				    if ( aElements.getLength() )
  				    {
-@@ -450,8 +454,43 @@ namespace sfx2
+@@ -447,8 +451,43 @@ namespace sfx2
  						    Any aAny = xContainer->getByName( aStdLibName );
  						    aAny >>= xLib;
  						    if ( xLib.is() )
@@ -1138,8 +1138,8 @@
  				    }
  			    }
  		    }
---- basic/inc/basic/sbxobj.hxx.bak	2007-12-28 13:04:08.000000000 +0800
-+++ basic/inc/basic/sbxobj.hxx	2007-12-28 13:15:09.000000000 +0800
+--- basic/inc/basic/sbxobj.hxx.orig	2007-04-11 20:55:16.000000000 +0800
++++ basic/inc/basic/sbxobj.hxx	2008-02-20 10:42:00.000000000 +0800
 @@ -80,7 +80,7 @@ public:
  	virtual SbxClassType GetClass() const;
  	virtual void Clear();
@@ -1149,8 +1149,8 @@
  	const String& GetClassName() const { return aClassName; }
  	void		  SetClassName( const String &rNew ) { aClassName = rNew; }
  	// Default-Property
---- basic/source/sbx/sbxobj.cxx.bak	2007-12-28 13:04:13.000000000 +0800
-+++ basic/source/sbx/sbxobj.cxx	2007-12-28 13:15:09.000000000 +0800
+--- basic/source/sbx/sbxobj.cxx.orig	2007-06-27 22:31:34.000000000 +0800
++++ basic/source/sbx/sbxobj.cxx	2008-02-20 10:42:00.000000000 +0800
 @@ -187,7 +187,7 @@ void SbxObject::SFX_NOTIFY( SfxBroadcast
  	}
  }
@@ -1160,9 +1160,9 @@
  {
  	return BOOL( aClassName.EqualsIgnoreCaseAscii( rName ) );
  }
---- sc/inc/document.hxx.bak	2007-12-25 13:34:10.000000000 +0800
-+++ sc/inc/document.hxx	2007-12-25 14:03:23.000000000 +0800
-@@ -306,6 +306,7 @@ private:
+--- sc/inc/document.hxx.orig	2008-02-18 11:24:53.000000000 +0800
++++ sc/inc/document.hxx	2008-02-20 10:42:00.000000000 +0800
+@@ -307,6 +307,7 @@ private:
  
  	com::sun::star::uno::Sequence<sal_Int8>	aProtectPass;
  	String              aDocName;                       // opt: Dokumentname
@@ -1170,7 +1170,7 @@
  	ScRangePairListRef	xColNameRanges;
  	ScRangePairListRef	xRowNameRanges;
  
-@@ -449,6 +450,8 @@ public:
+@@ -450,6 +451,8 @@ public:
  
  	const String& 	GetName() const { return aDocName; }
  	void			SetName( const String& r ) { aDocName = r; }
@@ -1179,7 +1179,7 @@
  
  	void			GetDocStat( ScDocStat& rDocStat );
  
-@@ -536,6 +539,8 @@ SC_DLLPUBLIC	ScDBCollection*	GetDBCollec
+@@ -537,6 +540,8 @@ SC_DLLPUBLIC	ScDBCollection*	GetDBCollec
  
  	BOOL			HasTable( SCTAB nTab ) const;
  	SC_DLLPUBLIC BOOL			GetName( SCTAB nTab, String& rName ) const;
@@ -1188,8 +1188,8 @@
  	BOOL			GetTable( const String& rName, SCTAB& rTab ) const;
  	inline SCTAB	GetTableCount() const { return nMaxTableNumber; }
  	SvNumberFormatterIndexTable* GetFormatExchangeList() const { return pFormatExchangeList; }
---- sc/inc/table.hxx.bak	2007-12-25 13:34:10.000000000 +0800
-+++ sc/inc/table.hxx	2007-12-25 14:03:23.000000000 +0800
+--- sc/inc/table.hxx.orig	2008-02-18 11:24:46.000000000 +0800
++++ sc/inc/table.hxx	2008-02-20 10:42:00.000000000 +0800
 @@ -102,6 +102,7 @@ private:
  	ScColumn		aCol[MAXCOLCOUNT];
  
@@ -1208,17 +1208,17 @@
      const String&   GetUpperName() const;
  
  	const String&	GetPageStyle() const					{ return aPageStyle; }
---- sc/source/core/data/document.cxx.bak	2007-12-25 13:34:10.000000000 +0800
-+++ sc/source/core/data/document.cxx	2008-01-11 12:35:35.000000000 +0800
-@@ -107,6 +107,7 @@
- #include "bcaslot.hxx"
+--- sc/source/core/data/document.cxx.orig	2008-02-18 11:24:53.000000000 +0800
++++ sc/source/core/data/document.cxx	2008-02-20 10:42:01.000000000 +0800
+@@ -101,6 +101,7 @@
  #include "scextopt.hxx"
+ #include "postit.hxx"
  
 +
  struct ScDefaultAttr
  {
  	const ScPatternAttr*	pAttr;
-@@ -161,6 +162,32 @@ BOOL ScDocument::GetName( SCTAB nTab, St
+@@ -155,6 +156,32 @@ BOOL ScDocument::GetName( SCTAB nTab, St
  	return FALSE;
  }
  
@@ -1251,7 +1251,7 @@
  
  BOOL ScDocument::GetTable( const String& rName, SCTAB& rTab ) const
  {
-@@ -286,7 +313,6 @@ void ScDocument::CreateValidTabName(Stri
+@@ -280,7 +307,6 @@ void ScDocument::CreateValidTabName(Stri
  	}
  }
  
@@ -1259,7 +1259,7 @@
  BOOL ScDocument::InsertTab( SCTAB nPos, const String& rName,
  			BOOL bExternalDocument )
  {
-@@ -300,12 +326,7 @@ BOOL ScDocument::InsertTab( SCTAB nPos, 
+@@ -294,12 +320,7 @@ BOOL ScDocument::InsertTab( SCTAB nPos, 
  		if (nPos == SC_TAB_APPEND || nPos == nTabCount)
  		{
  			pTab[nTabCount] = new ScTable(this, nTabCount, rName);
@@ -1273,7 +1273,7 @@
  			++nMaxTableNumber;
  			if ( bExternalDocument )
  				pTab[nTabCount]->SetVisible( FALSE );
-@@ -340,24 +361,10 @@ BOOL ScDocument::InsertTab( SCTAB nPos, 
+@@ -334,24 +355,10 @@ BOOL ScDocument::InsertTab( SCTAB nPos, 
  				for (i = nTabCount; i > nPos; i--)
  				{
  					pTab[i] = pTab[i - 1];
@@ -1299,7 +1299,7 @@
  				++nMaxTableNumber;
  
  				for (i = 0; i <= MAXTAB; i++)
-@@ -447,22 +454,7 @@ BOOL ScDocument::DeleteTab( SCTAB nTab, 
+@@ -441,22 +448,7 @@ BOOL ScDocument::DeleteTab( SCTAB nTab, 
  				delete pTab[nTab];
  				for (i=nTab + 1; i < nTabCount; i++)
  				{
@@ -1322,8 +1322,8 @@
  				}
  
  				pTab[nTabCount - 1] = NULL;
---- sc/source/core/data/table1.cxx.bak	2007-12-25 13:34:10.000000000 +0800
-+++ sc/source/core/data/table1.cxx	2007-12-25 14:03:23.000000000 +0800
+--- sc/source/core/data/table1.cxx.orig	2008-02-18 11:24:53.000000000 +0800
++++ sc/source/core/data/table1.cxx	2008-02-20 10:42:01.000000000 +0800
 @@ -129,6 +129,7 @@ extern BOOL bIsOlk, bOderSo;
  ScTable::ScTable( ScDocument* pDoc, SCTAB nNewTab, const String& rNewName,
  					BOOL bColInfo, BOOL bRowInfo ) :
@@ -1332,8 +1332,8 @@
  	bScenario( FALSE ),
  	bLayoutRTL( FALSE ),
      bLoadingRTL( FALSE ),
---- sc/source/filter/excel/excdoc.cxx.bak	2007-12-25 13:34:11.000000000 +0800
-+++ sc/source/filter/excel/excdoc.cxx	2008-01-11 12:36:29.000000000 +0800
+--- sc/source/filter/excel/excdoc.cxx.orig	2008-02-18 11:24:45.000000000 +0800
++++ sc/source/filter/excel/excdoc.cxx	2008-02-20 10:42:01.000000000 +0800
 @@ -168,7 +168,7 @@ void ExcTable::FillAsHeader( ExcBoundshe
  	String	aTmpString;
      SCTAB  nScTabCount     = rTabInfo.GetScTabCount();
@@ -1396,8 +1396,8 @@
  
      for( ; nScTab < nScTabCount; ++nScTab )
      {
---- sc/source/filter/excel/xelink.cxx.bak	2007-12-25 13:34:11.000000000 +0800
-+++ sc/source/filter/excel/xelink.cxx	2007-12-25 14:03:24.000000000 +0800
+--- sc/source/filter/excel/xelink.cxx.orig	2007-05-23 03:47:21.000000000 +0800
++++ sc/source/filter/excel/xelink.cxx	2008-02-20 10:42:01.000000000 +0800
 @@ -1296,7 +1296,6 @@ XclExpSupbookBuffer::XclExpSupbookBuffer
  {
      XclExpTabInfo& rTabInfo = GetTabInfo();
@@ -1415,8 +1415,8 @@
          mnOwnDocSB = Append( xSupbook );
          for( sal_uInt16 nXclTab = 0; nXclTab < nXclCnt; ++nXclTab )
              maSBIndexVec[ nXclTab ].Set( mnOwnDocSB, nXclTab );
---- sc/source/filter/excel/xlocx.cxx.bak	2007-12-25 13:34:11.000000000 +0800
-+++ sc/source/filter/excel/xlocx.cxx	2007-12-25 14:03:24.000000000 +0800
+--- sc/source/filter/excel/xlocx.cxx.orig	2008-02-18 11:24:52.000000000 +0800
++++ sc/source/filter/excel/xlocx.cxx	2008-02-20 10:42:01.000000000 +0800
 @@ -88,7 +88,7 @@
  #include <cppuhelper/bootstrap.hxx>
  #endif
@@ -1437,8 +1437,8 @@
                  {
                      Reference<XComponentContext > xContext( ::cppu::defaultBootstrap_InitialComponentContext(), UNO_QUERY_THROW ); // Fatal error anyway
                      if ( SbxArray* pMethods = pModule->GetMethods() )
---- sc/source/filter/inc/excimp8.hxx.bak	2007-12-25 13:34:11.000000000 +0800
-+++ sc/source/filter/inc/excimp8.hxx	2007-12-25 14:03:24.000000000 +0800
+--- sc/source/filter/inc/excimp8.hxx.orig	2008-02-18 11:24:45.000000000 +0800
++++ sc/source/filter/inc/excimp8.hxx	2008-02-20 10:42:01.000000000 +0800
 @@ -69,6 +69,7 @@ class XclImpStream;
  
  class ImportExcel8 : public ImportExcel
@@ -1447,8 +1447,8 @@
  	protected:
          ExcScenarioList         aScenList;
  
---- sc/source/ui/docshell/docsh.cxx.bak	2007-12-25 13:34:11.000000000 +0800
-+++ sc/source/ui/docshell/docsh.cxx	2007-12-25 14:03:24.000000000 +0800
+--- sc/source/ui/docshell/docsh.cxx.orig	2008-02-18 11:24:53.000000000 +0800
++++ sc/source/ui/docshell/docsh.cxx	2008-02-20 10:42:01.000000000 +0800
 @@ -207,11 +207,8 @@ const static rtl::OUString sUrlPart2 = r
  	rtl::OUString sCodeName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ThisWorkbook") );
  	if ( pShell )
@@ -1463,8 +1463,8 @@
  	}
  	return sCodeName;
  }	
---- sc/source/ui/view/tabview5.cxx.bak	2007-12-25 13:34:11.000000000 +0800
-+++ sc/source/ui/view/tabview5.cxx	2008-01-11 12:38:19.000000000 +0800
+--- sc/source/ui/view/tabview5.cxx.orig	2008-02-18 11:24:52.000000000 +0800
++++ sc/source/ui/view/tabview5.cxx	2008-02-20 10:42:01.000000000 +0800
 @@ -347,10 +347,10 @@ void ScTabView::TabChanged()
  	aViewData.GetDocument()->BroadcastUno( SfxSimpleHint( SC_HINT_TABLECHANGED ) );
  	ScExtDocOptions* pExtOptions = aViewData.GetDocument()->GetExtDocOptions();
@@ -1480,8 +1480,8 @@
  	static String sUrl( RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.script:Standard") );
  	static String sUrl2( RTL_CONSTASCII_USTRINGPARAM("?language=Basic&location=document") );
  	static String sSheetActivateScript( RTL_CONSTASCII_USTRINGPARAM("Worksheet_Activate") );
---- sc/source/filter/excel/excimp8.cxx.bak	2007-12-25 13:34:11.000000000 +0800
-+++ sc/source/filter/excel/excimp8.cxx	2007-12-25 14:03:24.000000000 +0800
+--- sc/source/filter/excel/excimp8.cxx.orig	2008-02-18 11:24:45.000000000 +0800
++++ sc/source/filter/excel/excimp8.cxx	2008-02-20 10:42:01.000000000 +0800
 @@ -148,7 +148,7 @@ using namespace com::sun::star;
  
  
@@ -1509,89 +1509,78 @@
          }
  	}
  }
---- sc/inc/scextopt.hxx.bak	2007-12-25 13:34:11.000000000 +0800
-+++ sc/inc/scextopt.hxx	2008-01-11 12:39:24.000000000 +0800
-@@ -57,7 +57,6 @@
- struct ScExtDocSettings
- {
-     ScRange             maOleSize;          /// Visible range if embedded.
--    String              maGlobCodeName;     /// Global codename (VBA module name).
-     double              mfTabBarWidth;      /// Width of the tabbar, relative to frame window width (0.0 ... 1.0).
-     sal_uInt32          mnLinkCnt;          /// Recursive counter for loading external documents.
-     SCTAB               mnDisplTab;         /// Index of displayed sheet.
-@@ -135,15 +134,6 @@ public:
-     /** Returns read/write access to the settings of a sheet, may create a new struct. */
-     ScExtTabSettings&   GetOrCreateTabSettings( SCTAB nTab );
- 
--    /** Returns the number of sheet codenames. */
--    size_t              GetCodeNameCount() const;
--    /** Returns the specified codename (empty string = no codename). */
--    const String&       GetCodeName( size_t nIdx ) const;
--    /** Appends a codename for a sheet. */
--    void                AppendCodeName( const String& rCodeName );
--    void                SetCodeName( const String& rCodeName, size_t nIdx );
--    void                DeleteCodeName( size_t nIdx );
--
- private:
-     ::std::auto_ptr< ScExtDocOptionsImpl > mxImpl;
- };
---- sc/source/ui/view/scextopt.cxx.bak	2007-12-25 13:34:11.000000000 +0800
-+++ sc/source/ui/view/scextopt.cxx	2008-01-11 12:40:34.000000000 +0800
-@@ -140,15 +140,12 @@ void ScExtTabSettingsCont::CopyFromMap( 
- 
- // ============================================================================
- 
--typedef ::std::map< size_t, String > TabCodeNameMap;
- /** Implementation struct for ScExtDocOptions containing all members. */
- struct ScExtDocOptionsImpl
- {
- 
-     ScExtDocSettings    maDocSett;          /// Global document settings.
-     ScExtTabSettingsCont maTabSett;         /// Settings for all sheets.
--//    StringVec           maCodeNames;        /// Codenames for all sheets (VBA module names).
--    TabCodeNameMap      maCodeNames;        /// Codenames for all sheets (VBA module names).
- 
-     bool                mbChanged;          /// Use only if something has been changed.
- 
-@@ -211,36 +208,5 @@ ScExtTabSettings& ScExtDocOptions::GetOr
+--- sc/source/ui/unoobj/viewuno.cxx.orig	2008-02-20 15:26:49.000000000 +0800
++++ sc/source/ui/unoobj/viewuno.cxx	2008-02-20 15:28:24.000000000 +0800
+@@ -1778,10 +1778,8 @@ void ScTabViewObj::SelectionChanged()
+ 		{
+ 			ScExtDocOptions* pExtOptions = pViewData->GetDocument()->GetExtDocOptions();
+ 			String sSheetModuleName;
+-			pViewData->GetDocument()->GetName( pViewData->GetTabNo(), sSheetModuleName);
+ 			// Use code name if that exists
+-			if ( pExtOptions )
+-				sSheetModuleName = pExtOptions->GetCodeName( pViewData->GetTabNo() );
++			pViewData->GetDocument()->GetName( pViewData->GetTabNo(), sSheetModuleName);
+ 			
+ 			String sSheetSelectionScript( RTL_CONSTASCII_USTRINGPARAM("Worksheet_SelectionChange") );
+ 			String sWorkBookSheetSelectionScript( RTL_CONSTASCII_USTRINGPARAM("Workbook_SheetSelectionChange") );
+--- sc/source/ui/vba/vbaworksheet.cxx.orig	2008-02-19 09:39:07.000000000 +0800
++++ sc/source/ui/vba/vbaworksheet.cxx	2008-02-20 10:42:01.000000000 +0800
+@@ -815,8 +815,10 @@ ScVbaWorksheet::getCodeName() throw (css
+     {
+         uno::Reference< frame::XModel > xModel( getModel(), uno::UNO_QUERY_THROW );
+         ScDocument* pDoc = getDocShell( xModel )->GetDocument();
+-        ScExtDocOptions* pExtOptions = pDoc->GetExtDocOptions();
+-        rtl::OUString sCodeName = pExtOptions->GetCodeName( nTab );
++        /*ScExtDocOptions* pExtOptions = pDoc->GetExtDocOptions();
++        rtl::OUString sCodeName = pExtOptions->GetCodeName( nTab );*/
++        String sCodeName;
++        pDoc->GetCodeName( nTab, sCodeName );
+         return sCodeName;
+     }
+     else
+@@ -839,8 +841,10 @@ ScVbaWorksheet::setCodeName( const rtl::
+     {
+         uno::Reference< frame::XModel > xModel( getModel(), uno::UNO_QUERY_THROW );
+         ScDocument* pDoc = getDocShell( xModel )->GetDocument();
+-        ScExtDocOptions* pExtOptions = pDoc->GetExtDocOptions();
+-        pExtOptions->SetCodeName( sCodeName, nTab );
++        /*ScExtDocOptions* pExtOptions = pDoc->GetExtDocOptions();
++        pExtOptions->SetCodeName( sCodeName, nTab );*/
++        String sNewCodeName( sCodeName );
++        pDoc->SetCodeName( nTab, sNewCodeName );
+     }
+     else
+                throw uno::RuntimeException(::rtl::OUString(
+--- sc/source/ui/vba/vbaworkbook.cxx.orig	2008-02-19 09:39:07.000000000 +0800
++++ sc/source/ui/vba/vbaworkbook.cxx	2008-02-20 10:42:01.000000000 +0800
+@@ -471,9 +471,10 @@ ScVbaWorkbook::getCodeName() throw (css:
+ #ifdef VBA_OOBUILD_HACK 
+     uno::Reference< frame::XModel > xModel( getModel(), uno::UNO_QUERY_THROW );
+     ScDocument* pDoc = getDocShell( xModel )->GetDocument();
+-    ScExtDocOptions* pExtOptions = pDoc->GetExtDocOptions();
++    /*ScExtDocOptions* pExtOptions = pDoc->GetExtDocOptions();
+     ScExtDocSettings pExtSettings = pExtOptions->GetDocSettings();
+-    ::rtl::OUString sGlobCodeName = pExtSettings.maGlobCodeName;
++    ::rtl::OUString sGlobCodeName = pExtSettings.maGlobCodeName; */
++    ::rtl::OUString sGlobCodeName = pDoc->GetCodeName(); 
+     return sGlobCodeName;
+ #else
+     throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
+@@ -485,9 +486,10 @@ ScVbaWorkbook::setCodeName( const ::rtl:
  {
-     return mxImpl->maTabSett.GetOrCreateTabSettings( nTab );
- }
--
--size_t ScExtDocOptions::GetCodeNameCount() const
--{
--    return mxImpl->maCodeNames.size();
--}
--
--const String& ScExtDocOptions::GetCodeName( size_t nIdx ) const
--{
--    DBG_ASSERT( nIdx < GetCodeNameCount(), "ScExtDocOptions::GetCodeName - invalid index" );
--    return (nIdx < GetCodeNameCount()) ? mxImpl->maCodeNames[ nIdx ] : EMPTY_STRING;
--}
--
--void ScExtDocOptions::AppendCodeName( const String& rCodeName )
--{
--    mxImpl->maCodeNames[ mxImpl->maCodeNames.size() ] = rCodeName;
--}
--
--
--void ScExtDocOptions::SetCodeName( const String& rCodeName, size_t nIdx )
--{
--    // No holes allowed
--    DBG_ASSERT( nIdx <= GetCodeNameCount(), "ScExtDocOptions::GetCodeName - invalid index" );
--    mxImpl->maCodeNames[ nIdx ] = rCodeName;
--}
--
--void ScExtDocOptions::DeleteCodeName( size_t nIdx )
--{
--	TabCodeNameMap::iterator it = mxImpl->maCodeNames.find( nIdx );
--	if ( it != mxImpl->maCodeNames.end() )
--		mxImpl->maCodeNames.erase( it );
--}
- // ============================================================================
- 
---- basic/source/runtime/runtime.cxx.bak	2007-12-25 13:34:14.000000000 +0800
-+++ basic/source/runtime/runtime.cxx	2008-01-11 14:28:41.000000000 +0800
+     uno::Reference< frame::XModel > xModel( getModel(), uno::UNO_QUERY_THROW );
+     ScDocument* pDoc = getDocShell( xModel )->GetDocument();
+-    ScExtDocOptions* pExtOptions = pDoc->GetExtDocOptions();
++    /*ScExtDocOptions* pExtOptions = pDoc->GetExtDocOptions();
+     ScExtDocSettings pExtSettings = pExtOptions->GetDocSettings();
+-    pExtSettings.maGlobCodeName = sGlobCodeName;
++    pExtSettings.maGlobCodeName = sGlobCodeName;*/
++    pDoc->SetCodeName( sGlobCodeName );
+ #else
+ void SAL_CALL
+ ScVbaWorkbook::setCodeName( const ::rtl::OUString& ) throw (css::uno::RuntimeException)
+--- basic/source/runtime/runtime.cxx.orig	2008-02-18 11:24:52.000000000 +0800
++++ basic/source/runtime/runtime.cxx	2008-02-20 10:42:01.000000000 +0800
 @@ -82,6 +82,17 @@ void StarBASIC::StaticEnableReschedule( 
  {
      bStaticGlobalEnableReschedule = bReschedule;
@@ -1610,8 +1599,8 @@
  
  
  struct SbiArgvStack {					// Argv stack:
---- sc/source/ui/docshell/docfunc.cxx.bak	2007-12-25 13:34:14.000000000 +0800
-+++ sc/source/ui/docshell/docfunc.cxx	2008-01-11 12:41:08.000000000 +0800
+--- sc/source/ui/docshell/docfunc.cxx.orig	2008-02-18 11:24:53.000000000 +0800
++++ sc/source/ui/docshell/docfunc.cxx	2008-02-20 10:42:01.000000000 +0800
 @@ -58,6 +58,12 @@
  #include <svtools/PasswordHelper.hxx>
  #endif
@@ -1781,8 +1770,8 @@
  		rDocShell.Broadcast( ScTablesHint( SC_TAB_DELETED, nTab ) );
  
  		if (bWasLinked)
---- basctl/source/basicide/basidesh.cxx.bak	2007-12-25 13:34:14.000000000 +0800
-+++ basctl/source/basicide/basidesh.cxx	2008-01-14 23:12:18.000000000 +0800
+--- basctl/source/basicide/basidesh.cxx.orig	2008-01-15 00:00:46.000000000 +0800
++++ basctl/source/basicide/basidesh.cxx	2008-02-21 11:01:03.000000000 +0800
 @@ -97,6 +97,8 @@
  #ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
  #include <com/sun/star/container/XNameContainer.hpp>
@@ -1792,141 +1781,127 @@
  
  #include <svx/xmlsecctrl.hxx>
  
-@@ -104,7 +106,95 @@ using namespace ::com::sun::star::uno;
+@@ -104,7 +106,6 @@ using namespace ::com::sun::star::uno;
  using namespace ::com::sun::star;
  using ::rtl::OUString;
  
-+//====================================================================================
-+// BasIDEContainerListenerImpl
-+//====================================================================================
-+typedef ::cppu::WeakImplHelper1< container::XContainerListener > ContainerListenerHelper;
-+
-+class BasIDEContainerListenerImpl: public ContainerListenerHelper
-+{
-+    BasicIDEShell* m_pBasIDE;
-+    uno::Reference< container::XContainer > m_xContainer;
-+public:
-+    BasIDEContainerListenerImpl( BasicIDEShell* pIDE, uno::Reference< container::XContainer > xContainer );
-+    ~BasIDEContainerListenerImpl();
-+    static uno::Reference< container::XContainerListener > addContainerListenerImpl( const ScriptDocument* pScriptDocument, BasicIDEShell* pIDE );
+-
+ TYPEINIT1( BasicIDEShell, SfxViewShell );
+ 
+ SFX_IMPL_VIEWFACTORY( BasicIDEShell, IDEResId( SVX_INTERFACE_BASIDE_VIEWSH ) )
+@@ -258,6 +259,10 @@ __EXPORT BasicIDEShell::~BasicIDEShell()
+ 	delete pTabBar;
+ 	delete pObjectCatalog;
+ 	DestroyModulWindowLayout();
 +
-+    // XEventListener
-+    virtual void SAL_CALL disposing( const lang::EventObject& Source )
-+        throw( uno::RuntimeException );
++    // Destroy all ContainerListeners for Basic Container.
++    removeAllContainerListener();
 +    
-+    // XContainerListener
-+    virtual void SAL_CALL elementInserted( const container::ContainerEvent& Event )
-+        throw( uno::RuntimeException );
-+    virtual void SAL_CALL elementReplaced( const container::ContainerEvent& Event )
-+        throw( uno::RuntimeException );
-+    virtual void SAL_CALL elementRemoved( const container::ContainerEvent& Event )
-+        throw( uno::RuntimeException );
-+};
-+
-+BasIDEContainerListenerImpl::BasIDEContainerListenerImpl( BasicIDEShell* pIDE, uno::Reference< container::XContainer > xContainer )
-+     : m_pBasIDE( pIDE ), m_xContainer( xContainer ) 
-+{
-+    uno::Reference< container::XContainerListener > xContainerListener( static_cast< XContainerListener* > ( this ), uno::UNO_QUERY);
-+    m_xContainer->addContainerListener( xContainerListener ); 
-+}
-+BasIDEContainerListenerImpl::~BasIDEContainerListenerImpl()
-+{
-+}
-+uno::Reference< container::XContainerListener > BasIDEContainerListenerImpl::addContainerListenerImpl( const ScriptDocument* pScriptDocument, BasicIDEShell* pIDE )
-+{
-+    rtl::OUString sLibName( RTL_CONSTASCII_USTRINGPARAM( "Standard" ) );
-+    uno::Reference< container::XNameContainer > xNameContainer( pScriptDocument->getLibrary( E_SCRIPTS, sLibName, FALSE ) );
-+    uno::Reference< container::XContainer > xContainer( xNameContainer, uno::UNO_QUERY );
-+    if ( xContainer.is() )
-+    {
-+        return uno::Reference< container::XContainerListener > (new BasIDEContainerListenerImpl( pIDE, xContainer ) );
-+    }
-+    return uno::Reference< container::XContainerListener >();
-+}
-+
+ 	// MI: Das gab einen GPF im SDT beim Schliessen da dann der ViewFrame die
+ 	// ObjSh loslaesst. Es wusste auch keiner mehr wozu das gut war.
+ 	// GetViewFrame()->GetObjectShell()->Broadcast( SfxSimpleHint( SFX_HINT_DYING ) );
+@@ -275,11 +280,14 @@ sal_Bool BasicIDEShell::HasBasic() const
+ 
+ void BasicIDEShell::onDocumentCreated( const ScriptDocument& /*_rDocument*/ )
+ {
++    // _rDocument is not a valid ScriptDocument.
++    addAllContainerListener();
+     UpdateWindows();
+ }
+ 
+ void BasicIDEShell::onDocumentOpened( const ScriptDocument& /*_rDocument*/ )
+ {
++    addAllContainerListener();
+     UpdateWindows();
+ }
+ 
+@@ -302,6 +310,77 @@ void BasicIDEShell::onDocumentSaveAsDone
+ {
+     // not interested in
+ }
 +// XEventListener
 +//----------------------------------------------------------------------------
-+void SAL_CALL BasIDEContainerListenerImpl::disposing( const lang::EventObject& /*Source*/ )
++void SAL_CALL BasicIDEShell::disposing( const lang::EventObject& /*Source*/ )
 +    throw( uno::RuntimeException )
 +{
-+    uno::Reference< container::XContainerListener > xContainerListener( static_cast< XContainerListener* > ( this ), uno::UNO_QUERY);
-+    if( xContainerListener.is() )
-+    {
-+        if( m_xContainer.is() )
-+            m_xContainer->removeContainerListener( xContainerListener ); 
-+        if( m_pBasIDE )
-+        {
-+            m_pBasIDE = NULL;
-+        }
-+    }
 +}
 +
 +// XContainerListener
 +//----------------------------------------------------------------------------
-+void SAL_CALL BasIDEContainerListenerImpl::elementInserted( const container::ContainerEvent& /*Event*/ )
++void SAL_CALL BasicIDEShell::elementInserted( const container::ContainerEvent& /*Event*/ )
 +    throw( uno::RuntimeException )
 +{
-+    if( m_pBasIDE )
-+        m_pBasIDE->UpdateBasWindows( TRUE );
++    UpdateBasWindows( TRUE );
 +}
 +
-+void SAL_CALL BasIDEContainerListenerImpl::elementReplaced( const container::ContainerEvent& Event )
++void SAL_CALL BasicIDEShell::elementReplaced( const container::ContainerEvent& Event )
 +    throw( uno::RuntimeException )
 +{
 +    /* we don't interest here, because of the container 
 +    make rename a module as delete old one and create a new one. */
 +    (void)Event;
 +}
- 
-+void SAL_CALL BasIDEContainerListenerImpl::elementRemoved( const container::ContainerEvent& /*Event*/ )
++
++void SAL_CALL BasicIDEShell::elementRemoved( const container::ContainerEvent& /*Event*/ )
 +    throw( uno::RuntimeException )
 +{
-+    if( m_pBasIDE )
-+        m_pBasIDE->UpdateBasWindows( FALSE );
++    UpdateBasWindows( FALSE );
 +}
-+//============================================================================
- TYPEINIT1( BasicIDEShell, SfxViewShell );
- 
- SFX_IMPL_VIEWFACTORY( BasicIDEShell, IDEResId( SVX_INTERFACE_BASIDE_VIEWSH ) )
-@@ -257,6 +347,14 @@ __EXPORT BasicIDEShell::~BasicIDEShell()
- 	delete pTabBar;
- 	delete pObjectCatalog;
- 	DestroyModulWindowLayout();
-+    // Destroy all ContainerListeners for Basic Container.
-+    while( !m_ListenerList.empty() )
++void SAL_CALL BasicIDEShell::addContainerListener( const ScriptDocument* pScriptDocument )
++{
++    rtl::OUString sLibName( RTL_CONSTASCII_USTRINGPARAM( "Standard" ) );
++    uno::Reference< container::XNameContainer > xNameContainer( pScriptDocument->getLibrary( E_SCRIPTS, sLibName, FALSE ) );
++    uno::Reference< container::XContainer > xContainer( xNameContainer, uno::UNO_QUERY_THROW );
++    uno::Reference< container::XContainerListener > xContainerListener( this );
++    xContainer->addContainerListener( xContainerListener );
++}
++void SAL_CALL BasicIDEShell::removeContainerListener( const ScriptDocument* pScriptDocument )
++{
++    rtl::OUString sLibName( RTL_CONSTASCII_USTRINGPARAM( "Standard" ) );
++    uno::Reference< container::XNameContainer > xNameContainer( pScriptDocument->getLibrary( E_SCRIPTS, sLibName, FALSE ) );
++    uno::Reference< container::XContainer > xContainer( xNameContainer, uno::UNO_QUERY_THROW );
++    uno::Reference< container::XContainerListener > xContainerListener( this );
++    xContainer->removeContainerListener( xContainerListener );
++}
++void SAL_CALL BasicIDEShell::addAllContainerListener()
++{
++    // remove all containerlistener first.
++    removeAllContainerListener();
++    ScriptDocuments aDocuments( ScriptDocument::getAllScriptDocuments( ScriptDocument::AllWithApplication ) );
++    for (   ScriptDocuments::const_iterator doc = aDocuments.begin();
++            doc != aDocuments.end();
++            ++doc
++        )
 +    {
-+        uno::Reference < container::XContainerListener > xContainerListener ( m_ListenerList.front() );
-+        if( xContainerListener.is() )
-+            xContainerListener->disposing( lang::EventObject() );
-+        m_ListenerList.pop_front();
++        addContainerListener( doc.base() );
 +    }
- 	// MI: Das gab einen GPF im SDT beim Schliessen da dann der ViewFrame die
- 	// ObjSh loslaesst. Es wusste auch keiner mehr wozu das gut war.
- 	// GetViewFrame()->GetObjectShell()->Broadcast( SfxSimpleHint( SFX_HINT_DYING ) );
-@@ -401,6 +499,22 @@ void BasicIDEShell::StoreAllWindowData( 
- 	}
- }
- 
-+void
-+BasicIDEShell::AddContainerListener( uno::Reference < container::XContainerListener > xContainerListener )
-+{
-+    if( xContainerListener.is() )
-+        m_ListenerList.push_back( xContainerListener );
++    
 +}
-+
-+void
-+BasicIDEShell::RemoveContainerListener( uno::Reference < container::XContainerListener > xContainerListener )
++void SAL_CALL BasicIDEShell::removeAllContainerListener()
 +{
-+    if( xContainerListener.is() )
++    ScriptDocuments aDocuments( ScriptDocument::getAllScriptDocuments( ScriptDocument::AllWithApplication ) );
++    for (   ScriptDocuments::const_iterator doc = aDocuments.begin();
++            doc != aDocuments.end();
++            ++doc
++        )
 +    {
-+        xContainerListener->disposing( lang::EventObject() );
-+        m_ListenerList.remove( xContainerListener );
++        removeContainerListener( doc.base() );
 +    }
++    
 +}
++//============================================================================
  
+ void BasicIDEShell::onDocumentClosed( const ScriptDocument& _rDocument )
+ {
+@@ -402,7 +481,6 @@ void BasicIDEShell::StoreAllWindowData( 
+ 	}
+ }
+ 
+-
  USHORT __EXPORT BasicIDEShell::PrepareClose( BOOL bUI, BOOL bForBrowsing )
  {
-@@ -599,7 +713,6 @@ void BasicIDEShell::ShowObjectDialog( BO
+ 	(void)bForBrowsing;
+@@ -600,7 +678,6 @@ void BasicIDEShell::ShowObjectDialog( BO
  }
  
  
@@ -1934,7 +1909,7 @@
  void __EXPORT BasicIDEShell::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId&,
  										const SfxHint& rHint, const TypeId& )
  {
-@@ -679,7 +792,43 @@ void __EXPORT BasicIDEShell::SFX_NOTIFY(
+@@ -680,7 +757,43 @@ void __EXPORT BasicIDEShell::SFX_NOTIFY(
      }
  }
  
@@ -1979,16 +1954,8 @@
  
  void BasicIDEShell::CheckWindows()
  {
-@@ -763,6 +912,7 @@ void BasicIDEShell::UpdateWindows()
-         )
- 	{
- 		StartListening( *doc->getBasicManager(), TRUE /* Nur einmal anmelden */ );
-+        AddContainerListener( BasIDEContainerListenerImpl::addContainerListenerImpl( doc, this ) ); 
- 
-         // libraries
-         Sequence< ::rtl::OUString > aLibNames( doc->getLibraryNames() );
---- sc/source/ui/view/viewfun2.cxx.bak	2007-12-25 13:34:14.000000000 +0800
-+++ sc/source/ui/view/viewfun2.cxx	2007-12-25 14:03:24.000000000 +0800
+--- sc/source/ui/view/viewfun2.cxx.orig	2008-02-18 11:24:45.000000000 +0800
++++ sc/source/ui/view/viewfun2.cxx	2008-02-20 10:42:01.000000000 +0800
 @@ -62,6 +62,11 @@
  #include <vcl/sound.hxx>
  #include <vcl/waitobj.hxx>
@@ -2071,94 +2038,91 @@
          SfxApplication* pSfxApp = SFX_APP();                                // Navigator
          pSfxApp->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) );
          pSfxApp->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) );
---- basctl/source/inc/basidesh.hxx.bak	2007-12-25 13:34:14.000000000 +0800
-+++ basctl/source/inc/basidesh.hxx	2008-01-14 23:12:23.000000000 +0800
-@@ -62,8 +62,10 @@
+--- basctl/source/inc/basidesh.hxx.orig	2007-10-09 23:25:06.000000000 +0800
++++ basctl/source/inc/basidesh.hxx	2008-02-21 10:45:40.000000000 +0800
+@@ -62,7 +62,8 @@
  #ifndef _COM_SUN_STAR_IO_XINPUTSTREAMPROVIDER_HXX_
  #include <com/sun/star/io/XInputStreamProvider.hpp>
  #endif
+-
 +#include <com/sun/star/container/XContainerListener.hpp>
-+#include <list>
++#include <cppuhelper/implbase1.hxx>
  
--
-+typedef std::list < com::sun::star::uno::Reference < com::sun::star::container::XContainerListener > > ContainerListenerList; 
  //----------------------------------------------------------------------------
  
- const ULONG BASICIDE_UI_FEATURE_SHOW_BROWSER = 0x00000001;
-@@ -116,6 +118,7 @@ friend class BasicIDE;
-     BOOL                m_bAppBasicModified;
-     ::basctl::DocumentEventNotifier
-                         m_aNotifier;
-+    ContainerListenerList   m_ListenerList;
- 
- #if _SOLAR__PRIVATE
- 	void				Init();
-@@ -237,7 +240,11 @@ public:
+@@ -89,9 +90,11 @@ DECLARE_TABLE( IDEWindowTable, IDEBaseWi
+ #else
+ typedef Table IDEWindowTable;
+ #endif
++typedef ::cppu::ImplHelper1<com::sun::star::container::XContainerListener> ContainerListenerHelper;
+ 
+ class BasicIDEShell :public SfxViewShell
+                     ,public ::basctl::DocumentEventListener
++                    ,public ContainerListenerHelper
+ {
+ friend class JavaDebuggingListenerImpl;
+ friend class LocalizationMgr;
+@@ -185,7 +188,27 @@ protected:
+     virtual void onDocumentTitleChanged( const ScriptDocument& _rDocument );
+     virtual void onDocumentModeChanged( const ScriptDocument& _rDocument );
+ 
++    void SAL_CALL addContainerListener( const ScriptDocument* pScriptDocument );
++    void SAL_CALL removeContainerListener( const ScriptDocument* pScriptDocument );
++    void SAL_CALL addAllContainerListener();
++    void SAL_CALL removeAllContainerListener();
++
+ public:
++    // XInterface
++    virtual void SAL_CALL acquire() throw () {}
++    virtual void SAL_CALL release() throw () {}
++    // XEventListener
++    virtual void SAL_CALL disposing( const com::sun::star::lang::EventObject& Source )
++        throw( com::sun::star::uno::RuntimeException );
++
++    // XContainerListener
++    virtual void SAL_CALL elementInserted( const com::sun::star::container::ContainerEvent& Event )
++        throw( com::sun::star::uno::RuntimeException );
++    virtual void SAL_CALL elementReplaced( const com::sun::star::container::ContainerEvent& Event )
++        throw( com::sun::star::uno::RuntimeException );
++    virtual void SAL_CALL elementRemoved( const com::sun::star::container::ContainerEvent& Event )
++        throw( com::sun::star::uno::RuntimeException );
++    
+ 						TYPEINFO();
+ 						SFX_DECL_INTERFACE( SVX_INTERFACE_BASIDE_VIEWSH )
+ 						SFX_DECL_VIEWFACTORY(BasicIDEShell);
+@@ -237,6 +260,7 @@ public:
      
  	BOOL	            IsAppBasicModified() const { return m_bAppBasicModified; }
  	void			    SetAppBasicModified( BOOL bModified = TRUE ) { m_bAppBasicModified = bModified; }
 +    void                UpdateBasWindows( BOOL bInerted );
  
-+    // For ContainerListener
-+    void                AddContainerListener( com::sun::star::uno::Reference < com::sun::star::container::XContainerListener > xContainerListener );
-+    void                RemoveContainerListener( com::sun::star::uno::Reference < com::sun::star::container::XContainerListener > xContainerListener );
  	// For Dialog Drag&Drop in Dialog Organizer
  	static void CopyDialogResources(
- 		::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStreamProvider >& io_xISP,
---- sc/source/ui/vba/vbaworkbook.cxx	
-+++ sc/source/ui/vba/vbaworkbook.cxx
-@@ -467,9 +471,10 @@ ScVbaWorkbook::getCodeName() throw (css:
- #ifdef VBA_OOBUILD_HACK 
-     uno::Reference< frame::XModel > xModel( getModel(), uno::UNO_QUERY_THROW );
-     ScDocument* pDoc = getDocShell( xModel )->GetDocument();
--    ScExtDocOptions* pExtOptions = pDoc->GetExtDocOptions();
-+    /*ScExtDocOptions* pExtOptions = pDoc->GetExtDocOptions();
-     ScExtDocSettings pExtSettings = pExtOptions->GetDocSettings();
--    ::rtl::OUString sGlobCodeName = pExtSettings.maGlobCodeName;
-+    ::rtl::OUString sGlobCodeName = pExtSettings.maGlobCodeName; */
-+    ::rtl::OUString sGlobCodeName = pDoc->GetCodeName(); 
-     return sGlobCodeName;
- #else
-     throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
-@@ -481,9 +486,10 @@ ScVbaWorkbook::setCodeName( const ::rtl:
- {
-     uno::Reference< frame::XModel > xModel( getModel(), uno::UNO_QUERY_THROW );
-     ScDocument* pDoc = getDocShell( xModel )->GetDocument();
--    ScExtDocOptions* pExtOptions = pDoc->GetExtDocOptions();
-+    /*ScExtDocOptions* pExtOptions = pDoc->GetExtDocOptions();
-     ScExtDocSettings pExtSettings = pExtOptions->GetDocSettings();
--    pExtSettings.maGlobCodeName = sGlobCodeName;
-+    pExtSettings.maGlobCodeName = sGlobCodeName;*/
-+    pDoc->SetCodeName( sGlobCodeName );
- #else
- void SAL_CALL
- ScVbaWorkbook::setCodeName( const ::rtl::OUString& ) throw (css::uno::RuntimeException)
---- sc/source/ui/vba/vbaworksheet.cxx	
-+++ sc/source/ui/vba/vbaworksheet.cxx
-@@ -814,8 +814,10 @@ ScVbaWorksheet::getCodeName() throw (css
-     {
-         uno::Reference< frame::XModel > xModel( getModel(), uno::UNO_QUERY_THROW );
-         ScDocument* pDoc = getDocShell( xModel )->GetDocument();
--        ScExtDocOptions* pExtOptions = pDoc->GetExtDocOptions();
--        rtl::OUString sCodeName = pExtOptions->GetCodeName( nTab );
-+        /*ScExtDocOptions* pExtOptions = pDoc->GetExtDocOptions();
-+        rtl::OUString sCodeName = pExtOptions->GetCodeName( nTab );*/
-+        String sCodeName;
-+        pDoc->GetCodeName( nTab, sCodeName );
-         return sCodeName;
-     }
-     else
-@@ -838,8 +840,10 @@ ScVbaWorksheet::setCodeName( const rtl::
-     {
-         uno::Reference< frame::XModel > xModel( getModel(), uno::UNO_QUERY_THROW );
-         ScDocument* pDoc = getDocShell( xModel )->GetDocument();
--        ScExtDocOptions* pExtOptions = pDoc->GetExtDocOptions();
--        pExtOptions->SetCodeName( sCodeName, nTab );
-+        /*ScExtDocOptions* pExtOptions = pDoc->GetExtDocOptions();
-+        pExtOptions->SetCodeName( sCodeName, nTab );*/
-+        String sNewCodeName( sCodeName );
-+        pDoc->SetCodeName( nTab, sNewCodeName );
-     }
-     else
-                throw uno::RuntimeException(::rtl::OUString(
-
+--- basctl/source/basicide/basides2.cxx.orig	2008-02-20 14:27:07.000000000 +0800
++++ basctl/source/basicide/basides2.cxx	2008-02-20 14:27:14.000000000 +0800
+@@ -252,9 +252,12 @@ ModulWindow* BasicIDEShell::CreateBasWin
+ 
+         if ( bSuccess )
+         {
+-			// new module window
+-			pWin = new ModulWindow( pModulLayout, rDocument, aLibName, aModName, aModule );
+-			nKey = InsertWindowInTable( pWin );
++			pWin = FindBasWin( rDocument, aLibName, aModName, FALSE, TRUE );
++            if( !pWin )
++			{    // new module window
++			    pWin = new ModulWindow( pModulLayout, rDocument, aLibName, aModName, aModule );
++			    nKey = InsertWindowInTable( pWin );
++            }
+         }
+ 	}
+ 	else
+@@ -269,7 +272,8 @@ ModulWindow* BasicIDEShell::CreateBasWin
+ 		}
+ 		DBG_ASSERT( nKey, "CreateBasWin: Kein Key- Fenster nicht gefunden!" );
+ 	}
+-	pTabBar->InsertPage( (USHORT)nKey, aModName );
++    if( nKey )
++	    pTabBar->InsertPage( (USHORT)nKey, aModName );
+ 	pTabBar->Sort();
+ 	pWin->GrabScrollBars( &aHScrollBar, &aVScrollBar );
+ 	if ( !pCurWin )

Added: trunk/patches/test/vba/ObjectModuleUITest.txt
==============================================================================
--- (empty file)
+++ trunk/patches/test/vba/ObjectModuleUITest.txt	Thu Feb 21 08:26:34 2008
@@ -0,0 +1,63 @@
+This file describe the UI test for Object Module and the test document is âTestObjectModule.xlsâ
+ 1 Open/Close Test
+ 1.1 Open the test file and enable the Macro
+ 1.2 Open test file's Macro form Tools->Macro->Organize Macros->OpenOffice.org Basic->TestObjectModule; Select a module and then click edit button.
+ 1.3 Close the Basic Editor
+ 1.4 Close OpenOffice.org
+ 1.5 Expect behavior: 
+Basic Editor and OpenOffice.org are opened/closed normally.
+ 2 insert/delete worksheet without Basic Editor
+ 2.1 Open the test file
+ 2.2 insert/delete a new worksheet
+ 2.3 Close openoffice.org
+ 2.4 Expect behavior:
+worksheet is inserted/deleted normally.
+ 3 Insert/delete worksheet with Basic Editor opened test document's macro
+ 3.1 Open the test file
+ 3.2 Open Basic Editor with test document's macro
+ 3.3 insert/delete worksheet
+ 3.4 close Basic Editor
+ 3.5 close openoffice.org
+ 3.6 Expect behavior:
+insert/delete worksheet will insert/delete related basic module. And Basic Editor and openoffice.org should be closed normally.
+ 4 Insert/delete worksheet with Basic Editor not opened test document's macro
+ 4.1 Open the test file
+ 4.2 Open Basic Editor with macro that is not the test document's.
+ 4.3 insert/delete worksheet
+ 4.4 close Basic Editor
+ 4.5 close openoffice.org
+ 4.6 Expected behavior:
+insert/delete worksheet will not effect the Basic Editor. And openoffice.org should be closed normally.
+ 5 Insert/delete worksheet after Basic Editor open test document's macro and then close Basic Editor
+ 5.1 Open the test file
+ 5.2 Open Basic Editor with test file's macro
+ 5.3 And then close Basic Editor.
+ 5.4 Insert/delete worksheet
+ 5.5 close openoffice.org
+ 5.6 Expected behavior:
+insert/delete worksheet no error and openoffice.org is closed normally.
+ 6 Insert/delete worksheet with Basic Editor opened test file's macro
+ 6.1 Open the test file
+ 6.2 Open another test file B
+ 6.3 Open test document's macro with Basic Editor
+ 6.4 inset/delete worksheet to test file
+ 6.5 close Basic Editor and openoffice.org
+ 6.6 Expected behavior:
+insert/delete worksheet will insert/delete related basic module. And Basic Editor and openoffice.org should be closed normally.
+ 7 Insert/delete worksheet with Basic Editor opened another xls file's macro
+ 7.1 Open the test file
+ 7.2 Open another test file B
+ 7.3 Open B's macro with Basic Editor
+ 7.4 insert/delete worksheet to test file
+ 7.5 close Basic Editor and openoffice.org
+ 7.6 Expected behavior:
+insert/delete worksheet should not effect Basic Editor and Basic Editor and openoffice.org should be closed normally.
+ 8 Insert/delete worksheet with Basic Editor opened test file's macro and close document first
+ 8.1 Open the test file
+ 8.2 Open test file's macro with Basic Editor
+ 8.3 insert/delete worksheet
+ 8.4 close document and then Basic Editor
+ 8.5 Expected behavior:
+document and Basic Editor are closed normally.
+
+



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