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



Author: pflin
Date: Thu Oct  9 10:01:41 2008
New Revision: 14259
URL: http://svn.gnome.org/viewvc/ooo-build?rev=14259&view=rev

Log:
2008-10-09  Fong Lin  <pflin novell com>
	* patches/vba/vba-basic-macrochoose-dialog.diff: Change some strings
	  like "Document Objects"  into the resource.



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	Thu Oct  9 10:01:41 2008
@@ -1,6 +1,20 @@
-diff -urp basicide.bk/baside2.cxx basctl/source/basicide/baside2.cxx
---- basicide.bk/baside2.cxx	2008-09-22 11:33:04.000000000 +0800
-+++ basctl/source/basicide/baside2.cxx	2008-09-26 15:28:36.000000000 +0800
+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
+@@ -175,6 +175,10 @@
+ #define RID_STR_EXPORTPACKAGE			( RID_BASICIDE_START + 100 )
+ #define RID_STR_EXPORTBASIC				( RID_BASICIDE_START + 101 )
+ #define RID_STR_PACKAGE_BUNDLE			( RID_BASICIDE_START + 102 )
++#define RID_STR_DOCUMENT_OBJECTS        ( RID_BASICIDE_START + 110 )
++#define RID_STR_USERFORMS               ( RID_BASICIDE_START + 111 )
++#define RID_STR_NORMAL_MODULES          ( RID_BASICIDE_START + 112 )
++#define RID_STR_CLASS_MODULES           ( RID_BASICIDE_START + 113 )
+ 
+ #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
 @@ -49,6 +49,7 @@
  #include <com/sun/star/script/XLibraryContainer2.hpp>
  #endif
@@ -31,7 +45,7 @@
 +        {
 +            case script::ModuleType::Document:
 +            {
-+                aLibSubName = String::CreateFromAscii("Document Objects");
++                aLibSubName = String( IDEResId( RID_STR_DOCUMENT_OBJECTS ) );
 +                uno::Reference< container::XNameContainer > xLib = aDocument.getOrCreateLibrary( E_SCRIPTS, aLibName );
 +                if( xLib.is() )
 +                {
@@ -45,13 +59,13 @@
 +                break;
 +            }    
 +            case script::ModuleType::Form:
-+                aLibSubName = String::CreateFromAscii("Forms");
++                aLibSubName = String( IDEResId( RID_STR_USERFORMS ) );
 +                break;
 +            case script::ModuleType::Normal:
-+                aLibSubName = String::CreateFromAscii("Modules");
++                aLibSubName = String( IDEResId( RID_STR_NORMAL_MODULES ) );
 +                break;
 +            case script::ModuleType::Class:
-+                aLibSubName = String::CreateFromAscii("Class Modules");
++                aLibSubName = String( IDEResId( RID_STR_CLASS_MODULES ) );
 +                break;
 +        }
 +    }
@@ -59,9 +73,9 @@
  }
  
  void ModulWindow::SetReadOnly( BOOL b )
-diff -urp basicide.bk/baside3.cxx basctl/source/basicide/baside3.cxx
---- basicide.bk/baside3.cxx	2008-09-22 11:33:04.000000000 +0800
-+++ basctl/source/basicide/baside3.cxx	2008-09-25 13:50:37.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-09 15:50:15.000000000 +0800
++++ basctl/source/basicide/baside3.cxx	2008-10-09 15:58:15.000000000 +0800
 @@ -903,8 +903,9 @@ BasicEntryDescriptor DialogWindow::Creat
  {
      ScriptDocument aDocument( GetDocument() );
@@ -73,10 +87,36 @@
  }
  
  void DialogWindow::SetReadOnly( BOOL b )
-diff -urp basicide.bk/bastype2.cxx basctl/source/basicide/bastype2.cxx
---- basicide.bk/bastype2.cxx	2008-09-22 11:33:04.000000000 +0800
-+++ basctl/source/basicide/bastype2.cxx	2008-09-26 15:07:53.000000000 +0800
-@@ -53,10 +53,30 @@
+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
+@@ -639,6 +639,22 @@ String RID_STR_TRANSLATION_DEFAULT
+ {
+ 	Text [ en-US ] = "[Default Language]" ;
+ };
++String RID_STR_DOCUMENT_OBJECTS
++{
++    Text [ en-US ] = "Document Objects" ;
++};
++String RID_STR_USERFORMS
++{
++    Text [ en-US ] = "Forms" ;
++};
++String RID_STR_NORMAL_MODULES
++{
++    Text [ en-US ] = "Modules" ;
++};
++String RID_STR_CLASS_MODULES
++{
++    Text [ en-US ] = "Class Modules" ;
++};
+ 
+ #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
+@@ -53,10 +53,25 @@
  #include <com/sun/star/frame/XModuleManager.hpp>
  #include <comphelper/processfactory.hxx>
  #include <comphelper/componentcontext.hxx>
@@ -88,11 +128,6 @@
  using namespace ::com::sun::star::uno;
  using namespace ::com::sun::star;
  
-+static const rtl::OUString sDocumentObjects(  rtl::OUString::createFromAscii("Document Objects") );
-+static const rtl::OUString sForms(  rtl::OUString::createFromAscii("Forms") );
-+static const rtl::OUString sModules(  rtl::OUString::createFromAscii("Modules") );
-+static const rtl::OUString sClassModules(  rtl::OUString::createFromAscii("Class Modules") );
-+
 +void lcl_getObjectName( const uno::Reference< container::XNameContainer >& rLib, const String& rModName, String& rObjName );
 +
 +sal_Int32 lcl_getModuleType(  const uno::Reference< container::XNameContainer >& rLib, const String& rModName )
@@ -107,7 +142,7 @@
  
  BasicEntry::~BasicEntry()
  {
-@@ -91,20 +111,22 @@ BasicEntryDescriptor::BasicEntryDescript
+@@ -91,20 +106,22 @@ BasicEntryDescriptor::BasicEntryDescript
  {
  }
  
@@ -132,7 +167,7 @@
      ,m_aName( rName )
      ,m_aMethodName( rMethodName )
      ,m_eType( eType )
-@@ -120,6 +142,7 @@ BasicEntryDescriptor::BasicEntryDescript
+@@ -120,6 +137,7 @@ BasicEntryDescriptor::BasicEntryDescript
      :m_aDocument( rDesc.m_aDocument )
      ,m_eLocation( rDesc.m_eLocation )
      ,m_aLibName( rDesc.m_aLibName )
@@ -140,7 +175,7 @@
      ,m_aName( rDesc.m_aName )
      ,m_aMethodName( rDesc.m_aMethodName )
      ,m_eType( rDesc.m_eType )
-@@ -131,6 +154,7 @@ BasicEntryDescriptor& BasicEntryDescript
+@@ -131,6 +149,7 @@ BasicEntryDescriptor& BasicEntryDescript
      m_aDocument = rDesc.m_aDocument;
      m_eLocation = rDesc.m_eLocation;
      m_aLibName = rDesc.m_aLibName;
@@ -148,7 +183,7 @@
      m_aName = rDesc.m_aName;
      m_aMethodName = rDesc.m_aMethodName;
      m_eType = rDesc.m_eType;
-@@ -143,6 +167,7 @@ bool BasicEntryDescriptor::operator==( c
+@@ -143,6 +162,7 @@ bool BasicEntryDescriptor::operator==( c
      return m_aDocument == rDesc.m_aDocument &&
             m_eLocation == rDesc.m_eLocation &&
             m_aLibName == rDesc.m_aLibName &&
@@ -156,7 +191,7 @@
             m_aName == rDesc.m_aName &&
             m_aMethodName == rDesc.m_aMethodName &&
             m_eType == rDesc.m_eType;
-@@ -286,50 +311,58 @@ void BasicTreeListBox::ImpCreateLibSubEn
+@@ -286,50 +306,58 @@ void BasicTreeListBox::ImpCreateLibSubEn
          if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) && xModLibContainer->isLibraryLoaded( aOULibName ) )
          {
              try
@@ -257,17 +292,17 @@
          }   
      }
  
-@@ -368,6 +401,139 @@ void BasicTreeListBox::ImpCreateLibSubEn
+@@ -368,6 +396,139 @@ void BasicTreeListBox::ImpCreateLibSubEn
      }
  }
  
 +void BasicTreeListBox::ImpCreateLibSubEntriesInVBAMode( SvLBoxEntry* pLibRootEntry, const ScriptDocument& rDocument, const String& rLibName )
 +{
 +    ::std::map< BasicEntryType, ::rtl::OUString > aEntryMap;
-+    aEntryMap.insert( ::std::make_pair( OBJ_TYPE_DOCUMENT_OBJECTS, sDocumentObjects ) );
-+    aEntryMap.insert( ::std::make_pair( OBJ_TYPE_FORMS, sForms ) );
-+    aEntryMap.insert( ::std::make_pair( OBJ_TYPE_NORMAL_MODULES, sModules ) );
-+    aEntryMap.insert( ::std::make_pair( OBJ_TYPE_CLASS_MODULES, sClassModules ) );
++    aEntryMap.insert( ::std::make_pair( OBJ_TYPE_DOCUMENT_OBJECTS, String( IDEResId( RID_STR_DOCUMENT_OBJECTS ) ) ) );
++    aEntryMap.insert( ::std::make_pair( OBJ_TYPE_USERFORMS,  String( IDEResId( RID_STR_USERFORMS ) ) ) );
++    aEntryMap.insert( ::std::make_pair( OBJ_TYPE_NORMAL_MODULES, String( IDEResId( RID_STR_NORMAL_MODULES ) ) ) );
++    aEntryMap.insert( ::std::make_pair( OBJ_TYPE_CLASS_MODULES,  String( IDEResId( RID_STR_CLASS_MODULES ) ) ) );
 +
 +    ::std::map< BasicEntryType, ::rtl::OUString >::iterator iter;
 +    for( iter = aEntryMap.begin(); iter != aEntryMap.end(); ++iter )
@@ -319,7 +354,7 @@
 +                    eType = OBJ_TYPE_DOCUMENT_OBJECTS;
 +                    break;
 +                case script::ModuleType::Form:
-+                    eType = OBJ_TYPE_FORMS;
++                    eType = OBJ_TYPE_USERFORMS;
 +                    break;
 +                case script::ModuleType::Normal:
 +                    eType = OBJ_TYPE_NORMAL_MODULES;
@@ -397,7 +432,7 @@
  void BasicTreeListBox::onDocumentCreated( const ScriptDocument& /*_rDocument*/ )
  {
      UpdateEntries();
-@@ -480,10 +646,11 @@ long BasicTreeListBox::ExpandingHdl()
+@@ -480,10 +641,11 @@ long BasicTreeListBox::ExpandingHdl()
          if ( aDocument.isAlive() )
          {
              String aLibName( aDesc.GetLibName() );
@@ -410,7 +445,7 @@
  		    {
                  // check password, if library is password protected and not verified
                  ::rtl::OUString aOULibName( aLibName );
-@@ -636,7 +803,7 @@ void BasicTreeListBox::SetCurrentEntry(
+@@ -636,7 +798,7 @@ void BasicTreeListBox::SetCurrentEntry(
          aDesc = BasicEntryDescriptor(
              ScriptDocument::getApplicationScriptDocument(),
              LIBRARY_LOCATION_USER, String::CreateFromAscii( "Standard" ), 
@@ -419,7 +454,7 @@
      }
      ScriptDocument aDocument( aDesc.GetDocument() );
      OSL_ENSURE( aDocument.isValid(), "BasicTreeListBox::SetCurrentEntry: invalid document!" );
-@@ -653,14 +820,24 @@ void BasicTreeListBox::SetCurrentEntry(
+@@ -653,14 +815,24 @@ void BasicTreeListBox::SetCurrentEntry(
              if ( pLibEntry )
              {
                  pCurEntry = pLibEntry;
@@ -446,15 +481,15 @@
                      if ( pEntry )
                      {
                          pCurEntry = pEntry;
-diff -urp basicide.bk/bastype2.hxx basctl/source/basicide/bastype2.hxx
---- basicide.bk/bastype2.hxx	2008-09-22 11:33:04.000000000 +0800
-+++ basctl/source/basicide/bastype2.hxx	2008-09-26 11:06:12.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-09 15:50:15.000000000 +0800
++++ basctl/source/basicide/bastype2.hxx	2008-10-09 17:35:56.000000000 +0800
 @@ -42,7 +42,7 @@
  #include <sbxitem.hxx>
  #include "basobj.hxx"
  
 -enum BasicEntryType { OBJ_TYPE_UNKNOWN, OBJ_TYPE_DOCUMENT, OBJ_TYPE_LIBRARY, OBJ_TYPE_MODULE, OBJ_TYPE_DIALOG, OBJ_TYPE_METHOD };
-+enum BasicEntryType { OBJ_TYPE_UNKNOWN, OBJ_TYPE_DOCUMENT, OBJ_TYPE_LIBRARY, OBJ_TYPE_MODULE, OBJ_TYPE_DIALOG, OBJ_TYPE_METHOD, OBJ_TYPE_DOCUMENT_OBJECTS, OBJ_TYPE_FORMS, OBJ_TYPE_NORMAL_MODULES, OBJ_TYPE_CLASS_MODULES };
++enum BasicEntryType { OBJ_TYPE_UNKNOWN, OBJ_TYPE_DOCUMENT, OBJ_TYPE_LIBRARY, OBJ_TYPE_MODULE, OBJ_TYPE_DIALOG, OBJ_TYPE_METHOD, OBJ_TYPE_DOCUMENT_OBJECTS, OBJ_TYPE_USERFORMS, OBJ_TYPE_NORMAL_MODULES, OBJ_TYPE_CLASS_MODULES };
  
  #define BROWSEMODE_MODULES		0x01
  #define BROWSEMODE_SUBS			0x02
@@ -496,15 +531,15 @@
  
      // DocumentEventListener
      virtual void onDocumentCreated( const ScriptDocument& _rDocument );
-diff -urp basicide.bk/bastype3.cxx basctl/source/basicide/bastype3.cxx
---- basicide.bk/bastype3.cxx	2008-09-22 11:33:04.000000000 +0800
-+++ basctl/source/basicide/bastype3.cxx	2008-09-26 13:43: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-09 15:50:15.000000000 +0800
++++ basctl/source/basicide/bastype3.cxx	2008-10-09 17:36:19.000000000 +0800
 @@ -134,6 +134,14 @@ void __EXPORT BasicTreeListBox::Requesti
  		    }
          }
      }
 +    else if ( eType == OBJ_TYPE_DOCUMENT_OBJECTS 
-+            || eType == OBJ_TYPE_FORMS
++            || eType == OBJ_TYPE_USERFORMS
 +            || eType == OBJ_TYPE_NORMAL_MODULES
 +            || eType == OBJ_TYPE_CLASS_MODULES )
 +    {
@@ -540,7 +575,7 @@
  				break;
 +                case OBJ_TYPE_DOCUMENT_OBJECTS:
 +                    bDocumentObjects = true;
-+                case OBJ_TYPE_FORMS:
++                case OBJ_TYPE_USERFORMS:
 +                case OBJ_TYPE_NORMAL_MODULES:
 +                case OBJ_TYPE_CLASS_MODULES:
 +                {
@@ -570,7 +605,7 @@
  				}
  				break;
 +                case OBJ_TYPE_DOCUMENT_OBJECTS:
-+                case OBJ_TYPE_FORMS:
++                case OBJ_TYPE_USERFORMS:
 +                case OBJ_TYPE_NORMAL_MODULES:
 +                case OBJ_TYPE_CLASS_MODULES:
 +				{
@@ -595,7 +630,7 @@
          }
          break;
 +        case OBJ_TYPE_DOCUMENT_OBJECTS:
-+        case OBJ_TYPE_FORMS:
++        case OBJ_TYPE_USERFORMS:
 +        case OBJ_TYPE_NORMAL_MODULES:
 +        case OBJ_TYPE_CLASS_MODULES:
 +        {
@@ -605,16 +640,16 @@
  		default: ;
      }
  
-diff -urp basicide.bk/macrodlg.cxx basctl/source/basicide/macrodlg.cxx
---- basicide.bk/macrodlg.cxx	2008-09-22 11:33:04.000000000 +0800
-+++ basctl/source/basicide/macrodlg.cxx	2008-09-26 14:13:02.000000000 +0800
+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()
          SbModule* pModule = 0;
          String aModName( aDesc.GetName() );
          if ( aModName.Len() )
 +        {
 +            // extract the module name from the string like "Sheet1 (Example1)"
-+            if( aDesc.GetLibSubName().EqualsAscii("Document Objects") )
++            if( aDesc.GetLibSubName().Equals( String( IDEResId( RID_STR_DOCUMENT_OBJECTS ) ) ) )
 +                aModName = aModName.Copy( 0, aModName.SearchAscii(" ") );
  	        pModule = pBasic->FindModule( aModName );
 +        }    
@@ -626,14 +661,14 @@
          String aLib( aDesc.GetLibName() );
          String aMod( aDesc.GetName() );
 +        // extract the module name from the string like "Sheet1 (Example1)"
-+        if( aDesc.GetLibSubName().EqualsAscii("Document Objects") )
++        if( aDesc.GetLibSubName().Equals( String( IDEResId( RID_STR_DOCUMENT_OBJECTS ) ) ) )
 +            aMod = aMod.Copy( 0, aMod.SearchAscii(" ") );
          String aSub( aDesc.GetMethodName() );
  		SfxMacroInfoItem aInfoItem( SID_BASICIDE_ARG_MACROINFO, pBasMgr, aLib, aMod, aSub, String() );
  		if ( pButton == &aEditButton )
-diff -urp basicide.bk/moduldlg.cxx basctl/source/basicide/moduldlg.cxx
---- basicide.bk/moduldlg.cxx	2008-09-22 11:33:04.000000000 +0800
-+++ basctl/source/basicide/moduldlg.cxx	2008-09-26 14:54:30.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-09 15:50:15.000000000 +0800
++++ basctl/source/basicide/moduldlg.cxx	2008-10-09 17:27:04.000000000 +0800
 @@ -87,7 +87,7 @@ BOOL __EXPORT ExtBasicTreeListBox::Editi
      if ( pEntry )
      {
@@ -708,7 +743,7 @@
  
      // enable/disable delete button
 -	if ( nDepth == 2 && !bReadOnly && eLocation != LIBRARY_LOCATION_SHARE )
-+	if ( ( ( !bVBAEnabled && nDepth == 2 ) || ( bVBAEnabled && ( nDepth == 3 ) && !aLibSubName.EqualsAscii("Document Objects" ) ) )
++	if ( ( ( !bVBAEnabled && nDepth == 2 ) || ( bVBAEnabled && ( nDepth == 3 ) && !aLibSubName.Equals( String( IDEResId( RID_STR_DOCUMENT_OBJECTS ) ) ) ) )
 +        && !bReadOnly && eLocation != LIBRARY_LOCATION_SHARE )
  		aDelButton.Enable();
  	else
@@ -725,7 +760,7 @@
  			{
 +                String aModName( aDesc.GetName() );
 +                // extract the module name from the string like "Sheet1 (Example1)"
-+                if( aDesc.GetLibSubName().EqualsAscii("Document Objects") )
++                if( aDesc.GetLibSubName().Equals( String( IDEResId( RID_STR_DOCUMENT_OBJECTS ) ) ) )
 +                    aModName = aModName.Copy( 0, aModName.SearchAscii(" ") );
                  SbxItem aSbxItem( SID_BASICIDE_ARG_SBX, aDesc.GetDocument(), aDesc.GetLibName(), 
 -                                  aDesc.GetName(), aBasicBox.ConvertType( aDesc.GetType() ) );
@@ -763,7 +798,7 @@
 +                    if( pBasic && pBasic->isVBAEnabled() )
 +                    {
 +                        // add the new module in the "Modules" entry
-+                        SvLBoxEntry* pLibSubEntry = rBasicBox.FindEntry( pLibEntry, String::CreateFromAscii("Modules") , OBJ_TYPE_NORMAL_MODULES );
++                        SvLBoxEntry* pLibSubEntry = rBasicBox.FindEntry( pLibEntry, String( IDEResId( RID_STR_NORMAL_MODULES ) ) , OBJ_TYPE_NORMAL_MODULES );
 +                        if( pLibSubEntry )
 +                        {
 +                            if( !rBasicBox.IsExpanded( pLibSubEntry ) )



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