ooo-build r11957 - trunk/patches/test/vba



Author: jiaojh
Date: Thu Mar 20 05:28:21 2008
New Revision: 11957
URL: http://svn.gnome.org/viewvc/ooo-build?rev=11957&view=rev

Log:
update for delete/insert worksheet


Modified:
   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 Mar 20 05:28:21 2008
@@ -1,5 +1,5 @@
 --- /dev/null	2007-05-04 18:54:36.000000000 +0800
-+++ udkapi/com/sun/star/script/ModuleInfo.idl	2008-03-17 14:13:38.000000000 +0800
++++ udkapi/com/sun/star/script/ModuleInfo.idl	2008-03-19 15:12:14.000000000 +0800
 @@ -0,0 +1,58 @@
 +/*************************************************************************
 + *
@@ -60,7 +60,7 @@
 +
 +#endif
 --- /dev/null	2007-05-04 18:54:36.000000000 +0800
-+++ udkapi/com/sun/star/script/ModuleType.idl	2008-03-17 15:22:19.000000000 +0800
++++ udkapi/com/sun/star/script/ModuleType.idl	2008-03-19 15:12:14.000000000 +0800
 @@ -0,0 +1,58 @@
 +/*************************************************************************
 + *
@@ -121,7 +121,7 @@
 +
 +#endif
 --- /dev/null	2007-05-04 18:54:36.000000000 +0800
-+++ udkapi/com/sun/star/script/XObjectProvider.idl	2008-03-17 14:13:38.000000000 +0800
++++ udkapi/com/sun/star/script/XObjectProvider.idl	2008-03-19 15:12:14.000000000 +0800
 @@ -0,0 +1,52 @@
 +/*************************************************************************
 + *
@@ -175,8 +175,8 @@
 +
 +};  };  };  };
 +#endif
---- udkapi/com/sun/star/script/makefile.mk.orig	2008-03-17 12:35:48.000000000 +0800
-+++ udkapi/com/sun/star/script/makefile.mk	2008-03-17 14:13:38.000000000 +0800
+--- udkapi/com/sun/star/script/makefile.mk.orig	2008-03-19 15:03:09.000000000 +0800
++++ udkapi/com/sun/star/script/makefile.mk	2008-03-19 15:12:14.000000000 +0800
 @@ -89,6 +89,9 @@ IDLFILES=\
  	XScriptEventsAttacher.idl\
  	XDefaultMethod.idl\
@@ -187,8 +187,8 @@
  	DateType.idl\
  
  # ------------------------------------------------------------------
---- svx/source/msfilter/msvbasic.hxx.orig	2008-03-17 12:35:48.000000000 +0800
-+++ svx/source/msfilter/msvbasic.hxx	2008-03-17 14:13:38.000000000 +0800
+--- svx/source/msfilter/msvbasic.hxx.orig	2008-03-19 15:03:09.000000000 +0800
++++ svx/source/msfilter/msvbasic.hxx	2008-03-19 15:43:24.000000000 +0800
 @@ -50,11 +50,13 @@
  #ifndef _DYNARY_HXX
  #include <tools/dynary.hxx>
@@ -199,11 +199,11 @@
  #endif
  #include<map>
  
-+using ::com::sun::star::script::ModuleType;
++using namespace ::com::sun::star::script::ModuleType;
  /* class VBA:
   * The VBA class provides a set of methods to handle Visual Basic For
   * Applications streams, the constructor is given the root ole2 stream
-@@ -77,7 +79,7 @@ DECLARE_DYNARRAY(StringArray,String *)
+@@ -77,13 +79,13 @@ DECLARE_DYNARRAY(StringArray,String *)
  // #117718# define internal types to distinguish between
  // module types, form, class & normal
  // #i37965# DR 2004-12-03: add "Document", used in Excel for macros attached to sheet
@@ -212,8 +212,25 @@
  
  // #117718# define map to hold types of module
  //
---- svx/source/msfilter/svxmsbas.cxx.orig	2008-03-17 12:35:48.000000000 +0800
-+++ svx/source/msfilter/svxmsbas.cxx	2008-03-17 14:13:38.000000000 +0800
+-
++typedef sal_Int32 ModType;
+ typedef ::std::map< UniString,
+-    ModuleType > ModuleTypeHash;
++    ModType > ModuleTypeHash;
+ 
+ class VBA_Impl
+ {
+@@ -104,7 +106,7 @@ public:
+     void Output(int len, const sal_uInt8 *data);
+     //
+     // #117718# member map of module names to types of module
+-    ModuleType GetModuleType( const UniString& rModuleName );
++    ModType GetModuleType( const UniString& rModuleName );
+ 
+     std::vector<String> maReferences;
+ private:
+--- svx/source/msfilter/svxmsbas.cxx.orig	2008-03-19 15:03:09.000000000 +0800
++++ svx/source/msfilter/svxmsbas.cxx	2008-03-19 15:46:59.000000000 +0800
 @@ -88,6 +88,7 @@ using namespace com::sun::star::awt;
  
  #include <com/sun/star/container/XNameContainer.hpp>
@@ -222,32 +239,41 @@
  using namespace com::sun::star::container;
  using namespace com::sun::star::script;
  using namespace com::sun::star::uno;
+@@ -319,7 +320,7 @@ BOOL SvxImportMSVBasic::ImportCode_Impl(
+                 // is the same as the encoding for the names
+                 // that are keys in the map used by GetModuleType method
+                 const String &sOrigVBAModName = aVBA.GetStreamName( i );
+-                ModuleType mType = aVBA.GetModuleType( sOrigVBAModName );
++                ModType mType = aVBA.GetModuleType( sOrigVBAModName );
+ 
+                 rtl::OUString sClassRem( RTL_CONSTASCII_USTRINGPARAM( "Rem Attribute VBA_ModuleType=" ) );
+ 
 @@ -327,23 +328,23 @@ BOOL SvxImportMSVBasic::ImportCode_Impl(
  
                  switch( mType )
                  {
 -                    case Class:
-+                    case ::com::sun::star::script::ModuleType_Class:
++                    case ::com::sun::star::script::ModuleType::Class:
                          modeTypeComment = sClassRem +
                              ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "VBAClassModule\n" ) );
                          break;
 -                    case Form:
-+                    case ::com::sun::star::script::ModuleType_Form:
++                    case ::com::sun::star::script::ModuleType::Form:
                          modeTypeComment = sClassRem +
                              ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "VBAFormModule\n" ) );
                          break;
 -                    case Document:
-+                    case ::com::sun::star::script::ModuleType_Document:
++                    case ::com::sun::star::script::ModuleType::Document:
                          modeTypeComment = sClassRem +
                              ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "VBADocumentModule\n" ) );
                          break;
 -                    case Normal:
-+                    case ::com::sun::star::script::ModuleType_Normal:
++                    case ::com::sun::star::script::ModuleType::Normal:
                          modeTypeComment = sClassRem +
                              ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "VBAModule\n" ) );
                          break;
 -                    case Unknown:
-+                    case ::com::sun::star::script::ModuleType_Unknown:
++                    case ::com::sun::star::script::ModuleType::Unknown:
                          modeTypeComment = sClassRem +
                              ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "VBAUnknown\n" ) );
                          break;
@@ -256,7 +282,7 @@
  				{
  					modeTypeComment = modeTypeComment + sVBAOption;
 -					if ( mType == Class )
-+					if ( mType == ::com::sun::star::script::ModuleType_Class )
++					if ( mType == ::com::sun::star::script::ModuleType::Class )
  						modeTypeComment = modeTypeComment + sClassOption;
  
  				}
@@ -267,7 +293,7 @@
 -				if ( aSource.getLength() )
  				{
 +                    Reference< script::XObjectProvider > xVBAObjectProvider;
-+                    if( mType == ::com::sun::star::script::ModuleType_Document )
++                    if( mType == ::com::sun::star::script::ModuleType::Document )
 +                    {
 +                        Reference< XMultiServiceFactory> xSF(rDocSh.GetModel(), UNO_QUERY);
 +                        if ( xSF.is() )
@@ -285,12 +311,12 @@
  
  					Any aSourceAny;
 -					aSourceAny <<= aSource;
-+                    if ( xVBAObjectProvider.is() && mType == ::com::sun::star::script::ModuleType_Document )
++                    if ( xVBAObjectProvider.is() && mType == ::com::sun::star::script::ModuleType::Document )
 +                    {
 +                        script::ModuleInfo sModuleInfo;
 +                        sModuleInfo.ModuleName = aModName;
 +                        sModuleInfo.ModuleSource = aSource;
-+                        sModuleInfo.ModuleType == ::com::sun::star::script::ModuleType_Document;
++                        sModuleInfo.ModuleType == ::com::sun::star::script::ModuleType::Document;
 +                        sModuleInfo.ModuleObjectProvider.set( xVBAObjectProvider, UNO_QUERY );
 +                        aSourceAny <<= sModuleInfo;
 +                    }
@@ -308,14 +334,23 @@
  		SFX_APP()->LeaveBasicCall();
  	}
  	return bRet;
---- svx/source/msfilter/msvbasic.cxx.orig	2008-03-17 12:35:48.000000000 +0800
-+++ svx/source/msfilter/msvbasic.cxx	2008-03-17 14:13:38.000000000 +0800
+--- svx/source/msfilter/msvbasic.cxx.orig	2008-03-19 15:03:09.000000000 +0800
++++ svx/source/msfilter/msvbasic.cxx	2008-03-19 15:44:51.000000000 +0800
+@@ -445,7 +445,7 @@ int VBA_Impl::ReadVBAProject(const SvSto
+  *
+ */
+ 
+-ModuleType VBA_Impl::GetModuleType( const UniString& rModuleName )
++ModType VBA_Impl::GetModuleType( const UniString& rModuleName )
+ {
+     ModuleTypeHash::iterator iter = mhModHash.find( rModuleName );
+     ModuleTypeHash::iterator iterEnd = mhModHash.end();
 @@ -453,7 +453,7 @@ ModuleType VBA_Impl::GetModuleType( cons
      {
          return iter->second;
      }
 -    return Unknown;
-+    return ::com::sun::star::script::ModuleType_Unknown;
++    return ::com::sun::star::script::ModuleType::Unknown;
  }
  
  bool VBA_Impl::Open( const String &rToplevel, const String &rSublevel )
@@ -324,7 +359,7 @@
          static const String sBaseClass( RTL_CONSTASCII_USTRINGPARAM( "BaseClass" ) );
          static const String sDocument(  RTL_CONSTASCII_USTRINGPARAM( "Document" ) );
 -        mhModHash[ sThisDoc ] = Class;
-+        mhModHash[ sThisDoc ] = ::com::sun::star::script::ModuleType_Class;
++        mhModHash[ sThisDoc ] = ::com::sun::star::script::ModuleType::Class;
          while ( pStp->ReadByteStringLine( tmp, meCharSet ) )
          {
              xub_StrLen index = tmp.Search( '=' );
@@ -333,7 +368,7 @@
                  if ( key == sClass )
                  {
 -                    mhModHash[ value ] = Class;
-+                    mhModHash[ value ] = ::com::sun::star::script::ModuleType_Class;
++                    mhModHash[ value ] = ::com::sun::star::script::ModuleType::Class;
                      OSL_TRACE("Module %s is of type Class",
                          ::rtl::OUStringToOString( value ,
                              RTL_TEXTENCODING_ASCII_US ).pData->buffer );
@@ -341,7 +376,7 @@
                  else if ( key == sBaseClass )
                  {
 -                    mhModHash[ value ] =  Form;
-+                    mhModHash[ value ] =  ::com::sun::star::script::ModuleType_Form;
++                    mhModHash[ value ] =  ::com::sun::star::script::ModuleType::Form;
                      OSL_TRACE("Module %s is of type Form",
                          ::rtl::OUStringToOString( value ,
                              RTL_TEXTENCODING_ASCII_US ).pData->buffer );
@@ -350,7 +385,7 @@
                      value.Erase( value.Search( '/' ) );
  
 -                    mhModHash[ value ] = Document;
-+                    mhModHash[ value ] = ::com::sun::star::script::ModuleType_Document;
++                    mhModHash[ value ] = ::com::sun::star::script::ModuleType::Document;
                      OSL_TRACE("Module %s is of type Document VBA",
                          ::rtl::OUStringToOString( value ,
                              RTL_TEXTENCODING_ASCII_US ).pData->buffer );
@@ -358,12 +393,12 @@
                  else if ( key == sModule )
                  {
 -                    mhModHash[ value ] = Normal;
-+                    mhModHash[ value ] = ::com::sun::star::script::ModuleType_Normal;
++                    mhModHash[ value ] = ::com::sun::star::script::ModuleType::Normal;
                      OSL_TRACE("Module %s is of type Normal VBA",
                          ::rtl::OUStringToOString( value ,
                              RTL_TEXTENCODING_ASCII_US ).pData->buffer );
---- sc/inc/servuno.hxx.orig	2008-03-17 12:35:48.000000000 +0800
-+++ sc/inc/servuno.hxx	2008-03-17 14:13:38.000000000 +0800
+--- sc/inc/servuno.hxx.orig	2008-03-19 15:03:09.000000000 +0800
++++ sc/inc/servuno.hxx	2008-03-19 15:12:14.000000000 +0800
 @@ -103,7 +103,8 @@ class ScDocShell;
  #define SC_SERVICE_FORMULAPARS  38
  #define SC_SERVICE_OPCODEMAPPER 39
@@ -374,8 +409,8 @@
  #define SC_SERVICE_INVALID		USHRT_MAX
  
  
---- sc/source/ui/unoobj/servuno.cxx.orig	2008-03-17 12:35:48.000000000 +0800
-+++ sc/source/ui/unoobj/servuno.cxx	2008-03-17 17:04:52.000000000 +0800
+--- sc/source/ui/unoobj/servuno.cxx.orig	2008-03-19 15:03:09.000000000 +0800
++++ sc/source/ui/unoobj/servuno.cxx	2008-03-19 15:12:14.000000000 +0800
 @@ -77,8 +77,94 @@
  #include <svx/xmlgrhlp.hxx>
  #endif
@@ -498,8 +533,8 @@
  	}
  	return xRet;
  }
---- sc/source/ui/unoobj/makefile.mk.orig	2008-03-17 12:35:48.000000000 +0800
-+++ sc/source/ui/unoobj/makefile.mk	2008-03-17 14:13:38.000000000 +0800
+--- sc/source/ui/unoobj/makefile.mk.orig	2008-03-19 15:03:09.000000000 +0800
++++ sc/source/ui/unoobj/makefile.mk	2008-03-19 15:12:14.000000000 +0800
 @@ -54,6 +54,7 @@ AUTOSEG=true
  .INCLUDE :  sc.mk
  .INCLUDE :  $(PRJ)$/util$/makefile.pmk
@@ -508,8 +543,8 @@
  # --- Files --------------------------------------------------------
  SLO1FILES =  \
          $(SLO)$/docuno.obj \
---- basctl/source/basicide/scriptdocument.cxx.orig	2008-03-17 12:35:48.000000000 +0800
-+++ basctl/source/basicide/scriptdocument.cxx	2008-03-17 14:13:38.000000000 +0800
+--- basctl/source/basicide/scriptdocument.cxx.orig	2008-03-19 15:03:09.000000000 +0800
++++ basctl/source/basicide/scriptdocument.cxx	2008-03-19 15:12:14.000000000 +0800
 @@ -61,6 +61,7 @@
  #include <com/sun/star/frame/XModel2.hpp>
  #include <com/sun/star/awt/XWindow2.hpp>
@@ -563,7 +598,7 @@
      }
  
 --- /dev/null	2007-05-04 18:54:36.000000000 +0800
-+++ basic/inc/basic/sbobjmod.hxx	2008-03-17 17:14:47.000000000 +0800
++++ basic/inc/basic/sbobjmod.hxx	2008-03-19 15:12:14.000000000 +0800
 @@ -0,0 +1,67 @@
 +/*************************************************************************
 + *
@@ -632,8 +667,8 @@
 +#endif
 +#endif
 +
---- basic/prj/d.lst.orig	2008-03-17 12:35:48.000000000 +0800
-+++ basic/prj/d.lst	2008-03-17 14:13:38.000000000 +0800
+--- basic/prj/d.lst.orig	2008-03-19 15:03:09.000000000 +0800
++++ basic/prj/d.lst	2008-03-19 15:12:14.000000000 +0800
 @@ -27,6 +27,7 @@ mkdir: %_DEST%\inc%_EXT%\basic
  
  ..\inc\basic\sbdef.hxx %_DEST%\inc%_EXT%\basic\sbdef.hxx
@@ -642,8 +677,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.orig	2008-03-17 12:35:48.000000000 +0800
-+++ basic/source/classes/sbxmod.cxx	2008-03-17 17:14:45.000000000 +0800
+--- basic/source/classes/sbxmod.cxx.orig	2008-03-19 15:03:09.000000000 +0800
++++ basic/source/classes/sbxmod.cxx	2008-03-19 16:39:23.000000000 +0800
 @@ -62,6 +62,9 @@
  #include "sbunoobj.hxx"
  #include <basic/hilight.hxx>
@@ -662,7 +697,7 @@
  
  SV_DECL_VARARR(SbiBreakpoints,USHORT,4,4)
  SV_IMPL_VARARR(SbiBreakpoints,USHORT)
-@@ -1903,6 +1907,105 @@ void SyntaxHighlighter::getHighlightPort
+@@ -1903,6 +1907,79 @@ void SyntaxHighlighter::getHighlightPort
  	m_pSimpleTokenizer->getHighlightPortions( nLine, rLine, portions );
  }
  
@@ -674,37 +709,11 @@
 +    SetSource32( mInfo.ModuleSource );
 +}
 +
-+BOOL lcl_IsSameClass( const rtl::OUString& sName, const rtl::OUString& sMatchName )
-+{
-+    BOOL bMatched = FALSE;
-+    rtl::OUString sStr = sName;
-+    rtl::OUString sMatchStr;
-+    bMatched = sStr.equalsIgnoreAsciiCase( sMatchName );
-+    sal_Int32 nIndex = 0;
-+    while( ( nIndex = sStr.lastIndexOf( rtl::OUString::createFromAscii( "." ) ) ) > 0 )
-+    {
-+        rtl::OUString sTmp = sStr.copy( nIndex + 1 );
-+        if( sMatchStr.getLength() )
-+            sTmp +=  rtl::OUString::createFromAscii( "." );
-+        sMatchStr = sTmp + sMatchStr;
-+        if( sMatchStr.equalsIgnoreAsciiCase( sMatchName ) )
-+            return TRUE;
-+        sStr = sStr.copy( 0, nIndex );
-+    } 
-+    return bMatched;
-+}
-+
 +BOOL
 +SbObjModule::IsClass( const XubString& rName )
 +{
-+    BOOL bIsClass = FALSE;
-+    if( SbxObject::IsClass( rName ) )
-+        return TRUE;
-+    if( GetObject() )
-+    {
-+        bIsClass = lcl_IsSameClass( GetClassName(), rtl::OUString( rName ) );
-+    }
-+    return bIsClass;
++    GetObject();
++    return SbxObject::IsClass( rName );
 +}
 +
 +SbxVariable*
@@ -768,8 +777,8 @@
  
  /////////////////////////////////////////////////////////////////////////
  // Implementation SbJScriptModule (Basic-Modul fuer JavaScript-Sourcen)
---- basic/source/classes/sb.cxx.orig	2008-03-17 12:35:48.000000000 +0800
-+++ basic/source/classes/sb.cxx	2008-03-17 14:13:38.000000000 +0800
+--- basic/source/classes/sb.cxx.orig	2008-03-19 15:03:09.000000000 +0800
++++ basic/source/classes/sb.cxx	2008-03-19 15:12:14.000000000 +0800
 @@ -70,6 +70,7 @@
  #include "disas.hxx"
  #include "runtime.hxx"
@@ -818,8 +827,8 @@
  			// Sonst testen, ob das Element vorhanden ist
  			// GBLSEARCH-Flag rausnehmen (wg. Rekursion)
  			USHORT nGblFlag = p->GetFlags() & SBX_GBLSEARCH;
---- basic/source/runtime/methods1.cxx.orig	2008-03-17 12:35:48.000000000 +0800
-+++ basic/source/runtime/methods1.cxx	2008-03-17 14:13:38.000000000 +0800
+--- basic/source/runtime/methods1.cxx.orig	2008-03-19 15:03:09.000000000 +0800
++++ basic/source/runtime/methods1.cxx	2008-03-19 15:12:14.000000000 +0800
 @@ -60,6 +60,9 @@
  #ifndef _SBX_HXX
  #include <basic/sbx.hxx>
@@ -854,8 +863,8 @@
  	}
  	else
  	{
---- basic/source/basmgr/basmgr.cxx.orig	2008-03-17 12:35:48.000000000 +0800
-+++ basic/source/basmgr/basmgr.cxx	2008-03-17 14:13:38.000000000 +0800
+--- basic/source/basmgr/basmgr.cxx.orig	2008-03-19 15:03:09.000000000 +0800
++++ basic/source/basmgr/basmgr.cxx	2008-03-19 15:28:47.000000000 +0800
 @@ -102,6 +102,8 @@
  #include <com/sun/star/script/XStarBasicDialogInfo.hpp>
  #include <com/sun/star/script/XStarBasicLibraryInfo.hpp>
@@ -921,7 +930,7 @@
              if( !pMod )
              {
 -			    pLib->MakeModule32( aName, aMod );
-+                if ( mType == ::com::sun::star::script::ModuleType_Document )
++                if ( mType == ::com::sun::star::script::ModuleType::Document )
 +                {
 +                    //pLib->MakeModule32( aName, aMod, SBXID_DOCUMENTMOD );
 +                    pLib->MakeObjModule( aName, mInfo );
@@ -962,8 +971,8 @@
  
  		pLib->SetModified( FALSE );
  	}
---- basic/inc/basic/sbstar.hxx.orig	2008-03-17 12:35:48.000000000 +0800
-+++ basic/inc/basic/sbstar.hxx	2008-03-17 14:13:38.000000000 +0800
+--- basic/inc/basic/sbstar.hxx.orig	2008-03-19 15:03:09.000000000 +0800
++++ basic/inc/basic/sbstar.hxx	2008-03-19 15:12:14.000000000 +0800
 @@ -51,6 +51,7 @@
  
  #include <basic/sbdef.hxx>
@@ -999,8 +1008,8 @@
  
  	// #60175 TRUE: SFX-Resource wird bei Basic-Fehlern nicht angezogen
  	static void StaticSuppressSfxResource( BOOL bSuppress );
---- basic/inc/basic/sbdef.hxx.orig	2008-03-17 12:35:49.000000000 +0800
-+++ basic/inc/basic/sbdef.hxx	2008-03-17 14:13:38.000000000 +0800
+--- basic/inc/basic/sbdef.hxx.orig	2008-03-19 15:03:09.000000000 +0800
++++ basic/inc/basic/sbdef.hxx	2008-03-19 15:12:14.000000000 +0800
 @@ -100,6 +100,7 @@ void setBasicWatchMode( bool bOn );
  
  #define SBXID_BASIC			0x6273			// sb: StarBASIC
@@ -1009,8 +1018,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.orig	2008-03-17 12:35:49.000000000 +0800
-+++ basic/source/uno/namecont.cxx	2008-03-17 18:45:01.000000000 +0800
+--- basic/source/uno/namecont.cxx.orig	2008-03-19 15:03:09.000000000 +0800
++++ basic/source/uno/namecont.cxx	2008-03-19 15:12:14.000000000 +0800
 @@ -139,6 +139,9 @@
  #endif
  #include <basic/sbmod.hxx>
@@ -1039,47 +1048,8 @@
  		throw IllegalArgumentException();
  
  	NameContainerNameMap::iterator aIt = mHashMap.find( aName );
---- sfx2/source/doc/objmisc.cxx.orig	2008-03-11 10:57:50.000000000 +0800
-+++ sfx2/source/doc/objmisc.cxx	2008-03-17 14:13:38.000000000 +0800
-@@ -98,6 +98,9 @@
- #ifndef _COM_SUN_STAR_UTIL_XMODIFIABLE_HPP_
- #include <com/sun/star/util/XModifiable.hpp>
- #endif
-+#ifndef _COM_SUN_STAR_SCRIPT_MODULEINFO_HPP_
-+#include <com/sun/star/script/ModuleInfo.hpp>
-+#endif
- 
- #include <com/sun/star/script/provider/XScript.hpp>
- #include <com/sun/star/script/provider/XScriptProvider.hpp>
-@@ -1420,7 +1423,7 @@ ErrCode SfxObjectShell::CallXScript( con
-         ::com::sun::star::uno::Any& aRet,
-         ::com::sun::star::uno::Sequence< sal_Int16 >& aOutParamIndex,
-         ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >&
--            aOutParam, bool bRaiseError )
-+            aOutParam, bool bRaiseError, ::com::sun::star::uno::Any* pCaller )
- {
-     OSL_TRACE( "in CallXScript" );
- 	ErrCode nErr = ERRCODE_NONE;
-@@ -1463,6 +1466,17 @@ ErrCode SfxObjectShell::CallXScript( con
-         }
-         OSL_TRACE( "CallXScript, got Script, about to invoke");
-         OSL_TRACE( "CallXScript, number of params is: %d", aParams.getLength() );
-+        if ( pCaller && pCaller->hasValue() )
-+        {
-+            Reference< beans::XPropertySet > xProps( xScript, uno::UNO_QUERY ); 
-+            if ( xProps.is() )
-+            {
-+                Sequence< uno::Any > aArgs( 1 );
-+                aArgs[ 0 ] = *pCaller;
-+                xProps->setPropertyValue( rtl::OUString::createFromAscii("Caller"), uno::makeAny( aArgs ) );
-+            }
-+            
-+        } 
-         aRet = xScript->invoke( aParams, aOutParamIndex, aOutParam );
-         OSL_TRACE( "CallXScript, invoke is finished");
-     }
---- sfx2/source/doc/docmacromode.cxx.orig	2008-03-17 12:35:49.000000000 +0800
-+++ sfx2/source/doc/docmacromode.cxx	2008-03-17 14:13:38.000000000 +0800
+--- sfx2/source/doc/docmacromode.cxx.orig	2008-03-19 15:03:09.000000000 +0800
++++ sfx2/source/doc/docmacromode.cxx	2008-03-19 15:12:14.000000000 +0800
 @@ -45,6 +45,7 @@
  #include <com/sun/star/task/DocumentMacroConfirmationRequest.hpp>
  #include <com/sun/star/task/InteractionClassification.hpp>
@@ -1154,8 +1124,8 @@
  				    }
  			    }
  		    }
---- basic/inc/basic/sbxobj.hxx.orig	2008-03-17 12:35:49.000000000 +0800
-+++ basic/inc/basic/sbxobj.hxx	2008-03-17 14:13:38.000000000 +0800
+--- basic/inc/basic/sbxobj.hxx.orig	2008-03-19 15:03:09.000000000 +0800
++++ basic/inc/basic/sbxobj.hxx	2008-03-19 15:12:14.000000000 +0800
 @@ -80,7 +80,7 @@ public:
  	virtual SbxClassType GetClass() const;
  	virtual void Clear();
@@ -1165,8 +1135,8 @@
  	const String& GetClassName() const { return aClassName; }
  	void		  SetClassName( const String &rNew ) { aClassName = rNew; }
  	// Default-Property
---- basic/source/sbx/sbxobj.cxx.orig	2008-03-17 12:35:49.000000000 +0800
-+++ basic/source/sbx/sbxobj.cxx	2008-03-17 16:46:03.000000000 +0800
+--- basic/source/sbx/sbxobj.cxx.orig	2008-03-19 15:03:09.000000000 +0800
++++ basic/source/sbx/sbxobj.cxx	2008-03-19 15:12:14.000000000 +0800
 @@ -187,7 +187,7 @@ void SbxObject::SFX_NOTIFY( SfxBroadcast
  	}
  }
@@ -1176,8 +1146,8 @@
  {
  	return BOOL( aClassName.EqualsIgnoreCaseAscii( rName ) );
  }
---- sc/inc/document.hxx.orig	2008-03-11 10:57:56.000000000 +0800
-+++ sc/inc/document.hxx	2008-03-17 14:13:38.000000000 +0800
+--- sc/inc/document.hxx.orig	2008-03-19 15:03:23.000000000 +0800
++++ sc/inc/document.hxx	2008-03-19 15:12:14.000000000 +0800
 @@ -308,6 +308,7 @@ private:
  
  	com::sun::star::uno::Sequence<sal_Int8>	aProtectPass;
@@ -1204,8 +1174,8 @@
  	BOOL			GetTable( const String& rName, SCTAB& rTab ) const;
  	inline SCTAB	GetTableCount() const { return nMaxTableNumber; }
  	SvNumberFormatterIndexTable* GetFormatExchangeList() const { return pFormatExchangeList; }
---- sc/inc/table.hxx.orig	2008-03-11 10:57:56.000000000 +0800
-+++ sc/inc/table.hxx	2008-03-17 14:13:38.000000000 +0800
+--- sc/inc/table.hxx.orig	2008-03-19 15:03:23.000000000 +0800
++++ sc/inc/table.hxx	2008-03-19 15:12:14.000000000 +0800
 @@ -104,6 +104,7 @@ private:
  	ScColumn		aCol[MAXCOLCOUNT];
  
@@ -1224,8 +1194,8 @@
      const String&   GetUpperName() const;
  
  	const String&	GetPageStyle() const					{ return aPageStyle; }
---- sc/source/core/data/document.cxx.orig	2008-03-17 12:35:53.000000000 +0800
-+++ sc/source/core/data/document.cxx	2008-03-17 14:13:39.000000000 +0800
+--- sc/source/core/data/document.cxx.orig	2008-03-19 15:03:23.000000000 +0800
++++ sc/source/core/data/document.cxx	2008-03-19 15:12:14.000000000 +0800
 @@ -101,6 +101,7 @@
  #include "scextopt.hxx"
  #include "postit.hxx"
@@ -1338,8 +1308,8 @@
  				}
  
  				pTab[nTabCount - 1] = NULL;
---- sc/source/core/data/table1.cxx.orig	2008-03-11 10:57:56.000000000 +0800
-+++ sc/source/core/data/table1.cxx	2008-03-17 14:13:39.000000000 +0800
+--- sc/source/core/data/table1.cxx.orig	2008-03-19 15:03:23.000000000 +0800
++++ sc/source/core/data/table1.cxx	2008-03-19 15:12:14.000000000 +0800
 @@ -130,6 +130,7 @@ extern BOOL bIsOlk, bOderSo;
  ScTable::ScTable( ScDocument* pDoc, SCTAB nNewTab, const String& rNewName,
  					BOOL bColInfo, BOOL bRowInfo ) :
@@ -1348,8 +1318,8 @@
  	bScenario( FALSE ),
  	bLayoutRTL( FALSE ),
      bLoadingRTL( FALSE ),
---- sc/source/filter/excel/excdoc.cxx.orig	2008-03-17 12:35:53.000000000 +0800
-+++ sc/source/filter/excel/excdoc.cxx	2008-03-17 14:13:39.000000000 +0800
+--- sc/source/filter/excel/excdoc.cxx.orig	2008-03-19 15:03:23.000000000 +0800
++++ sc/source/filter/excel/excdoc.cxx	2008-03-19 15:12:14.000000000 +0800
 @@ -168,7 +168,7 @@ void ExcTable::FillAsHeader( ExcBoundshe
  	String	aTmpString;
      SCTAB  nScTabCount     = rTabInfo.GetScTabCount();
@@ -1412,8 +1382,8 @@
  
      for( ; nScTab < nScTabCount; ++nScTab )
      {
---- sc/source/filter/excel/xelink.cxx.orig	2008-03-17 12:35:53.000000000 +0800
-+++ sc/source/filter/excel/xelink.cxx	2008-03-17 14:13:39.000000000 +0800
+--- sc/source/filter/excel/xelink.cxx.orig	2008-03-19 15:03:23.000000000 +0800
++++ sc/source/filter/excel/xelink.cxx	2008-03-19 15:12:14.000000000 +0800
 @@ -1296,7 +1296,6 @@ XclExpSupbookBuffer::XclExpSupbookBuffer
  {
      XclExpTabInfo& rTabInfo = GetTabInfo();
@@ -1431,8 +1401,8 @@
          mnOwnDocSB = Append( xSupbook );
          for( sal_uInt16 nXclTab = 0; nXclTab < nXclCnt; ++nXclTab )
              maSBIndexVec[ nXclTab ].Set( mnOwnDocSB, nXclTab );
---- sc/source/filter/excel/xlocx.cxx.orig	2008-03-17 12:35:53.000000000 +0800
-+++ sc/source/filter/excel/xlocx.cxx	2008-03-17 14:13:39.000000000 +0800
+--- sc/source/filter/excel/xlocx.cxx.orig	2008-03-19 15:03:23.000000000 +0800
++++ sc/source/filter/excel/xlocx.cxx	2008-03-19 15:12:14.000000000 +0800
 @@ -88,7 +88,7 @@
  #include <cppuhelper/bootstrap.hxx>
  #endif
@@ -1453,8 +1423,8 @@
                  {
                      Reference<XComponentContext > xContext( ::cppu::defaultBootstrap_InitialComponentContext(), UNO_QUERY_THROW ); // Fatal error anyway
                      if ( SbxArray* pMethods = pModule->GetMethods() )
---- sc/source/filter/inc/excimp8.hxx.orig	2008-03-17 12:35:53.000000000 +0800
-+++ sc/source/filter/inc/excimp8.hxx	2008-03-17 14:13:39.000000000 +0800
+--- sc/source/filter/inc/excimp8.hxx.orig	2008-03-19 15:03:23.000000000 +0800
++++ sc/source/filter/inc/excimp8.hxx	2008-03-19 15:12:14.000000000 +0800
 @@ -69,6 +69,7 @@ class XclImpStream;
  
  class ImportExcel8 : public ImportExcel
@@ -1463,8 +1433,8 @@
  	protected:
          ExcScenarioList         aScenList;
  
---- sc/source/ui/docshell/docsh.cxx.orig	2008-03-17 12:35:53.000000000 +0800
-+++ sc/source/ui/docshell/docsh.cxx	2008-03-17 14:13:39.000000000 +0800
+--- sc/source/ui/docshell/docsh.cxx.orig	2008-03-19 15:03:23.000000000 +0800
++++ sc/source/ui/docshell/docsh.cxx	2008-03-19 15:12:14.000000000 +0800
 @@ -207,11 +207,8 @@ const static rtl::OUString sUrlPart2 = r
  	rtl::OUString sCodeName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ThisWorkbook") );
  	if ( pShell )
@@ -1479,8 +1449,8 @@
  	}
  	return sCodeName;
  }	
---- sc/source/ui/view/tabview5.cxx.orig	2008-03-17 12:35:53.000000000 +0800
-+++ sc/source/ui/view/tabview5.cxx	2008-03-17 14:13:39.000000000 +0800
+--- sc/source/ui/view/tabview5.cxx.orig	2008-03-19 15:03:23.000000000 +0800
++++ sc/source/ui/view/tabview5.cxx	2008-03-19 15:12:14.000000000 +0800
 @@ -347,10 +347,10 @@ void ScTabView::TabChanged()
  	aViewData.GetDocument()->BroadcastUno( SfxSimpleHint( SC_HINT_TABLECHANGED ) );
  	ScExtDocOptions* pExtOptions = aViewData.GetDocument()->GetExtDocOptions();
@@ -1496,8 +1466,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.orig	2008-03-17 12:35:53.000000000 +0800
-+++ sc/source/filter/excel/excimp8.cxx	2008-03-17 14:13:39.000000000 +0800
+--- sc/source/filter/excel/excimp8.cxx.orig	2008-03-19 15:03:23.000000000 +0800
++++ sc/source/filter/excel/excimp8.cxx	2008-03-19 15:12:14.000000000 +0800
 @@ -148,7 +148,7 @@ using namespace com::sun::star;
  
  
@@ -1525,8 +1495,8 @@
          }
  	}
  }
---- sc/source/ui/unoobj/viewuno.cxx.orig	2008-03-17 12:35:53.000000000 +0800
-+++ sc/source/ui/unoobj/viewuno.cxx	2008-03-17 14:13:39.000000000 +0800
+--- sc/source/ui/unoobj/viewuno.cxx.orig	2008-03-19 15:03:23.000000000 +0800
++++ sc/source/ui/unoobj/viewuno.cxx	2008-03-19 15:12:14.000000000 +0800
 @@ -1778,10 +1778,8 @@ void ScTabViewObj::SelectionChanged()
  		{
  			ScExtDocOptions* pExtOptions = pViewData->GetDocument()->GetExtDocOptions();
@@ -1539,8 +1509,8 @@
  			
  			String sSheetSelectionScript( RTL_CONSTASCII_USTRINGPARAM("Worksheet_SelectionChange") );
  			String sWorkBookSheetSelectionScript( RTL_CONSTASCII_USTRINGPARAM("Workbook_SheetSelectionChange") );
---- sc/source/ui/vba/vbaworksheet.cxx.orig	2008-03-17 12:35:53.000000000 +0800
-+++ sc/source/ui/vba/vbaworksheet.cxx	2008-03-17 14:13:39.000000000 +0800
+--- sc/source/ui/vba/vbaworksheet.cxx.orig	2008-03-19 15:03:23.000000000 +0800
++++ sc/source/ui/vba/vbaworksheet.cxx	2008-03-19 15:12:14.000000000 +0800
 @@ -815,8 +815,10 @@ ScVbaWorksheet::getCodeName() throw (css
      {
          uno::Reference< frame::XModel > xModel( getModel(), uno::UNO_QUERY_THROW );
@@ -1567,8 +1537,8 @@
      }
      else
                 throw uno::RuntimeException(::rtl::OUString(
---- sc/source/ui/vba/vbaworkbook.cxx.orig	2008-03-17 12:35:53.000000000 +0800
-+++ sc/source/ui/vba/vbaworkbook.cxx	2008-03-17 14:13:39.000000000 +0800
+--- sc/source/ui/vba/vbaworkbook.cxx.orig	2008-03-19 15:03:23.000000000 +0800
++++ sc/source/ui/vba/vbaworkbook.cxx	2008-03-19 15:12:14.000000000 +0800
 @@ -471,9 +471,10 @@ ScVbaWorkbook::getCodeName() throw (css:
  #ifdef VBA_OOBUILD_HACK 
      uno::Reference< frame::XModel > xModel( getModel(), uno::UNO_QUERY_THROW );
@@ -1595,8 +1565,8 @@
  #else
  void SAL_CALL
  ScVbaWorkbook::setCodeName( const ::rtl::OUString& ) throw (css::uno::RuntimeException)
---- basic/source/runtime/runtime.cxx.orig	2008-03-17 12:35:59.000000000 +0800
-+++ basic/source/runtime/runtime.cxx	2008-03-17 14:13:39.000000000 +0800
+--- basic/source/runtime/runtime.cxx.orig	2008-03-19 15:03:15.000000000 +0800
++++ basic/source/runtime/runtime.cxx	2008-03-19 15:12:14.000000000 +0800
 @@ -82,6 +82,17 @@ void StarBASIC::StaticEnableReschedule( 
  {
      bStaticGlobalEnableReschedule = bReschedule;
@@ -1615,8 +1585,8 @@
  
  
  struct SbiArgvStack {					// Argv stack:
---- sc/source/ui/docshell/docfunc.cxx.orig	2008-03-17 12:35:59.000000000 +0800
-+++ sc/source/ui/docshell/docfunc.cxx	2008-03-17 14:13:39.000000000 +0800
+--- sc/source/ui/docshell/docfunc.cxx.orig	2008-03-19 15:03:15.000000000 +0800
++++ sc/source/ui/docshell/docfunc.cxx	2008-03-19 16:15:15.000000000 +0800
 @@ -58,6 +58,12 @@
  #include <svtools/PasswordHelper.hxx>
  #endif
@@ -1657,7 +1627,7 @@
 +    ::rtl::OUString sVbaOption( RTL_CONSTASCII_USTRINGPARAM( "Rem Attribute VBA_ModuleType=VBADocumentModule\nOption VBASupport 1\n" ));
 +    sModuleInfo.ModuleName = aModName;
 +    sModuleInfo.ModuleSource = sVbaOption;
-+    sModuleInfo.ModuleType = script::ModuleType_Document;
++    sModuleInfo.ModuleType = script::ModuleType::Document;
 +    sModuleInfo.ModuleObjectProvider.set( xVBAObjectProvider, uno::UNO_QUERY );
 +    return sModuleInfo;
 +}
@@ -1786,8 +1756,8 @@
  		rDocShell.Broadcast( ScTablesHint( SC_TAB_DELETED, nTab ) );
  
  		if (bWasLinked)
---- basctl/source/basicide/basidesh.cxx.orig	2008-03-17 12:35:59.000000000 +0800
-+++ basctl/source/basicide/basidesh.cxx	2008-03-17 18:44:51.000000000 +0800
+--- basctl/source/basicide/basidesh.cxx.orig	2008-03-19 15:03:15.000000000 +0800
++++ basctl/source/basicide/basidesh.cxx	2008-03-20 13:34:01.000000000 +0800
 @@ -97,6 +97,8 @@
  #ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
  #include <com/sun/star/container/XNameContainer.hpp>
@@ -1811,27 +1781,20 @@
  	DestroyModulWindowLayout();
 +
 +    // Destroy all ContainerListeners for Basic Container.
-+    removeAllContainerListener();
++    removeContainerListener( m_aCurDocument );
 +    
  	// 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
+@@ -275,6 +280,7 @@ 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
+@@ -302,6 +308,64 @@ void BasicIDEShell::onDocumentSaveAsDone
  {
      // not interested in
  }
@@ -1844,10 +1807,16 @@
 +
 +// XContainerListener
 +//----------------------------------------------------------------------------
-+void SAL_CALL BasicIDEShell::elementInserted( const container::ContainerEvent& /*Event*/ )
++static const rtl::OUString sStandardLibName(  rtl::OUString::createFromAscii("Standard") );
++void SAL_CALL BasicIDEShell::elementInserted( const container::ContainerEvent& Event )
 +    throw( uno::RuntimeException )
 +{
-+    UpdateBasWindows( TRUE );
++    rtl::OUString sModuleName;
++    if( Event.Accessor >>= sModuleName )
++    {
++        IDEBaseWindow* pWin = 0;
++        pWin = FindWindow( m_aCurDocument, sStandardLibName, sModuleName, BASICIDE_TYPE_MODULE, TRUE );
++    }
 +}
 +
 +void SAL_CALL BasicIDEShell::elementReplaced( const container::ContainerEvent& Event )
@@ -1858,58 +1827,39 @@
 +    (void)Event;
 +}
 +
-+void SAL_CALL BasicIDEShell::elementRemoved( const container::ContainerEvent& /*Event*/ )
++void SAL_CALL BasicIDEShell::elementRemoved( const container::ContainerEvent& Event )
 +    throw( uno::RuntimeException )
 +{
-+    UpdateBasWindows( FALSE );
++    rtl::OUString sModuleName;
++    if( Event.Accessor >>= sModuleName )
++    {
++        IDEBaseWindow* pWin = FindWindow( m_aCurDocument, sStandardLibName, sModuleName, BASICIDE_TYPE_MODULE, TRUE );
++        if( pWin )
++            RemoveWindow( pWin, FALSE, TRUE );
++    }
 +}
-+void SAL_CALL BasicIDEShell::addContainerListener( const ScriptDocument* pScriptDocument )
++void SAL_CALL BasicIDEShell::addContainerListener( const ScriptDocument& rScriptDocument )
 +{
 +    rtl::OUString sLibName( RTL_CONSTASCII_USTRINGPARAM( "Standard" ) );
-+    uno::Reference< container::XNameContainer > xNameContainer( pScriptDocument->getLibrary( E_SCRIPTS, sLibName, FALSE ) );
++    uno::Reference< container::XNameContainer > xNameContainer( rScriptDocument.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 )
++void SAL_CALL BasicIDEShell::removeContainerListener( const ScriptDocument& rScriptDocument )
 +{
 +    rtl::OUString sLibName( RTL_CONSTASCII_USTRINGPARAM( "Standard" ) );
-+    uno::Reference< container::XNameContainer > xNameContainer( pScriptDocument->getLibrary( E_SCRIPTS, sLibName, FALSE ) );
++    uno::Reference< container::XNameContainer > xNameContainer( rScriptDocument.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
-+        )
-+    {
-+        addContainerListener( doc.base() );
-+    }
-+    
-+}
-+void SAL_CALL BasicIDEShell::removeAllContainerListener()
-+{
-+    ScriptDocuments aDocuments( ScriptDocument::getAllScriptDocuments( ScriptDocument::AllWithApplication ) );
-+    for (   ScriptDocuments::const_iterator doc = aDocuments.begin();
-+            doc != aDocuments.end();
-+            ++doc
-+        )
-+    {
-+        removeContainerListener( doc.base() );
-+    }
-+    
-+}
++
 +//============================================================================
  
  void BasicIDEShell::onDocumentClosed( const ScriptDocument& _rDocument )
  {
-@@ -402,7 +481,6 @@ void BasicIDEShell::StoreAllWindowData( 
+@@ -402,7 +466,6 @@ void BasicIDEShell::StoreAllWindowData( 
  	}
  }
  
@@ -1917,7 +1867,7 @@
  USHORT __EXPORT BasicIDEShell::PrepareClose( BOOL bUI, BOOL bForBrowsing )
  {
  	(void)bForBrowsing;
-@@ -600,7 +678,6 @@ void BasicIDEShell::ShowObjectDialog( BO
+@@ -600,7 +663,6 @@ void BasicIDEShell::ShowObjectDialog( BO
  }
  
  
@@ -1925,53 +1875,27 @@
  void __EXPORT BasicIDEShell::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId&,
  										const SfxHint& rHint, const TypeId& )
  {
-@@ -680,7 +757,43 @@ void __EXPORT BasicIDEShell::SFX_NOTIFY(
+@@ -680,8 +742,6 @@ void __EXPORT BasicIDEShell::SFX_NOTIFY(
      }
  }
  
 -
-+void BasicIDEShell::UpdateBasWindows( BOOL bInserted )
-+{
-+    if( bInserted )
-+    {
-+        rtl::OUString sLibName( RTL_CONSTASCII_USTRINGPARAM( "Standard" ) );
-+        if( GetCurWindow()->IsDocument( m_aCurDocument ) && sLibName.equals( m_aCurLibName) )
-+        {
-+            const ScriptDocument aScriptDocument( m_aCurDocument );
-+            uno::Reference< container::XNameContainer > xNameContainer( aScriptDocument.getLibrary( E_SCRIPTS, sLibName, FALSE ) );
-+            if( xNameContainer.is() )
-+            {
-+                Sequence< ::rtl::OUString > sModNames = xNameContainer->getElementNames();
-+                sal_Int32 nCount = sModNames.getLength(); 
-+                rtl::OUString sName;
-+                for( sal_Int32 i = 0; i < nCount; i++ )
-+                {
-+                    sName = sModNames[i];
-+                    ModulWindow* pNewModuleWindow = FindBasWin( aScriptDocument, sLibName, sName, TRUE, FALSE );
-+                }
-+            }
-+        }
-+    }
-+    else
-+    {
-+        for ( ULONG nWin = 0; nWin < aIDEWindowTable.Count(); nWin++ )
-+        {
-+            IDEBaseWindow* pWin = aIDEWindowTable.GetObject( nWin );
-+            if ( pWin->IsDocument( m_aCurDocument ) && ( pWin->GetLibName() == m_aCurLibName ) )
-+            {
-+                if ( !m_aCurDocument.hasModule( pWin->GetLibName(), pWin->GetName() ) )
-+                {
-+                    RemoveWindow( pWin, FALSE, TRUE );
-+                }
-+            }
-+        }
-+    }
-+}
- 
+-
  void BasicIDEShell::CheckWindows()
  {
---- sc/source/ui/view/viewfun2.cxx.orig	2008-03-17 12:35:59.000000000 +0800
-+++ sc/source/ui/view/viewfun2.cxx	2008-03-17 14:13:39.000000000 +0800
+ 	BOOL bSetCurWindow = FALSE;
+@@ -983,7 +1043,9 @@ void BasicIDEShell::SetCurLib( const Scr
+ {
+     if ( !bCheck || ( rDocument != m_aCurDocument || aLibName != m_aCurLibName ) )
+     {
++        removeContainerListener( m_aCurDocument );
+         m_aCurDocument = rDocument;
++        addContainerListener( m_aCurDocument );
+         m_aCurLibName = aLibName;
+         if ( bUpdateWindows )
+             UpdateWindows();
+--- sc/source/ui/view/viewfun2.cxx.orig	2008-03-19 15:03:15.000000000 +0800
++++ sc/source/ui/view/viewfun2.cxx	2008-03-19 15:12:14.000000000 +0800
 @@ -62,6 +62,11 @@
  #include <vcl/sound.hxx>
  #include <vcl/waitobj.hxx>
@@ -2054,8 +1978,8 @@
          SfxApplication* pSfxApp = SFX_APP();                                // Navigator
          pSfxApp->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) );
          pSfxApp->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) );
---- basctl/source/inc/basidesh.hxx.orig	2008-03-17 12:35:59.000000000 +0800
-+++ basctl/source/inc/basidesh.hxx	2008-03-17 14:13:39.000000000 +0800
+--- basctl/source/inc/basidesh.hxx.orig	2008-03-19 15:03:15.000000000 +0800
++++ basctl/source/inc/basidesh.hxx	2008-03-20 13:29:57.000000000 +0800
 @@ -62,7 +62,8 @@
  #ifndef _COM_SUN_STAR_IO_XINPUTSTREAMPROVIDER_HXX_
  #include <com/sun/star/io/XInputStreamProvider.hpp>
@@ -2078,14 +2002,12 @@
  {
  friend class JavaDebuggingListenerImpl;
  friend class LocalizationMgr;
-@@ -185,7 +188,27 @@ protected:
+@@ -185,7 +188,25 @@ 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();
++    void SAL_CALL addContainerListener( const ScriptDocument& pScriptDocument );
++    void SAL_CALL removeContainerListener( const ScriptDocument& pScriptDocument );
 +
  public:
 +    // XInterface
@@ -2106,16 +2028,8 @@
  						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 Dialog Drag&Drop in Dialog Organizer
- 	static void CopyDialogResources(
---- basctl/source/basicide/basides2.cxx.orig	2008-03-17 12:35:59.000000000 +0800
-+++ basctl/source/basicide/basides2.cxx	2008-03-17 14:13:39.000000000 +0800
+--- basctl/source/basicide/basides2.cxx.orig	2008-03-19 15:03:15.000000000 +0800
++++ basctl/source/basicide/basides2.cxx	2008-03-19 15:12:14.000000000 +0800
 @@ -252,9 +252,12 @@ ModulWindow* BasicIDEShell::CreateBasWin
  
          if ( bSuccess )



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