[Libreoffice-commits] .: 2 commits - basctl/source

August Sodora augsod at kemper.freedesktop.org
Mon Nov 21 21:21:16 PST 2011


 basctl/source/accessibility/accessibledialogwindow.cxx |    2 
 basctl/source/basicide/baside2.cxx                     |    4 
 basctl/source/basicide/basides2.cxx                    |    4 
 basctl/source/basicide/bastype2.cxx                    |   90 ++++++++---------
 basctl/source/basicide/bastype2.hxx                    |   48 ++++-----
 basctl/source/basicide/bastype3.cxx                    |    7 -
 basctl/source/basicide/macrodlg.cxx                    |    4 
 basctl/source/basicide/moduldlg.cxx                    |    2 
 basctl/source/dlged/dlged.cxx                          |    6 -
 basctl/source/inc/bastypes.hxx                         |    4 
 basctl/source/inc/dlged.hxx                            |    4 
 11 files changed, 87 insertions(+), 88 deletions(-)

New commits:
commit 8061b40349c1251362c984b76aaa90b9510fba4f
Author: August Sodora <augsod at gmail.com>
Date:   Tue Nov 22 00:20:15 2011 -0500

    String->OUString

diff --git a/basctl/source/accessibility/accessibledialogwindow.cxx b/basctl/source/accessibility/accessibledialogwindow.cxx
index 8b4228f..3584e6e 100644
--- a/basctl/source/accessibility/accessibledialogwindow.cxx
+++ b/basctl/source/accessibility/accessibledialogwindow.cxx
@@ -243,7 +243,7 @@ sal_Bool AccessibleDialogWindow::IsChildVisible( const ChildDescriptor& rDesc )
                 const SdrLayer* pSdrLayer = rLayerAdmin.GetLayerPerID( nLayerId );
                 if ( pSdrLayer )
                 {
-                    String aLayerName = pSdrLayer->GetName();
+                    ::rtl::OUString aLayerName = pSdrLayer->GetName();
                     SdrView* pSdrView = m_pDialogWindow->GetView();
                     if ( pSdrView && pSdrView->IsLayerVisible( aLayerName ) )
                     {
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index 101a8a8..8b57961 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -1350,9 +1350,9 @@ BasicEntryDescriptor ModulWindow::CreateEntryDescriptor()
                 uno::Reference< container::XNameContainer > xLib = aDocument.getOrCreateLibrary( E_SCRIPTS, aLibName );
                 if( xLib.is() )
                 {
-                    String sObjName;
+                    ::rtl::OUString sObjName;
                     ModuleInfoHelper::getObjectName( xLib, aModName, sObjName );
-                    if( sObjName.Len() )
+                    if( !sObjName.isEmpty() )
                     {
                         aModName.AppendAscii(" (").Append(sObjName).AppendAscii(")");
                     }
diff --git a/basctl/source/basicide/basides2.cxx b/basctl/source/basicide/basides2.cxx
index 7754d9a..81e325c 100644
--- a/basctl/source/basicide/basides2.cxx
+++ b/basctl/source/basicide/basides2.cxx
@@ -248,9 +248,9 @@ ModulWindow* BasicIDEShell::CreateBasWin( const ScriptDocument& rDocument, const
     {
         // display a nice friendly name in the ObjectModule tab,
         // combining the objectname and module name, e.g. Sheet1 ( Financials )
-        String sObjName;
+        ::rtl::OUString sObjName;
         ModuleInfoHelper::getObjectName( xLib, rModName, sObjName );
-        if( sObjName.Len() )
+        if( !sObjName.isEmpty() )
         {
             aModName.AppendAscii(" (").Append(sObjName).AppendAscii(")");
         }
diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx
index 9820cc1..531dbbf 100644
--- a/basctl/source/basicide/bastype2.cxx
+++ b/basctl/source/basicide/bastype2.cxx
@@ -61,7 +61,7 @@
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star;
 
-void ModuleInfoHelper::getObjectName( const uno::Reference< container::XNameContainer >& rLib, const String& rModName, String& rObjName )
+void ModuleInfoHelper::getObjectName( const uno::Reference< container::XNameContainer >& rLib, const ::rtl::OUString& rModName, ::rtl::OUString& rObjName )
 {
     try
     {
@@ -84,7 +84,7 @@ void ModuleInfoHelper::getObjectName( const uno::Reference< container::XNameCont
     }
 }
 
-sal_Int32 ModuleInfoHelper::getModuleType(  const uno::Reference< container::XNameContainer >& rLib, const String& rModName )
+sal_Int32 ModuleInfoHelper::getModuleType(  const uno::Reference< container::XNameContainer >& rLib, const ::rtl::OUString& rModName )
 {
     sal_Int32 nType = script::ModuleType::NORMAL;
     uno::Reference< script::vba::XVBAModuleInfo > xVBAModuleInfo( rLib, uno::UNO_QUERY );
@@ -112,7 +112,7 @@ BasicDocumentEntry::~BasicDocumentEntry()
 {
 }
 
-BasicLibEntry::BasicLibEntry( const ScriptDocument& rDocument, LibraryLocation eLocation, const String& rLibName, BasicEntryType eType )
+BasicLibEntry::BasicLibEntry( const ScriptDocument& rDocument, LibraryLocation eLocation, const ::rtl::OUString& rLibName, BasicEntryType eType )
     :BasicDocumentEntry( rDocument, eLocation, eType )
     ,m_aLibName( rLibName )
 {
@@ -129,7 +129,7 @@ BasicEntryDescriptor::BasicEntryDescriptor()
 {
 }
 
-BasicEntryDescriptor::BasicEntryDescriptor( const ScriptDocument& rDocument, LibraryLocation eLocation, const String& rLibName, const String& rLibSubName, const String& rName, BasicEntryType eType )
+BasicEntryDescriptor::BasicEntryDescriptor( const ScriptDocument& rDocument, LibraryLocation eLocation, const ::rtl::OUString& rLibName, const ::rtl::OUString& rLibSubName, const ::rtl::OUString& rName, BasicEntryType eType )
     :m_aDocument( rDocument )
     ,m_eLocation( eLocation )
     ,m_aLibName( rLibName )
@@ -140,7 +140,7 @@ BasicEntryDescriptor::BasicEntryDescriptor( const ScriptDocument& rDocument, Lib
     OSL_ENSURE( m_aDocument.isValid(), "BasicEntryDescriptor::BasicEntryDescriptor: invalid document!" );
 }
 
-BasicEntryDescriptor::BasicEntryDescriptor( const ScriptDocument& rDocument, LibraryLocation eLocation, const String& rLibName, const String& rLibSubName, const String& rName, const String& rMethodName, BasicEntryType eType )
+BasicEntryDescriptor::BasicEntryDescriptor( const ScriptDocument& rDocument, LibraryLocation eLocation, const ::rtl::OUString& rLibName, const ::rtl::OUString& rLibSubName, const ::rtl::OUString& rName, const ::rtl::OUString& rMethodName, BasicEntryType eType )
     :m_aDocument( rDocument )
     ,m_eLocation( eLocation )
     ,m_aLibName( rLibName )
@@ -232,7 +232,7 @@ void BasicTreeListBox::ScanEntry( const ScriptDocument& rDocument, LibraryLocati
         ImpCreateLibEntries( pDocumentRootEntry, rDocument, eLocation );
     if ( !pDocumentRootEntry )
     {
-        String aRootName( GetRootEntryName( rDocument, eLocation ) );
+        ::rtl::OUString aRootName( GetRootEntryName( rDocument, eLocation ) );
         Image aImage;
         GetRootEntryBitmaps( rDocument, aImage );
         SAL_WNODEPRECATED_DECLARATIONS_PUSH
@@ -256,7 +256,7 @@ void BasicTreeListBox::ImpCreateLibEntries( SvLBoxEntry* pDocumentRootEntry, con
 
     for ( sal_Int32 i = 0 ; i < nLibCount ; i++ )
     {
-        String aLibName = pLibNames[ i ];
+        ::rtl::OUString aLibName = pLibNames[ i ];
 
         if ( eLocation == rDocument.getLibraryLocation( aLibName ) )
         {
@@ -310,16 +310,14 @@ void BasicTreeListBox::ImpCreateLibEntries( SvLBoxEntry* pDocumentRootEntry, con
     }
 }
 
-void BasicTreeListBox::ImpCreateLibSubEntries( SvLBoxEntry* pLibRootEntry, const ScriptDocument& rDocument, const String& rLibName )
+void BasicTreeListBox::ImpCreateLibSubEntries( SvLBoxEntry* pLibRootEntry, const ScriptDocument& rDocument, const ::rtl::OUString& rLibName )
 {
-    ::rtl::OUString aOULibName( rLibName );
-
     // modules
     if ( nMode & BROWSEMODE_MODULES )
     {
         Reference< script::XLibraryContainer > xModLibContainer( rDocument.getLibraryContainer( E_SCRIPTS ) );
 
-        if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) && xModLibContainer->isLibraryLoaded( aOULibName ) )
+        if ( xModLibContainer.is() && xModLibContainer->hasByName( rLibName ) && xModLibContainer->isLibraryLoaded( rLibName ) )
         {
             try
             {
@@ -352,7 +350,7 @@ void BasicTreeListBox::ImpCreateLibSubEntries( SvLBoxEntry* pLibRootEntry, const
 
                             for ( sal_Int32 j = 0 ; j < nCount ; j++ )
                             {
-                                String aName = pNames[ j ];
+                                ::rtl::OUString aName = pNames[ j ];
                                 SvLBoxEntry* pEntry = FindEntry( pModuleEntry, aName, OBJ_TYPE_METHOD );
                                 if ( !pEntry )
                                     pEntry = AddEntry(
@@ -377,7 +375,7 @@ void BasicTreeListBox::ImpCreateLibSubEntries( SvLBoxEntry* pLibRootEntry, const
     {
          Reference< script::XLibraryContainer > xDlgLibContainer( rDocument.getLibraryContainer( E_DIALOGS ) );
 
-         if ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aOULibName ) && xDlgLibContainer->isLibraryLoaded( aOULibName ) )
+         if ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( rLibName ) && xDlgLibContainer->isLibraryLoaded( rLibName ) )
          {
             try
             {
@@ -388,7 +386,7 @@ void BasicTreeListBox::ImpCreateLibSubEntries( SvLBoxEntry* pLibRootEntry, const
 
                 for ( sal_Int32 i = 0 ; i < nDlgCount ; i++ )
                 {
-                    String aDlgName = pDlgNames[ i ];
+                    ::rtl::OUString aDlgName = pDlgNames[ i ];
                     SvLBoxEntry* pDialogEntry = FindEntry( pLibRootEntry, aDlgName, OBJ_TYPE_DIALOG );
                     if ( !pDialogEntry )
                         pDialogEntry = AddEntry(
@@ -406,7 +404,7 @@ void BasicTreeListBox::ImpCreateLibSubEntries( SvLBoxEntry* pLibRootEntry, const
     }
 }
 
-void BasicTreeListBox::ImpCreateLibSubEntriesInVBAMode( SvLBoxEntry* pLibRootEntry, const ScriptDocument& rDocument, const String& rLibName )
+void BasicTreeListBox::ImpCreateLibSubEntriesInVBAMode( SvLBoxEntry* pLibRootEntry, const ScriptDocument& rDocument, const ::rtl::OUString& rLibName )
 {
 
     ::std::vector< std::pair< BasicEntryType, ::rtl::OUString > > aEntries;
@@ -438,7 +436,7 @@ void BasicTreeListBox::ImpCreateLibSubEntriesInVBAMode( SvLBoxEntry* pLibRootEnt
     }
 }
 
-void BasicTreeListBox::ImpCreateLibSubSubEntriesInVBAMode( SvLBoxEntry* pLibSubRootEntry, const ScriptDocument& rDocument, const String& rLibName )
+void BasicTreeListBox::ImpCreateLibSubSubEntriesInVBAMode( SvLBoxEntry* pLibSubRootEntry, const ScriptDocument& rDocument, const ::rtl::OUString& rLibName )
 {
     uno::Reference< container::XNameContainer > xLib = rDocument.getOrCreateLibrary( E_SCRIPTS, rLibName );
     if( !xLib.is() )
@@ -456,7 +454,7 @@ void BasicTreeListBox::ImpCreateLibSubSubEntriesInVBAMode( SvLBoxEntry* pLibSubR
 
         for ( sal_Int32 i = 0 ; i < nModCount ; i++ )
         {
-            String aModName = pModNames[ i ];
+            ::rtl::OUString aModName = pModNames[ i ];
             BasicEntryType eType = OBJ_TYPE_UNKNOWN;
             switch( ModuleInfoHelper::getModuleType( xLib, aModName ) )
             {
@@ -478,16 +476,19 @@ void BasicTreeListBox::ImpCreateLibSubSubEntriesInVBAMode( SvLBoxEntry* pLibSubR
 
             // display a nice friendly name in the ObjectModule tab,
                // combining the objectname and module name, e.g. Sheet1 ( Financials )
-            String aEntryName( aModName );
+            ::rtl::OUStringBuffer aEntryNameBuf( aModName );
             if( eType == OBJ_TYPE_DOCUMENT_OBJECTS )
             {
-                   String sObjName;
+                ::rtl::OUString sObjName;
                 ModuleInfoHelper::getObjectName( xLib, aModName, sObjName );
-                if( sObjName.Len() )
-                   {
-                    aEntryName.AppendAscii(" (").Append(sObjName).AppendAscii(")");
+                if( !sObjName.isEmpty() )
+                {
+                    aEntryNameBuf.appendAscii(RTL_CONSTASCII_STRINGPARAM(" ("));
+                    aEntryNameBuf.append(sObjName);
+                    aEntryNameBuf.append(')');
                 }
             }
+            ::rtl::OUString aEntryName(aEntryNameBuf.makeStringAndClear());
             SvLBoxEntry* pModuleEntry = FindEntry( pLibSubRootEntry, aEntryName, OBJ_TYPE_MODULE );
             if ( !pModuleEntry )
                 pModuleEntry = AddEntry(
@@ -505,7 +506,7 @@ void BasicTreeListBox::ImpCreateLibSubSubEntriesInVBAMode( SvLBoxEntry* pLibSubR
 
                 for ( sal_Int32 j = 0 ; j < nCount ; j++ )
                 {
-                    String aName = pNames[ j ];
+                    ::rtl::OUString aName = pNames[ j ];
                     SvLBoxEntry* pEntry = FindEntry( pModuleEntry, aName, OBJ_TYPE_METHOD );
                     if ( !pEntry )
                         pEntry = AddEntry(
@@ -523,13 +524,13 @@ void BasicTreeListBox::ImpCreateLibSubSubEntriesInVBAMode( SvLBoxEntry* pLibSubR
     }
 }
 
-SvLBoxEntry* BasicTreeListBox::ImpFindEntry( SvLBoxEntry* pParent, const String& rText )
+SvLBoxEntry* BasicTreeListBox::ImpFindEntry( SvLBoxEntry* pParent, const ::rtl::OUString& rText )
 {
     sal_uLong nRootPos = 0;
     SvLBoxEntry* pEntry = pParent ? FirstChild( pParent ) : GetEntry( nRootPos );
     while ( pEntry )
     {
-        if (  GetEntryText( pEntry ) == rText )
+        if (  rText.equals(GetEntryText( pEntry )) )
             return pEntry;
 
         pEntry = pParent ? NextSibling( pEntry ) : GetEntry( ++nRootPos );
@@ -620,7 +621,7 @@ SvLBoxEntry* BasicTreeListBox::CloneEntry( SvLBoxEntry* pSource )
     return pNew;
 }
 
-SvLBoxEntry* BasicTreeListBox::FindEntry( SvLBoxEntry* pParent, const String& rText, BasicEntryType eType )
+SvLBoxEntry* BasicTreeListBox::FindEntry( SvLBoxEntry* pParent, const ::rtl::OUString& rText, BasicEntryType eType )
 {
     sal_uLong nRootPos = 0;
     SvLBoxEntry* pEntry = pParent ? FirstChild( pParent ) : GetEntry( nRootPos );
@@ -628,7 +629,7 @@ SvLBoxEntry* BasicTreeListBox::FindEntry( SvLBoxEntry* pParent, const String& rT
     {
         BasicEntry* pBasicEntry = (BasicEntry*)pEntry->GetUserData();
         DBG_ASSERT( pBasicEntry, "FindEntry: Kein BasicEntry ?!" );
-        if ( ( pBasicEntry->GetType() == eType  ) && ( GetEntryText( pEntry ) == rText ) )
+        if ( ( pBasicEntry->GetType() == eType  ) && ( rText.equals(GetEntryText( pEntry )) ) )
             return pEntry;
 
         pEntry = pParent ? NextSibling( pEntry ) : GetEntry( ++nRootPos );
@@ -648,20 +649,19 @@ long BasicTreeListBox::ExpandingHdl()
         OSL_ENSURE( aDocument.isAlive(), "BasicTreeListBox::ExpandingHdl: no document, or document is dead!" );
         if ( aDocument.isAlive() )
         {
-            String aLibName( aDesc.GetLibName() );
-            String aLibSubName( aDesc.GetLibSubName() );
-            String aName( aDesc.GetName() );
-            String aMethodName( aDesc.GetMethodName() );
+            ::rtl::OUString aLibName( aDesc.GetLibName() );
+            ::rtl::OUString aLibSubName( aDesc.GetLibSubName() );
+            ::rtl::OUString aName( aDesc.GetName() );
+            ::rtl::OUString aMethodName( aDesc.GetMethodName() );
 
-            if ( aLibName.Len() && !aLibSubName.Len() && !aName.Len() && !aMethodName.Len() )
+            if ( !aLibName.isEmpty() && aLibSubName.isEmpty() && aName.isEmpty() && aMethodName.isEmpty() )
             {
                 // check password, if library is password protected and not verified
-                ::rtl::OUString aOULibName( aLibName );
                 Reference< script::XLibraryContainer > xModLibContainer( aDocument.getLibraryContainer( E_SCRIPTS ) );
-                if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) )
+                if ( xModLibContainer.is() && xModLibContainer->hasByName( aLibName ) )
                 {
                     Reference< script::XLibraryContainerPassword > xPasswd( xModLibContainer, UNO_QUERY );
-                    if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aOULibName ) && !xPasswd->isLibraryPasswordVerified( aOULibName ) )
+                    if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aLibName ) && !xPasswd->isLibraryPasswordVerified( aLibName ) )
                     {
                         String aPassword;
                         bOK = QueryPassword( xModLibContainer, aLibName, aPassword );
@@ -700,7 +700,7 @@ sal_Bool BasicTreeListBox::IsEntryProtected( SvLBoxEntry* pEntry )
 
 SAL_WNODEPRECATED_DECLARATIONS_PUSH
 SvLBoxEntry* BasicTreeListBox::AddEntry(
-    const String& rText,
+                                        const ::rtl::OUString& rText,
     const Image& rImage,
     SvLBoxEntry* pParent,
     bool bChildrenOnDemand,
@@ -730,7 +730,7 @@ LibraryType BasicTreeListBox::GetLibraryType() const
     return eType;
 }
 
-String BasicTreeListBox::GetRootEntryName( const ScriptDocument& rDocument, LibraryLocation eLocation ) const
+::rtl::OUString BasicTreeListBox::GetRootEntryName( const ScriptDocument& rDocument, LibraryLocation eLocation ) const
 {
     return rDocument.getTitle( eLocation, GetLibraryType() );
 }
@@ -809,16 +809,16 @@ void BasicTreeListBox::SetCurrentEntry( BasicEntryDescriptor& rDesc )
     if ( pRootEntry )
     {
         pCurEntry = pRootEntry;
-        String aLibName( aDesc.GetLibName() );
-        if ( aLibName.Len() )
+        ::rtl::OUString aLibName( aDesc.GetLibName() );
+        if ( !aLibName.isEmpty() )
         {
             Expand( pRootEntry );
             SvLBoxEntry* pLibEntry = FindEntry( pRootEntry, aLibName, OBJ_TYPE_LIBRARY );
             if ( pLibEntry )
             {
                 pCurEntry = pLibEntry;
-                String aLibSubName( aDesc.GetLibSubName() );
-                if( aLibSubName.Len() )
+                ::rtl::OUString aLibSubName( aDesc.GetLibSubName() );
+                if( !aLibSubName.isEmpty() )
                 {
                     Expand( pLibEntry );
                     SvLBoxEntry* pLibSubEntry = ImpFindEntry( pLibEntry, aLibSubName );
@@ -827,8 +827,8 @@ void BasicTreeListBox::SetCurrentEntry( BasicEntryDescriptor& rDesc )
                         pCurEntry = pLibSubEntry;
                     }
                 }
-                String aName( aDesc.GetName() );
-                if ( aName.Len() )
+                ::rtl::OUString aName( aDesc.GetName() );
+                if ( !aName.isEmpty() )
                 {
                     Expand( pCurEntry );
                     BasicEntryType eType = OBJ_TYPE_MODULE;
@@ -838,8 +838,8 @@ void BasicTreeListBox::SetCurrentEntry( BasicEntryDescriptor& rDesc )
                     if ( pEntry )
                     {
                         pCurEntry = pEntry;
-                        String aMethodName( aDesc.GetMethodName() );
-                        if ( aMethodName.Len() )
+                        ::rtl::OUString aMethodName( aDesc.GetMethodName() );
+                        if ( !aMethodName.isEmpty() )
                         {
                             Expand( pEntry );
                             SvLBoxEntry* pSubEntry = FindEntry( pEntry, aMethodName, OBJ_TYPE_METHOD );
diff --git a/basctl/source/basicide/bastype2.hxx b/basctl/source/basicide/bastype2.hxx
index a23b99a..fa5deaf 100644
--- a/basctl/source/basicide/bastype2.hxx
+++ b/basctl/source/basicide/bastype2.hxx
@@ -85,29 +85,29 @@ public:
 class BasicLibEntry : public BasicDocumentEntry
 {
 private:
-    String          m_aLibName;
+    ::rtl::OUString m_aLibName;
 
 public:
-                    BasicLibEntry( const ScriptDocument& rDocument, LibraryLocation eLocation, const String& rLibName, BasicEntryType eType = OBJ_TYPE_LIBRARY );
+    BasicLibEntry( const ScriptDocument& rDocument, LibraryLocation eLocation, const ::rtl::OUString& rLibName, BasicEntryType eType = OBJ_TYPE_LIBRARY );
     virtual         ~BasicLibEntry();
 
-    const String&   GetLibName() const { return m_aLibName; }
+    const ::rtl::OUString&   GetLibName() const { return m_aLibName; }
 };
 
 class BasicEntryDescriptor
 {
     ScriptDocument          m_aDocument;
     LibraryLocation         m_eLocation;
-    String                  m_aLibName;
-    String                  m_aLibSubName;  // for vba entry:  Document Objects, Class Modules, Forms and Normal Modules
-    String                  m_aName;
-    String                  m_aMethodName;
+    ::rtl::OUString         m_aLibName;
+    ::rtl::OUString         m_aLibSubName;  // for vba entry:  Document Objects, Class Modules, Forms and Normal Modules
+    ::rtl::OUString         m_aName;
+    ::rtl::OUString         m_aMethodName;
     BasicEntryType          m_eType;
 
 public:
                             BasicEntryDescriptor();
-                            BasicEntryDescriptor( const ScriptDocument& rDocument, LibraryLocation eLocation, const String& rLibName, const String& rLibSubName, const String& rName, BasicEntryType eType );
-                            BasicEntryDescriptor( const ScriptDocument& rDocument, LibraryLocation eLocation, const String& rLibName, const String& rLibSubName, const String& rName, const String& rMethodName, BasicEntryType eType );
+    BasicEntryDescriptor( const ScriptDocument& rDocument, LibraryLocation eLocation, const ::rtl::OUString& rLibName, const ::rtl::OUString& rLibSubName, const ::rtl::OUString& rName, BasicEntryType eType );
+    BasicEntryDescriptor( const ScriptDocument& rDocument, LibraryLocation eLocation, const ::rtl::OUString& rLibName, const ::rtl::OUString& rLibSubName, const ::rtl::OUString& rName, const ::rtl::OUString& rMethodName, BasicEntryType eType );
     virtual                 ~BasicEntryDescriptor();
 
                             BasicEntryDescriptor( const BasicEntryDescriptor& rDesc );
@@ -121,17 +121,17 @@ public:
     LibraryLocation         GetLocation() const { return m_eLocation; }
     void                    SetLocation( LibraryLocation eLocation ) { m_eLocation = eLocation; }
 
-    const String&           GetLibName() const { return m_aLibName; }
-    void                    SetLibName( const String& aLibName ) { m_aLibName = aLibName; }
+    const ::rtl::OUString&  GetLibName() const { return m_aLibName; }
+    void                    SetLibName( const ::rtl::OUString& aLibName ) { m_aLibName = aLibName; }
 
-    const String&           GetLibSubName() const { return m_aLibSubName; }
-    void                    SetLibSubName( const String& aLibSubName ) { m_aLibSubName = aLibSubName; }
+    const ::rtl::OUString&  GetLibSubName() const { return m_aLibSubName; }
+    void                    SetLibSubName( const ::rtl::OUString& aLibSubName ) { m_aLibSubName = aLibSubName; }
 
-    const String&           GetName() const { return m_aName; }
-    void                    SetName( const String& aName ) { m_aName = aName; }
+    const ::rtl::OUString&  GetName() const { return m_aName; }
+    void                    SetName( const ::rtl::OUString& aName ) { m_aName = aName; }
 
-    const String&           GetMethodName() const { return m_aMethodName; }
-    void                    SetMethodName( const String& aMethodName ) { m_aMethodName = aMethodName; }
+    const ::rtl::OUString&           GetMethodName() const { return m_aMethodName; }
+    void                    SetMethodName( const ::rtl::OUString& aMethodName ) { m_aMethodName = aMethodName; }
 
     BasicEntryType          GetType() const { return m_eType; }
     void                    SetType( BasicEntryType eType ) { m_eType = eType; }
@@ -165,10 +165,10 @@ protected:
     virtual long            ExpandingHdl();
 
     void                    ImpCreateLibEntries( SvLBoxEntry* pShellRootEntry, const ScriptDocument& rDocument, LibraryLocation eLocation );
-    void                    ImpCreateLibSubEntries( SvLBoxEntry* pLibRootEntry, const ScriptDocument& rDocument, const String& rLibName );
-    void                    ImpCreateLibSubEntriesInVBAMode( SvLBoxEntry* pLibRootEntry, const ScriptDocument& rDocument, const String& rLibName );
-    void                    ImpCreateLibSubSubEntriesInVBAMode( SvLBoxEntry* pLibSubRootEntry, const ScriptDocument& rDocument, const String& rLibName );
-    SvLBoxEntry*            ImpFindEntry( SvLBoxEntry* pParent, const String& rText );
+    void                    ImpCreateLibSubEntries( SvLBoxEntry* pLibRootEntry, const ScriptDocument& rDocument, const ::rtl::OUString& rLibName );
+    void                    ImpCreateLibSubEntriesInVBAMode( SvLBoxEntry* pLibRootEntry, const ScriptDocument& rDocument, const ::rtl::OUString& rLibName );
+    void                    ImpCreateLibSubSubEntriesInVBAMode( SvLBoxEntry* pLibSubRootEntry, const ScriptDocument& rDocument, const ::rtl::OUString& rLibName );
+    SvLBoxEntry*            ImpFindEntry( SvLBoxEntry* pParent, const ::rtl::OUString& rText );
 
     // DocumentEventListener
     virtual void onDocumentCreated( const ScriptDocument& _rDocument );
@@ -197,18 +197,18 @@ public:
     SbModule*       FindModule( SvLBoxEntry* pEntry );
     SbxVariable*    FindVariable( SvLBoxEntry* pEntry );
     SvLBoxEntry*    FindRootEntry( const ScriptDocument& rDocument, LibraryLocation eLocation );
-    SvLBoxEntry*    FindEntry( SvLBoxEntry* pParent, const String& rText, BasicEntryType eType );
+    SvLBoxEntry*    FindEntry( SvLBoxEntry* pParent, const ::rtl::OUString& rText, BasicEntryType eType );
 
     BasicEntryDescriptor    GetEntryDescriptor( SvLBoxEntry* pEntry );
 
     sal_uInt16          ConvertType( BasicEntryType eType );
     bool            IsValidEntry( SvLBoxEntry* pEntry );
 
-    SvLBoxEntry*    AddEntry( const String& rText, const Image& rImage,
+    SvLBoxEntry*    AddEntry( const ::rtl::OUString& rText, const Image& rImage,
                               SvLBoxEntry* pParent, bool bChildrenOnDemand,
                               std::auto_ptr< BasicEntry > aUserData );
 
-    String          GetRootEntryName( const ScriptDocument& rDocument, LibraryLocation eLocation ) const;
+    ::rtl::OUString GetRootEntryName( const ScriptDocument& rDocument, LibraryLocation eLocation ) const;
     void            GetRootEntryBitmaps( const ScriptDocument& rDocument, Image& rImage );
 
     void            SetCurrentEntry( BasicEntryDescriptor& rDesc );
diff --git a/basctl/source/basicide/bastype3.cxx b/basctl/source/basicide/bastype3.cxx
index 267ff94..bbd45bd 100644
--- a/basctl/source/basicide/bastype3.cxx
+++ b/basctl/source/basicide/bastype3.cxx
@@ -430,10 +430,9 @@ bool BasicTreeListBox::IsValidEntry( SvLBoxEntry* pEntry )
     {
         case OBJ_TYPE_DOCUMENT:
         {
-            bIsValid =  aDocument.isAlive()
-                    &&  (   aDocument.isApplication()
-                        ||  GetRootEntryName( aDocument, eLocation ) == GetEntryText( pEntry )
-                        );
+            bIsValid = aDocument.isAlive()
+                && (aDocument.isApplication()
+                    || GetRootEntryName(aDocument, eLocation).equals(GetEntryText(pEntry)));
         }
         break;
         case OBJ_TYPE_LIBRARY:
diff --git a/basctl/source/basicide/macrodlg.cxx b/basctl/source/basicide/macrodlg.cxx
index 85a6367..48cba0d 100644
--- a/basctl/source/basicide/macrodlg.cxx
+++ b/basctl/source/basicide/macrodlg.cxx
@@ -383,7 +383,7 @@ SbMethod* MacroChooser::CreateMacro()
         if ( aModName.Len() )
         {
             // extract the module name from the string like "Sheet1 (Example1)"
-            if( aDesc.GetLibSubName().Equals( String( IDEResId( RID_STR_DOCUMENT_OBJECTS ) ) ) )
+            if( aDesc.GetLibSubName() == ResId::toString( IDEResId( RID_STR_DOCUMENT_OBJECTS ) ) )
             {
                 sal_uInt16 nIndex = 0;
                 aModName = aModName.GetToken( 0, ' ', nIndex );
@@ -706,7 +706,7 @@ IMPL_LINK( MacroChooser, ButtonHdl, Button *, pButton )
         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 ) ) ) )
+        if( aDesc.GetLibSubName() == ResId::toString( IDEResId( RID_STR_DOCUMENT_OBJECTS ) ) )
         {
             sal_uInt16 nIndex = 0;
             aMod = aMod.GetToken( 0, ' ', nIndex );
diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx
index 876e971..79a33d8 100644
--- a/basctl/source/basicide/moduldlg.cxx
+++ b/basctl/source/basicide/moduldlg.cxx
@@ -705,7 +705,7 @@ IMPL_LINK( ObjectPage, ButtonHdl, Button *, pButton )
             {
                 String aModName( aDesc.GetName() );
                 // extract the module name from the string like "Sheet1 (Example1)"
-                if( aDesc.GetLibSubName().Equals( String( IDEResId( RID_STR_DOCUMENT_OBJECTS ) ) ) )
+                if( aDesc.GetLibSubName() == ResId::toString( IDEResId( RID_STR_DOCUMENT_OBJECTS ) ) )
                 {
                     sal_uInt16 nIndex = 0;
                     aModName = aModName.GetToken( 0, ' ', nIndex );
diff --git a/basctl/source/inc/bastypes.hxx b/basctl/source/inc/bastypes.hxx
index 85fd60a..25b276a 100644
--- a/basctl/source/inc/bastypes.hxx
+++ b/basctl/source/inc/bastypes.hxx
@@ -342,8 +342,8 @@ ModuleInfoHelper();
 ModuleInfoHelper(const ModuleInfoHelper&);
 ModuleInfoHelper& operator = (const ModuleInfoHelper&);
 public:
-    static void getObjectName( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& rLib, const String& rModName, String& rObjName );
-    static sal_Int32 getModuleType(  const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& rLib, const String& rModName );
+    static void getObjectName( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& rLib, const ::rtl::OUString& rModName, ::rtl::OUString& rObjName );
+    static sal_Int32 getModuleType(  const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& rLib, const ::rtl::OUString& rModName );
 };
 #endif  // _BASTYPES_HXX
 
commit ea0b60c82e35c4289d2a36198c3d053aabade9c3
Author: August Sodora <augsod at gmail.com>
Date:   Tue Nov 22 00:00:33 2011 -0500

    String->OUString

diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index 0a31d4b..45a907b 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -1186,7 +1186,7 @@ void DlgEditor::ClearModifyFlag()
 #define BORDERPRN       300
 
 
-void lcl_PrintHeader( Printer* pPrinter, const String& rTitle ) // not working yet
+void lcl_PrintHeader( Printer* pPrinter, const ::rtl::OUString& rTitle ) // not working yet
 {
     pPrinter->Push();
 
@@ -1231,14 +1231,14 @@ sal_Int32 DlgEditor::countPages( Printer* )
     return 1;
 }
 
-void DlgEditor::printPage( sal_Int32 nPage, Printer* pPrinter, const String& rTitle )
+void DlgEditor::printPage( sal_Int32 nPage, Printer* pPrinter, const ::rtl::OUString& rTitle )
 {
     if( nPage == 0 )
         Print( pPrinter, rTitle );
 }
 
 
-void DlgEditor::Print( Printer* pPrinter, const String& rTitle )    // not working yet
+void DlgEditor::Print( Printer* pPrinter, const ::rtl::OUString& rTitle )    // not working yet
 {
     if( pDlgEdView )
     {
diff --git a/basctl/source/inc/dlged.hxx b/basctl/source/inc/dlged.hxx
index fb06a9f..1d7b1f9 100644
--- a/basctl/source/inc/dlged.hxx
+++ b/basctl/source/inc/dlged.hxx
@@ -99,7 +99,7 @@ private:
     DECL_LINK( PaintTimeout, Timer * );
     DECL_LINK( MarkTimeout, Timer * );
 
-    void Print( Printer* pPrinter, const String& rTitle );
+    void Print( Printer* pPrinter, const ::rtl::OUString& rTitle );
 
 protected:
     ScrollBar*          pHScroll;
@@ -201,7 +201,7 @@ public:
     void            UpdatePropertyBrowserDelayed();
 
     sal_Int32       countPages( Printer* pPrinter );
-    void            printPage( sal_Int32 nPage, Printer* pPrinter, const String& );
+    void            printPage( sal_Int32 nPage, Printer* pPrinter, const ::rtl::OUString& );
 
     bool            AdjustPageSize();
 


More information about the Libreoffice-commits mailing list