ooo-build r14275 - in trunk: . patches/vba



Author: pflin
Date: Fri Oct 10 02:24:11 2008
New Revision: 14275
URL: http://svn.gnome.org/viewvc/ooo-build?rev=14275&view=rev

Log:
2008-10-10  Fong Lin  <pflin novell com>
	* patches/vba/vba-basic-macrochoose-dialog.diff: updated for some
	  ugly codes.



Modified:
   trunk/ChangeLog
   trunk/patches/vba/vba-basic-macrochoose-dialog.diff

Modified: trunk/patches/vba/vba-basic-macrochoose-dialog.diff
==============================================================================
--- trunk/patches/vba/vba-basic-macrochoose-dialog.diff	(original)
+++ trunk/patches/vba/vba-basic-macrochoose-dialog.diff	Fri Oct 10 02:24:11 2008
@@ -1,6 +1,6 @@
-diff -urp '--exclude=unxlngi6.pro' basctl.bk//inc/basidesh.hrc basctl/inc/basidesh.hrc
---- basctl.bk//inc/basidesh.hrc	2008-10-09 15:50:14.000000000 +0800
-+++ basctl/inc/basidesh.hrc	2008-10-09 17:23:57.000000000 +0800
+diff -urp '--exclude=unxlngi6.pro' basctl.bk/inc/basidesh.hrc basctl/inc/basidesh.hrc
+--- basctl.bk/inc/basidesh.hrc	2008-10-10 09:48:33.000000000 +0800
++++ basctl/inc/basidesh.hrc	2008-10-10 09:53:46.000000000 +0800
 @@ -175,6 +175,10 @@
  #define RID_STR_EXPORTPACKAGE			( RID_BASICIDE_START + 100 )
  #define RID_STR_EXPORTBASIC				( RID_BASICIDE_START + 101 )
@@ -12,9 +12,9 @@
  
  #endif	// _SVX_NOIDERESIDS
  
-diff -urp '--exclude=unxlngi6.pro' basctl.bk//source/basicide/baside2.cxx basctl/source/basicide/baside2.cxx
---- basctl.bk//source/basicide/baside2.cxx	2008-10-09 15:50:15.000000000 +0800
-+++ basctl/source/basicide/baside2.cxx	2008-10-09 17:26:46.000000000 +0800
+diff -urp '--exclude=unxlngi6.pro' basctl.bk/source/basicide/baside2.cxx basctl/source/basicide/baside2.cxx
+--- basctl.bk/source/basicide/baside2.cxx	2008-10-10 09:48:33.000000000 +0800
++++ basctl/source/basicide/baside2.cxx	2008-10-10 09:53:46.000000000 +0800
 @@ -49,6 +49,7 @@
  #include <com/sun/star/script/XLibraryContainer2.hpp>
  #endif
@@ -73,9 +73,9 @@
  }
  
  void ModulWindow::SetReadOnly( BOOL b )
-diff -urp '--exclude=unxlngi6.pro' basctl.bk//source/basicide/baside3.cxx basctl/source/basicide/baside3.cxx
---- basctl.bk//source/basicide/baside3.cxx	2008-10-09 15:50:15.000000000 +0800
-+++ basctl/source/basicide/baside3.cxx	2008-10-09 15:58:15.000000000 +0800
+diff -urp '--exclude=unxlngi6.pro' basctl.bk/source/basicide/baside3.cxx basctl/source/basicide/baside3.cxx
+--- basctl.bk/source/basicide/baside3.cxx	2008-10-10 09:48:33.000000000 +0800
++++ basctl/source/basicide/baside3.cxx	2008-10-10 09:53:46.000000000 +0800
 @@ -903,8 +903,9 @@ BasicEntryDescriptor DialogWindow::Creat
  {
      ScriptDocument aDocument( GetDocument() );
@@ -87,9 +87,9 @@
  }
  
  void DialogWindow::SetReadOnly( BOOL b )
-diff -urp '--exclude=unxlngi6.pro' basctl.bk//source/basicide/basidesh.src basctl/source/basicide/basidesh.src
---- basctl.bk//source/basicide/basidesh.src	2008-10-09 15:50:15.000000000 +0800
-+++ basctl/source/basicide/basidesh.src	2008-10-09 17:26:07.000000000 +0800
+diff -urp '--exclude=unxlngi6.pro' basctl.bk/source/basicide/basidesh.src basctl/source/basicide/basidesh.src
+--- basctl.bk/source/basicide/basidesh.src	2008-10-10 09:48:33.000000000 +0800
++++ basctl/source/basicide/basidesh.src	2008-10-10 09:53:46.000000000 +0800
 @@ -639,6 +639,22 @@ String RID_STR_TRANSLATION_DEFAULT
  {
  	Text [ en-US ] = "[Default Language]" ;
@@ -113,9 +113,9 @@
  
  #define MN_EDIT       20
  #define MN_VIEW 21
-diff -urp '--exclude=unxlngi6.pro' basctl.bk//source/basicide/bastype2.cxx basctl/source/basicide/bastype2.cxx
---- basctl.bk//source/basicide/bastype2.cxx	2008-10-09 15:50:15.000000000 +0800
-+++ basctl/source/basicide/bastype2.cxx	2008-10-09 17:35:20.000000000 +0800
+diff -urp '--exclude=unxlngi6.pro' basctl.bk/source/basicide/bastype2.cxx basctl/source/basicide/bastype2.cxx
+--- basctl.bk/source/basicide/bastype2.cxx	2008-10-10 09:48:34.000000000 +0800
++++ basctl/source/basicide/bastype2.cxx	2008-10-10 09:53:46.000000000 +0800
 @@ -53,10 +53,25 @@
  #include <com/sun/star/frame/XModuleManager.hpp>
  #include <comphelper/processfactory.hxx>
@@ -481,9 +481,9 @@
                      if ( pEntry )
                      {
                          pCurEntry = pEntry;
-diff -urp '--exclude=unxlngi6.pro' basctl.bk//source/basicide/bastype2.hxx basctl/source/basicide/bastype2.hxx
---- basctl.bk//source/basicide/bastype2.hxx	2008-10-09 15:50:15.000000000 +0800
-+++ basctl/source/basicide/bastype2.hxx	2008-10-09 17:35:56.000000000 +0800
+diff -urp '--exclude=unxlngi6.pro' basctl.bk/source/basicide/bastype2.hxx basctl/source/basicide/bastype2.hxx
+--- basctl.bk/source/basicide/bastype2.hxx	2008-10-10 09:48:34.000000000 +0800
++++ basctl/source/basicide/bastype2.hxx	2008-10-10 09:53:46.000000000 +0800
 @@ -42,7 +42,7 @@
  #include <sbxitem.hxx>
  #include "basobj.hxx"
@@ -531,9 +531,9 @@
  
      // DocumentEventListener
      virtual void onDocumentCreated( const ScriptDocument& _rDocument );
-diff -urp '--exclude=unxlngi6.pro' basctl.bk//source/basicide/bastype3.cxx basctl/source/basicide/bastype3.cxx
---- basctl.bk//source/basicide/bastype3.cxx	2008-10-09 15:50:15.000000000 +0800
-+++ basctl/source/basicide/bastype3.cxx	2008-10-09 17:36:19.000000000 +0800
+diff -urp '--exclude=unxlngi6.pro' basctl.bk/source/basicide/bastype3.cxx basctl/source/basicide/bastype3.cxx
+--- basctl.bk/source/basicide/bastype3.cxx	2008-10-10 09:48:34.000000000 +0800
++++ basctl/source/basicide/bastype3.cxx	2008-10-10 10:06:49.000000000 +0800
 @@ -134,6 +134,14 @@ void __EXPORT BasicTreeListBox::Requesti
  		    }
          }
@@ -557,19 +557,20 @@
  	if ( aEntries.Count() )
  	{
  		for ( USHORT n = 0; n < aEntries.Count(); n++ )
-@@ -226,6 +235,11 @@ SbxVariable* BasicTreeListBox::FindVaria
+@@ -226,6 +235,12 @@ SbxVariable* BasicTreeListBox::FindVaria
  				case OBJ_TYPE_MODULE:
  				{
  					DBG_ASSERT( pVar && pVar->IsA( TYPE(StarBASIC) ), "FindVariable: Ungueltiges Basic" );
 +                    // extract the module name from the string like "Sheet1 (Example1)"
 +                    if( bDocumentObjects )
 +                    {
-+                        aName = aName.Copy( 0, aName.SearchAscii(" ") );
++                        sal_uInt16 nIndex = 0;
++                        aName = aName.GetToken( 0, ' ', nIndex );
 +                    }
  					pVar = ((StarBASIC*)pVar)->FindModule( aName );
  				}
  				break;
-@@ -240,6 +254,15 @@ SbxVariable* BasicTreeListBox::FindVaria
+@@ -240,6 +255,15 @@ SbxVariable* BasicTreeListBox::FindVaria
  					// sbx dialogs removed
  				}
  				break;
@@ -585,7 +586,7 @@
                  default:
                  {
                      DBG_ERROR( "FindVariable: Unbekannter Typ!" );
-@@ -260,12 +283,13 @@ BasicEntryDescriptor BasicTreeListBox::G
+@@ -260,12 +284,13 @@ BasicEntryDescriptor BasicTreeListBox::G
      ScriptDocument aDocument( ScriptDocument::getApplicationScriptDocument() );
      LibraryLocation eLocation = LIBRARY_LOCATION_UNKNOWN;
  	String aLibName;
@@ -600,7 +601,7 @@
  
  	EntryArray aEntries;
  
-@@ -332,6 +356,15 @@ BasicEntryDescriptor BasicTreeListBox::G
+@@ -332,6 +357,15 @@ BasicEntryDescriptor BasicTreeListBox::G
  					eType = pBE->GetType();
  				}
  				break;
@@ -616,7 +617,7 @@
  				default:
                  {
                      DBG_ERROR( "GetEntryDescriptor: Unbekannter Typ!" );
-@@ -345,7 +378,7 @@ BasicEntryDescriptor BasicTreeListBox::G
+@@ -345,7 +379,7 @@ BasicEntryDescriptor BasicTreeListBox::G
  		}
  	}
  
@@ -625,7 +626,7 @@
  }
  
  USHORT BasicTreeListBox::ConvertType( BasicEntryType eType )
-@@ -427,6 +460,14 @@ bool BasicTreeListBox::IsValidEntry( SvL
+@@ -427,6 +461,14 @@ bool BasicTreeListBox::IsValidEntry( SvL
              bIsValid = BasicIDE::HasMethod( aDocument, aLibName, aName, aMethodName );
          }
          break;
@@ -640,35 +641,41 @@
  		default: ;
      }
  
-diff -urp '--exclude=unxlngi6.pro' basctl.bk//source/basicide/macrodlg.cxx basctl/source/basicide/macrodlg.cxx
---- basctl.bk//source/basicide/macrodlg.cxx	2008-10-09 15:50:15.000000000 +0800
-+++ basctl/source/basicide/macrodlg.cxx	2008-10-09 16:37:16.000000000 +0800
-@@ -385,7 +385,12 @@ SbMethod* MacroChooser::CreateMacro()
+diff -urp '--exclude=unxlngi6.pro' basctl.bk/source/basicide/macrodlg.cxx basctl/source/basicide/macrodlg.cxx
+--- basctl.bk/source/basicide/macrodlg.cxx	2008-10-10 09:48:33.000000000 +0800
++++ basctl/source/basicide/macrodlg.cxx	2008-10-10 10:08:05.000000000 +0800
+@@ -385,7 +385,15 @@ SbMethod* MacroChooser::CreateMacro()
          SbModule* pModule = 0;
          String aModName( aDesc.GetName() );
          if ( aModName.Len() )
 +        {
 +            // extract the module name from the string like "Sheet1 (Example1)"
 +            if( aDesc.GetLibSubName().Equals( String( IDEResId( RID_STR_DOCUMENT_OBJECTS ) ) ) )
-+                aModName = aModName.Copy( 0, aModName.SearchAscii(" ") );
++            {
++                sal_uInt16 nIndex = 0;
++                aModName = aModName.GetToken( 0, ' ', nIndex );
++            }
  	        pModule = pBasic->FindModule( aModName );
 +        }    
          else if ( pBasic->GetModules()->Count() )
  	        pModule = (SbModule*)pBasic->GetModules()->Get( 0 );
  
-@@ -713,6 +718,9 @@ IMPL_LINK( MacroChooser, ButtonHdl, Butt
+@@ -713,6 +721,12 @@ IMPL_LINK( MacroChooser, ButtonHdl, Butt
          BasicManager* pBasMgr = aDocument.getBasicManager();
          String aLib( aDesc.GetLibName() );
          String aMod( aDesc.GetName() );
 +        // extract the module name from the string like "Sheet1 (Example1)"
 +        if( aDesc.GetLibSubName().Equals( String( IDEResId( RID_STR_DOCUMENT_OBJECTS ) ) ) )
-+            aMod = aMod.Copy( 0, aMod.SearchAscii(" ") );
++        {
++            sal_uInt16 nIndex = 0;
++            aMod = aMod.GetToken( 0, ' ', nIndex );
++        }
          String aSub( aDesc.GetMethodName() );
  		SfxMacroInfoItem aInfoItem( SID_BASICIDE_ARG_MACROINFO, pBasMgr, aLib, aMod, aSub, String() );
  		if ( pButton == &aEditButton )
-diff -urp '--exclude=unxlngi6.pro' basctl.bk//source/basicide/moduldlg.cxx basctl/source/basicide/moduldlg.cxx
---- basctl.bk//source/basicide/moduldlg.cxx	2008-10-09 15:50:15.000000000 +0800
-+++ basctl/source/basicide/moduldlg.cxx	2008-10-09 17:27:04.000000000 +0800
+diff -urp '--exclude=unxlngi6.pro' basctl.bk/source/basicide/moduldlg.cxx basctl/source/basicide/moduldlg.cxx
+--- basctl.bk/source/basicide/moduldlg.cxx	2008-10-10 09:48:33.000000000 +0800
++++ basctl/source/basicide/moduldlg.cxx	2008-10-10 10:08:44.000000000 +0800
 @@ -87,7 +87,7 @@ BOOL __EXPORT ExtBasicTreeListBox::Editi
      if ( pEntry )
      {
@@ -748,7 +755,7 @@
  		aDelButton.Enable();
  	else
  		aDelButton.Disable();
-@@ -688,13 +696,17 @@ IMPL_LINK( ObjectPage, ButtonHdl, Button
+@@ -688,13 +696,20 @@ IMPL_LINK( ObjectPage, ButtonHdl, Button
          SfxDispatcher* pDispatcher = pViewFrame ? pViewFrame->GetDispatcher() : NULL;
          SvLBoxEntry* pCurEntry = aBasicBox.GetCurEntry();
  		DBG_ASSERT( pCurEntry, "Entry?!" );
@@ -761,14 +768,17 @@
 +                String aModName( aDesc.GetName() );
 +                // extract the module name from the string like "Sheet1 (Example1)"
 +                if( aDesc.GetLibSubName().Equals( String( IDEResId( RID_STR_DOCUMENT_OBJECTS ) ) ) )
-+                    aModName = aModName.Copy( 0, aModName.SearchAscii(" ") );
++                {
++                    sal_uInt16 nIndex = 0;
++                    aModName = aModName.GetToken( 0, ' ', nIndex );
++                }
                  SbxItem aSbxItem( SID_BASICIDE_ARG_SBX, aDesc.GetDocument(), aDesc.GetLibName(), 
 -                                  aDesc.GetName(), aBasicBox.ConvertType( aDesc.GetType() ) );
 +                                  aModName, aBasicBox.ConvertType( aDesc.GetType() ) );
  				pDispatcher->Execute( SID_BASICIDE_SHOWSBX, SFX_CALLMODE_SYNCHRON, &aSbxItem, 0L );
  			}
  		}
-@@ -976,14 +988,14 @@ SbModule* createModImpl( Window* pWin, c
+@@ -976,14 +991,14 @@ SbModule* createModImpl( Window* pWin, c
  		try
  		{
              ::rtl::OUString sModuleCode;
@@ -789,7 +799,7 @@
  			SbxItem aSbxItem( SID_BASICIDE_ARG_SBX, rDocument, aLibName, aModName, BASICIDE_TYPE_MODULE );					
  			BasicIDEShell* pIDEShell = IDE_DLL()->GetShell();
  			SfxViewFrame* pViewFrame = pIDEShell ? pIDEShell->GetViewFrame() : NULL;
-@@ -1005,14 +1017,27 @@ SbModule* createModImpl( Window* pWin, c
+@@ -1005,14 +1020,27 @@ SbModule* createModImpl( Window* pWin, c
                  {
                      if ( !rBasicBox.IsExpanded( pLibEntry ) )
                          rBasicBox.Expand( pLibEntry );



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