[Libreoffice-commits] core.git: basctl/source

nadith nadmalinda at gmail.com
Fri Jul 15 08:39:25 UTC 2016


 basctl/source/basicide/baside2b.cxx |    6 ++----
 basctl/source/basicide/moduldl2.cxx |    8 ++------
 2 files changed, 4 insertions(+), 10 deletions(-)

New commits:
commit e7d709cb2487dc67179812afa5c36d111d9400be
Author: nadith <nadmalinda at gmail.com>
Date:   Thu Jul 14 23:54:26 2016 +0530

    tdf#100726: Improve readability of OUString concatenations in basctl module
    
    Change-Id: Iad8e3a2b74062640660c0ea8121dc6a5d043c080
    Reviewed-on: https://gerrit.libreoffice.org/27228
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index b33e9bd..04cb258 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -366,8 +366,7 @@ void EditorWindow::RequestHelp( const HelpEvent& rHEvt )
                             aHelpText = pVar->GetName();
                             if ( aHelpText.isEmpty() )     // name is not copied with the passed parameters
                                 aHelpText = aWord;
-                            aHelpText += "=";
-                            aHelpText += pVar->GetOUString();
+                            aHelpText   += "=" + pVar->GetOUString();
                         }
                     }
                     if ( !aHelpText.isEmpty() )
@@ -1737,8 +1736,7 @@ void WatchWindow::AddWatch( const OUString& rVName )
     lcl_SeparateNameAndIndex( rVName, aVar, aIndex );
     WatchItem* pWatchItem = new WatchItem(aVar);
 
-    OUString aWatchStr_( aVar );
-    aWatchStr_ += "\t\t";
+    OUString aWatchStr_ = aVar + "\t\t";
     SvTreeListEntry* pNewEntry = aTreeListBox->InsertEntry( aWatchStr_, nullptr, true );
     pNewEntry->SetUserData( pWatchItem );
 
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index 1e22ab0..de29b82 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -893,9 +893,7 @@ void LibPage::InsertLib()
                                          ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aLibName ) && xDlgLibContainer->isLibraryReadOnly( aLibName ) && !xDlgLibContainer->isLibraryLink( aLibName ) ) )
                                     {
                                         OUString aErrStr( IDE_RESSTR(RID_STR_REPLACELIB) );
-                                        aErrStr = aErrStr.replaceAll("XX", aLibName);
-                                        aErrStr += "\n";
-                                        aErrStr += IDE_RESSTR(RID_STR_LIBISREADONLY);
+                                        aErrStr = aErrStr.replaceAll("XX", aLibName) + "\n" + IDE_RESSTR(RID_STR_LIBISREADONLY);
                                         ScopedVclPtrInstance<MessageDialog>::Create(this, aErrStr)->Execute();
                                         continue;
                                     }
@@ -910,9 +908,7 @@ void LibPage::InsertLib()
                                         aErrStr = IDE_RESSTR(RID_STR_REFNOTPOSSIBLE);
                                     else
                                         aErrStr = IDE_RESSTR(RID_STR_IMPORTNOTPOSSIBLE);
-                                    aErrStr = aErrStr.replaceAll("XX", aLibName);
-                                    aErrStr += "\n" ;
-                                    aErrStr += IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED);
+                                    aErrStr = aErrStr.replaceAll("XX", aLibName) + "\n" +IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED);
                                     ScopedVclPtrInstance<MessageDialog>::Create(this, aErrStr)->Execute();
                                     continue;
                                 }


More information about the Libreoffice-commits mailing list