[PATCH] Use OUString in basctl(basicide)

Christina Roßmanith (via_Code_Review) gerrit at gerrit.libreoffice.org
Thu Mar 28 15:02:22 PDT 2013


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/3116

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/16/3116/1

Use OUString in basctl(basicide)

Change-Id: I176088d3d33f02a1721e4027571a1f22dc6bd986
---
M basctl/source/basicide/baside2.cxx
M basctl/source/basicide/baside2.hxx
M basctl/source/basicide/baside2b.cxx
M basctl/source/basicide/baside3.cxx
4 files changed, 28 insertions(+), 28 deletions(-)



diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index f8690cc..8417943 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -516,7 +516,7 @@
                 bDone = true;
         }
         else
-            ErrorBox( this, WB_OK | WB_DEF_OK, String( IDEResId( RID_STR_COULDNTWRITE) ) ).Execute();
+            ErrorBox( this, WB_OK | WB_DEF_OK, IDEResId( RID_STR_COULDNTWRITE) ).Execute();
     }
 
     return bDone;
@@ -756,7 +756,7 @@
 
 
 
-void ModulWindow::EditMacro( const String& rMacroName )
+void ModulWindow::EditMacro( const OUString& rMacroName )
 {
     DBG_CHKTHIS( ModulWindow, 0 );
     DBG_ASSERT( XModule().Is(), "Kein Modul!" );
@@ -1337,17 +1337,17 @@
 EntryDescriptor ModulWindow::CreateEntryDescriptor()
 {
     ScriptDocument aDocument( GetDocument() );
-    String aLibName( GetLibName() );
+    OUString aLibName( GetLibName() );
     LibraryLocation eLocation = aDocument.getLibraryLocation( aLibName );
     OUString aModName( GetName() );
-    String aLibSubName;
+    OUString aLibSubName;
     if( xBasic.Is() && aDocument.isInVBAMode() && XModule().Is() )
     {
         switch( xModule->GetModuleType() )
         {
             case script::ModuleType::DOCUMENT:
             {
-                aLibSubName = String( IDEResId( RID_STR_DOCUMENT_OBJECTS ) );
+                aLibSubName = OUString( IDEResId( RID_STR_DOCUMENT_OBJECTS ) );
                 uno::Reference< container::XNameContainer > xLib = aDocument.getOrCreateLibrary( E_SCRIPTS, aLibName );
                 if( xLib.is() )
                 {
@@ -1361,13 +1361,13 @@
                 break;
             }
             case script::ModuleType::FORM:
-                aLibSubName = String( IDEResId( RID_STR_USERFORMS ) );
+                aLibSubName = OUString( IDEResId( RID_STR_USERFORMS ) );
                 break;
             case script::ModuleType::NORMAL:
-                aLibSubName = String( IDEResId( RID_STR_NORMAL_MODULES ) );
+                aLibSubName = OUString( IDEResId( RID_STR_NORMAL_MODULES ) );
                 break;
             case script::ModuleType::CLASS:
-                aLibSubName = String( IDEResId( RID_STR_CLASS_MODULES ) );
+                aLibSubName = OUString( IDEResId( RID_STR_CLASS_MODULES ) );
                 break;
         }
     }
@@ -1517,7 +1517,7 @@
     }
 }
 
-void ModulWindowLayout::BasicAddWatch (String const& rWatchStr)
+void ModulWindowLayout::BasicAddWatch (OUString const& rWatchStr)
 {
     aWatchWindow.AddWatch(rWatchStr);
 }
diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx
index 3d1b4a2..c02f502 100644
--- a/basctl/source/basicide/baside2.hxx
+++ b/basctl/source/basicide/baside2.hxx
@@ -122,7 +122,7 @@
     virtual void    RequestHelp( const HelpEvent& rHEvt );
 
     void            DoSyntaxHighlight( sal_uLong nPara );
-    String          GetWordAtCursor();
+    OUString        GetWordAtCursor();
     bool            ImpCanModify();
 
 public:
@@ -132,7 +132,7 @@
     ExtTextEngine*  GetEditEngine() const   { return pEditEngine.get(); }
     ExtTextView*    GetEditView() const     { return pEditView.get(); }
 
-    void            CreateProgress( const String& rText, sal_uLong nRange );
+    void            CreateProgress( const OUString& rText, sal_uLong nRange );
     void            DestroyProgress();
 
     void            ParagraphInsertedDeleted( sal_uLong nNewPara, bool bInserted );
@@ -188,13 +188,13 @@
 
 class WatchTreeListBox : public SvHeaderTabListBox
 {
-    String aEditingRes;
+    OUString aEditingRes;
 
 protected:
     virtual sal_Bool    EditingEntry( SvTreeListEntry* pEntry, Selection& rSel  );
     virtual sal_Bool    EditedEntry( SvTreeListEntry* pEntry, const OUString& rNewText );
 
-    bool            ImplBasicEntryEdited( SvTreeListEntry* pEntry, const String& rResult );
+    bool            ImplBasicEntryEdited( SvTreeListEntry* pEntry, const OUString& rResult );
     SbxBase*        ImplGetSBXForEntry( SvTreeListEntry* pEntry, bool& rbArrayElement );
 
 public:
@@ -213,7 +213,7 @@
 class WatchWindow : public DockingWindow
 {
 private:
-    String              aWatchStr;
+    OUString            aWatchStr;
     ExtendedEdit        aXEdit;
     ImageButton         aRemoveWatchButton;
     WatchTreeListBox    aTreeListBox;
@@ -233,7 +233,7 @@
                     WatchWindow (Layout* pParent);
                     ~WatchWindow();
 
-    void            AddWatch( const String& rVName );
+    void            AddWatch( const OUString& rVName );
     bool            RemoveSelectedWatch();
     void            UpdateWatches( bool bBasicStopped = false );
 
@@ -245,7 +245,7 @@
 {
 private:
     SvTreeListBox   aTreeListBox;
-    String          aStackStr;
+    OUString        aStackStr;
 
 protected:
     virtual void    Resize();
@@ -361,7 +361,7 @@
     bool            SaveBasicSource();
     bool            ImportDialog();
 
-    void            EditMacro( const String& rMacroName );
+    void            EditMacro( const OUString& rMacroName );
 
     bool            ToggleBreakPoint( sal_uLong nLine );
 
@@ -416,7 +416,7 @@
     virtual void GetState (SfxItemSet&, unsigned nWhich);
     virtual void UpdateDebug (bool bBasicStopped);
 public:
-    void BasicAddWatch (String const&);
+    void BasicAddWatch (OUString const&);
     void BasicRemoveWatch ();
     Color GetSyntaxColor (TokenTypes eType) const { return aSyntaxColors.GetColor(eType); }
 
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index bc683f6..7b7e3c7 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -266,7 +266,7 @@
     }
 }
 
-String EditorWindow::GetWordAtCursor()
+OUString EditorWindow::GetWordAtCursor()
 {
     String aWord;
 
@@ -944,7 +944,7 @@
     }
 }
 
-void EditorWindow::CreateProgress( const String& rText, sal_uLong nRange )
+void EditorWindow::CreateProgress( const OUString& rText, sal_uLong nRange )
 {
     DBG_ASSERT( !pProgress, "ProgressInfo existiert schon" );
     pProgress.reset(new ProgressInfo(
@@ -1359,7 +1359,7 @@
     return pRet;
 }
 
-void WatchWindow::AddWatch( const String& rVName )
+void WatchWindow::AddWatch( const OUString& rVName )
 {
     String aVar, aIndex;
     lcl_SeparateNameAndIndex( rVName, aVar, aIndex );
@@ -1928,7 +1928,7 @@
     return aResult != aEditingRes && ImplBasicEntryEdited(pEntry, aResult);
 }
 
-bool WatchTreeListBox::ImplBasicEntryEdited( SvTreeListEntry* pEntry, const String& rResult )
+bool WatchTreeListBox::ImplBasicEntryEdited( SvTreeListEntry* pEntry, const OUString& rResult )
 {
     bool bArrayElement;
     SbxBase* pSBX = ImplGetSBXForEntry( pEntry, bArrayElement );
diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx
index e2b588d..6cafb44 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -891,14 +891,14 @@
 {
 public:
     NameClashQueryBox( Window* pParent,
-        const XubString& rTitle, const XubString& rMessage );
+        const OUString& rTitle, const OUString& rMessage );
 };
 
 NameClashQueryBox::NameClashQueryBox( Window* pParent,
-    const XubString& rTitle, const XubString& rMessage )
+    const OUString& rTitle, const OUString& rMessage )
         : MessBox( pParent, 0, rTitle, rMessage )
 {
-    if ( rTitle.Len() )
+    if ( !rTitle.isEmpty() )
         SetText( rTitle );
 
     maMessText = rMessage;
@@ -916,14 +916,14 @@
 {
 public:
     LanguageMismatchQueryBox( Window* pParent,
-        const XubString& rTitle, const XubString& rMessage );
+        const OUString& rTitle, const OUString& rMessage );
 };
 
 LanguageMismatchQueryBox::LanguageMismatchQueryBox( Window* pParent,
-    const XubString& rTitle, const XubString& rMessage )
+    const OUString& rTitle, const OUString& rMessage )
         : MessBox( pParent, 0, rTitle, rMessage )
 {
-    if ( rTitle.Len() )
+    if ( !rTitle.isEmpty() )
         SetText( rTitle );
 
     maMessText = rMessage;

-- 
To view, visit https://gerrit.libreoffice.org/3116
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I176088d3d33f02a1721e4027571a1f22dc6bd986
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Christina Roßmanith <ChrRossmanith at web.de>



More information about the LibreOffice mailing list