summaryrefslogtreecommitdiffstats
path: root/desktop/source/migration
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-05-26 10:58:42 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-05-28 19:44:08 +0200
commitef513fd4b049b214a03fbe6e62a5ea43680a7a9b (patch)
tree82f2ce93bc8e5fde6dce8685b633c3d643c9f069 /desktop/source/migration
parentrdm#2247 enable Upper Sorbian for languagepack/UI (diff)
downloadcore-ef513fd4b049b214a03fbe6e62a5ea43680a7a9b.tar.gz
core-ef513fd4b049b214a03fbe6e62a5ea43680a7a9b.zip
remove unnecessary use of OString::getStr
Change-Id: I0490efedf459190521f4339854b3394d57765fdb Reviewed-on: https://gerrit.libreoffice.org/38058 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'desktop/source/migration')
-rw-r--r--desktop/source/migration/migration.cxx24
-rw-r--r--desktop/source/migration/services/basicmigration.cxx7
-rw-r--r--desktop/source/migration/services/wordbookmigration.cxx7
3 files changed, 11 insertions, 27 deletions
diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx
index be141b68210c..bc4df65f6cfa 100644
--- a/desktop/source/migration/migration.cxx
+++ b/desktop/source/migration/migration.cxx
@@ -207,9 +207,7 @@ void Migration::migrateSettingsIfNecessary()
try {
bResult = aImpl.doMigration();
} catch (const Exception& e) {
- OString aMsg = "doMigration() exception: "
- + OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US);
- OSL_FAIL(aMsg.getStr());
+ SAL_WARN( "desktop", "doMigration() exception: " << e.Message);
}
OSL_ENSURE(bResult, "Migration has not been successful");
(void)bResult;
@@ -844,11 +842,7 @@ void MigrationImpl::copyFiles()
_checkAndCreateDirectory(aURL);
FileBase::RC copyResult = File::copy(*i_file, destName);
if (copyResult != FileBase::E_None) {
- OString msg = "Cannot copy "
- + OUStringToOString(*i_file, RTL_TEXTENCODING_UTF8)
- + " to "
- + OUStringToOString(destName, RTL_TEXTENCODING_UTF8);
- OSL_FAIL(msg.getStr());
+ SAL_WARN( "desktop", "Cannot copy " << *i_file << " to " << destName);
}
++i_file;
}
@@ -894,16 +888,12 @@ void MigrationImpl::runServices()
} catch (const Exception& e) {
- OString aMsg = "Execution of migration service failed (Exception caught).\nService: "
- + OUStringToOString(i_mig->service, RTL_TEXTENCODING_ASCII_US)
- + "\nMessage: "
- + OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US);
- OSL_FAIL(aMsg.getStr());
+ SAL_WARN( "desktop", "Execution of migration service failed (Exception caught).\nService: "
+ << i_mig->service
+ << "\nMessage: " << e.Message);
} catch (...) {
- OString aMsg = "Execution of migration service failed (Exception caught).\nService: "
- + OUStringToOString(i_mig->service, RTL_TEXTENCODING_ASCII_US)
- + "\nNo message available";
- OSL_FAIL(aMsg.getStr());
+ SAL_WARN( "desktop", "Execution of migration service failed (Exception caught).\nService: "
+ << i_mig->service << "\nNo message available");
}
}
diff --git a/desktop/source/migration/services/basicmigration.cxx b/desktop/source/migration/services/basicmigration.cxx
index bfe2e84df1d6..5bd36c836b2e 100644
--- a/desktop/source/migration/services/basicmigration.cxx
+++ b/desktop/source/migration/services/basicmigration.cxx
@@ -132,11 +132,8 @@ namespace migration
::osl::FileBase::RC aResult = ::osl::File::copy( *aI, sTargetName );
if ( aResult != ::osl::FileBase::E_None )
{
- OString aMsg = "BasicMigration::copyFiles: cannot copy "
- + OUStringToOString( *aI, RTL_TEXTENCODING_UTF8 )
- + " to "
- + OUStringToOString( sTargetName, RTL_TEXTENCODING_UTF8 );
- OSL_FAIL( aMsg.getStr() );
+ SAL_WARN( "desktop", "BasicMigration::copyFiles: cannot copy "
+ << *aI << " to " << sTargetName );
}
++aI;
}
diff --git a/desktop/source/migration/services/wordbookmigration.cxx b/desktop/source/migration/services/wordbookmigration.cxx
index 3b0ebe9b9024..5b19b59a0472 100644
--- a/desktop/source/migration/services/wordbookmigration.cxx
+++ b/desktop/source/migration/services/wordbookmigration.cxx
@@ -165,11 +165,8 @@ 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 "
- + OUStringToOString( *aI, RTL_TEXTENCODING_UTF8 )
- + " to "
- + OUStringToOString( sTargetName, RTL_TEXTENCODING_UTF8 );
- OSL_FAIL( aMsg.getStr() );
+ SAL_WARN( "desktop", "WordbookMigration::copyFiles: cannot copy "
+ << *aI << " to " << sTargetName);
}
}
++aI;