[Libreoffice-commits] core.git: cui/source desktop/source
Gökhan Gurbetoğlu
gokhan.gurbetoglu at pardus.org.tr
Wed Aug 24 06:55:29 UTC 2016
cui/source/options/personalization.cxx | 9 ++++-----
desktop/source/migration/migration.cxx | 11 ++++++-----
desktop/source/migration/services/basicmigration.cxx | 7 ++++---
desktop/source/migration/services/wordbookmigration.cxx | 7 ++++---
4 files changed, 18 insertions(+), 16 deletions(-)
New commits:
commit c899cc46fc6522b7fd7c243bf7a67dfbe2e1e586
Author: Gökhan Gurbetoğlu <gokhan.gurbetoglu at pardus.org.tr>
Date: Tue Aug 23 10:23:19 2016 +0300
tdf#100726 - Improve readability of OUString concatanations
Change-Id: I59c605bb31859a2a419cc9e9e60c174e842a03db
Reviewed-on: https://gerrit.libreoffice.org/28349
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
Tested-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/cui/source/options/personalization.cxx b/cui/source/options/personalization.cxx
index 17ae2d7..7752256 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -214,8 +214,7 @@ IMPL_LINK_TYPED( SelectPersonaDialog, SelectPersona, Button*, pButton, void )
// get the persona name from the setting variable to show in the progress.
sal_Int32 nNameIndex = m_aSelectedPersona.indexOf( ';' );
OUString aName = m_aSelectedPersona.copy( 0, nNameIndex );
- OUString aProgress( CUI_RES( RID_SVXSTR_SELECTEDPERSONA ) );
- aProgress += aName;
+ OUString aProgress = CUI_RESSTR( RID_SVXSTR_SELECTEDPERSONA ) + aName;
SetProgress( aProgress );
}
break;
@@ -417,9 +416,9 @@ void SvxPersonalizationTabPage::LoadDefaultImages()
{
// Load the pre saved personas
- OUString gallery( "" );
- gallery = "$BRAND_BASE_DIR/" LIBO_SHARE_FOLDER;
- gallery += "/gallery/personas/";
+ OUString gallery = "$BRAND_BASE_DIR/"
+ + OUString(LIBO_SHARE_FOLDER)
+ + "/gallery/personas/";
rtl::Bootstrap::expandMacros( gallery );
OUString aPersonasList = gallery + "personas_list.txt";
SvFileStream aStream( aPersonasList, StreamMode::READ );
diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx
index fb9b08d..db40b4d 100644
--- a/desktop/source/migration/migration.cxx
+++ b/desktop/source/migration/migration.cxx
@@ -207,8 +207,8 @@ void Migration::migrateSettingsIfNecessary()
try {
bResult = aImpl.doMigration();
} catch (const Exception& e) {
- OString aMsg("doMigration() exception: ");
- aMsg += OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US);
+ OString aMsg = "doMigration() exception: "
+ + OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US);
OSL_FAIL(aMsg.getStr());
}
OSL_ENSURE(bResult, "Migration has not been successful");
@@ -850,9 +850,10 @@ void MigrationImpl::copyFiles()
_checkAndCreateDirectory(aURL);
FileBase::RC copyResult = File::copy(*i_file, destName);
if (copyResult != FileBase::E_None) {
- OString msg("Cannot copy ");
- msg += OUStringToOString(*i_file, RTL_TEXTENCODING_UTF8) + " to "
- + OUStringToOString(destName, RTL_TEXTENCODING_UTF8);
+ OString msg = "Cannot copy "
+ + OUStringToOString(*i_file, RTL_TEXTENCODING_UTF8)
+ + " to "
+ + OUStringToOString(destName, RTL_TEXTENCODING_UTF8);
OSL_FAIL(msg.getStr());
}
++i_file;
diff --git a/desktop/source/migration/services/basicmigration.cxx b/desktop/source/migration/services/basicmigration.cxx
index ed45409..fb7c7af 100644
--- a/desktop/source/migration/services/basicmigration.cxx
+++ b/desktop/source/migration/services/basicmigration.cxx
@@ -132,9 +132,10 @@ namespace migration
::osl::FileBase::RC aResult = ::osl::File::copy( *aI, sTargetName );
if ( aResult != ::osl::FileBase::E_None )
{
- OString aMsg( "BasicMigration::copyFiles: cannot copy " );
- aMsg += OUStringToOString( *aI, RTL_TEXTENCODING_UTF8 ) + " to "
- + OUStringToOString( sTargetName, RTL_TEXTENCODING_UTF8 );
+ OString aMsg = "BasicMigration::copyFiles: cannot copy "
+ + OUStringToOString( *aI, RTL_TEXTENCODING_UTF8 )
+ + " to "
+ + OUStringToOString( sTargetName, RTL_TEXTENCODING_UTF8 );
OSL_FAIL( aMsg.getStr() );
}
++aI;
diff --git a/desktop/source/migration/services/wordbookmigration.cxx b/desktop/source/migration/services/wordbookmigration.cxx
index 77b2ee6..429039b 100644
--- a/desktop/source/migration/services/wordbookmigration.cxx
+++ b/desktop/source/migration/services/wordbookmigration.cxx
@@ -171,9 +171,10 @@ bool IsUserWordbook( const OUString& rFile )
::osl::FileBase::RC aResult = ::osl::File::copy( *aI, sTargetName );
if ( aResult != ::osl::FileBase::E_None )
{
- OString aMsg( "WordbookMigration::copyFiles: cannot copy " );
- aMsg += OUStringToOString( *aI, RTL_TEXTENCODING_UTF8 ) + " to "
- + OUStringToOString( sTargetName, RTL_TEXTENCODING_UTF8 );
+ OString aMsg = "WordbookMigration::copyFiles: cannot copy "
+ + OUStringToOString( *aI, RTL_TEXTENCODING_UTF8 )
+ + " to "
+ + OUStringToOString( sTargetName, RTL_TEXTENCODING_UTF8 );
OSL_FAIL( aMsg.getStr() );
}
}
More information about the Libreoffice-commits
mailing list