summaryrefslogtreecommitdiff
path: root/chart2
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 /chart2
parent826f1bca40a01f0a249d5b6cbb7c39c11638a060 (diff)
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 'chart2')
-rwxr-xr-xchart2/qa/extras/chart2dump/chart2dump.cxx6
-rw-r--r--chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx18
-rw-r--r--chart2/source/controller/itemsetwrapper/ItemConverter.cxx16
-rw-r--r--chart2/source/controller/main/ChartController.cxx5
4 files changed, 15 insertions, 30 deletions
diff --git a/chart2/qa/extras/chart2dump/chart2dump.cxx b/chart2/qa/extras/chart2dump/chart2dump.cxx
index 7fc78e2f76a4..989d50819d04 100755
--- a/chart2/qa/extras/chart2dump/chart2dump.cxx
+++ b/chart2/qa/extras/chart2dump/chart2dump.cxx
@@ -163,8 +163,8 @@ protected:
{
assert(m_bDumpMode);
assert(m_aDumpFile.is_open());
- m_aDumpFile << "// " << OUStringToOString(sCheck, RTL_TEXTENCODING_UTF8).getStr() << "\n"; // Add check string to make dump file readable
- m_aDumpFile << OUStringToOString(sActualValue.trim(), RTL_TEXTENCODING_UTF8).getStr() << "\n"; // Write out the checked value, will be used as reference later
+ m_aDumpFile << "// " << sCheck << "\n"; // Add check string to make dump file readable
+ m_aDumpFile << sActualValue.trim() << "\n"; // Write out the checked value, will be used as reference later
}
void readNote(const OUString& sNote)
@@ -183,7 +183,7 @@ protected:
{
assert(m_bDumpMode);
assert(m_aDumpFile.is_open());
- m_aDumpFile << "/// " << OUStringToOString(sNote, RTL_TEXTENCODING_UTF8).getStr() << "\n";
+ m_aDumpFile << "/// " << sNote << "\n";
}
double readExpectedDouble(const OUString& sCheck)
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
index 6c4a4814ae61..519dde5bd163 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
@@ -140,9 +140,8 @@ namespace
}
catch( const uno::Exception & ex )
{
- (void)(ex); // no warning in non-debug builds
- OSL_FAIL( OUStringToOString("Property Exception caught. Message: " +
- ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr());
+ (void)ex; // no warning in non-debug builds
+ SAL_WARN( "chart2", "Property Exception caught. Message: " << ex.Message);
}
}
return aResult;
@@ -168,9 +167,8 @@ namespace
}
catch( const uno::Exception & ex )
{
- (void)(ex); // no warning in non-debug builds
- OSL_FAIL( OUStringToOString("Property Exception caught. Message: " +
- ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr());
+ (void)ex; // no warning in non-debug builds
+ SAL_WARN( "chart2", "Property Exception caught. Message: " << ex.Message);
}
}
}
@@ -185,9 +183,8 @@ namespace
}
catch( const uno::Exception & ex )
{
- (void)(ex); // no warning in non-debug builds
- OSL_FAIL( OUStringToOString("Property Exception caught. Message: " +
- ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr());
+ (void)ex; // no warning in non-debug builds
+ SAL_WARN( "chart2", "Property Exception caught. Message: " << ex.Message);
}
return Color( nResult );
}
@@ -204,8 +201,7 @@ namespace
catch( const uno::Exception & ex )
{
(void)(ex); // no warning in non-debug builds
- OSL_FAIL( OUStringToOString( "Property Exception caught. Message: " +
- ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr());
+ SAL_WARN( "chart2", "Property Exception caught. Message: " << ex.Message);
}
}
}
diff --git a/chart2/source/controller/itemsetwrapper/ItemConverter.cxx b/chart2/source/controller/itemsetwrapper/ItemConverter.cxx
index eb66209e1a73..7669bd253674 100644
--- a/chart2/source/controller/itemsetwrapper/ItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/ItemConverter.cxx
@@ -123,12 +123,7 @@ void ItemConverter::FillItemSet( SfxItemSet & rOutItemSet ) const
catch( const beans::UnknownPropertyException &ex )
{
delete pItem;
- (void)ex;
- OSL_FAIL(
- OUStringToOString(
- ex.Message +
- " - unknown Property: " + aProperty.first,
- RTL_TEXTENCODING_ASCII_US ).getStr());
+ SAL_WARN( "chart2", ex.Message << " - unknown Property: " << aProperty.first);
}
catch( const uno::Exception &ex )
{
@@ -193,17 +188,12 @@ bool ItemConverter::ApplyItemSet( const SfxItemSet & rItemSet )
catch( const beans::UnknownPropertyException &ex )
{
(void)ex;
- OSL_FAIL(
- OUStringToOString(
- ex.Message +
- " - unknown Property: " + aProperty.first,
- RTL_TEXTENCODING_ASCII_US).getStr());
+ SAL_WARN( "chart2", ex.Message << " - unknown Property: " << aProperty.first);
}
catch( const uno::Exception &ex )
{
(void)ex;
- OSL_FAIL( OUStringToOString(
- ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr());
+ SAL_WARN( "chart2", ex.Message );
}
}
else
diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx
index 63e3b2336b21..308b64a5ad8e 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -216,9 +216,8 @@ void ChartController::TheModel::tryTermination()
}
catch(const uno::Exception& ex)
{
- (void)(ex); // no warning in non-debug builds
- OSL_FAIL( OString( OString("Termination of model failed: ")
- + OUStringToOString( ex.Message, RTL_TEXTENCODING_ASCII_US ) ).getStr() );
+ (void)ex; // no warning in non-debug builds
+ SAL_WARN( "chart2", "Termination of model failed: " << ex.Message );
}
}