diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-05-26 10:58:42 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-05-28 19:44:08 +0200 |
commit | ef513fd4b049b214a03fbe6e62a5ea43680a7a9b (patch) | |
tree | 82f2ce93bc8e5fde6dce8685b633c3d643c9f069 /toolkit | |
parent | 826f1bca40a01f0a249d5b6cbb7c39c11638a060 (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 'toolkit')
-rw-r--r-- | toolkit/source/controls/unocontrolmodel.cxx | 26 | ||||
-rw-r--r-- | toolkit/source/controls/unocontrols.cxx | 8 |
2 files changed, 12 insertions, 22 deletions
diff --git a/toolkit/source/controls/unocontrolmodel.cxx b/toolkit/source/controls/unocontrolmodel.cxx index 66da7f49f8f9..1c77f79617bd 100644 --- a/toolkit/source/controls/unocontrolmodel.cxx +++ b/toolkit/source/controls/unocontrolmodel.cxx @@ -687,14 +687,11 @@ void UnoControlModel::write( const css::uno::Reference< css::io::XObjectOutputSt #if OSL_DEBUG_LEVEL > 0 else { - OString sMessage( "UnoControlModel::write: don't know how to handle a property of type '" ); - OUString sTypeName( rType.getTypeName() ); - sMessage += OString( sTypeName.getStr(), sTypeName.getLength(), RTL_TEXTENCODING_ASCII_US ); - sMessage += "'.\n(Currently handling property '"; - const OUString& sPropertyName( GetPropertyName( *it ) ); - sMessage += OString( sPropertyName.getStr(), sPropertyName.getLength(), osl_getThreadTextEncoding() ); - sMessage += "'.)"; - OSL_FAIL( sMessage.getStr() ); + SAL_WARN( "toolkit", "UnoControlModel::write: don't know how to handle a property of type '" + << rType.getTypeName() + << "'.\n(Currently handling property '" + << GetPropertyName( *it ) + << "'.)"); } #endif } @@ -899,14 +896,11 @@ void UnoControlModel::read( const css::uno::Reference< css::io::XObjectInputStre } else { - OString sMessage( "UnoControlModel::read: don't know how to handle a property of type '" ); - OUString sTypeName( pType->getTypeName() ); - sMessage += OString( sTypeName.getStr(), sTypeName.getLength(), RTL_TEXTENCODING_ASCII_US ); - sMessage += "'.\n(Currently handling property '"; - const OUString& sPropertyName( GetPropertyName( nPropId ) ); - sMessage += OString( sPropertyName.getStr(), sPropertyName.getLength(), osl_getThreadTextEncoding() ); - sMessage += "'.)"; - OSL_FAIL( sMessage.getStr() ); + SAL_WARN( "toolkit", "UnoControlModel::read: don't know how to handle a property of type '" + << pType->getTypeName() + << "'.\n(Currently handling property '" + << GetPropertyName( nPropId ) + << "'.)"); } } else diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx index b2363d8b510b..88618b87af8b 100644 --- a/toolkit/source/controls/unocontrols.cxx +++ b/toolkit/source/controls/unocontrols.cxx @@ -2934,9 +2934,7 @@ void UnoListBoxControl::itemStateChanged( const awt::ItemEvent& rEvent ) #if OSL_DEBUG_LEVEL == 0 (void) e; // suppress warning #else - OString sMessage( "UnoListBoxControl::itemStateChanged: caught an exception:\n" ); - sMessage += OString( e.Message.getStr(), e.Message.getLength(), RTL_TEXTENCODING_ASCII_US ); - OSL_FAIL( sMessage.getStr() ); + SAL_WARN( "toolkit", "UnoListBoxControl::itemStateChanged: caught an exception: " << e.Message); #endif } } @@ -3276,9 +3274,7 @@ void UnoComboBoxControl::itemStateChanged( const awt::ItemEvent& rEvent ) #if OSL_DEBUG_LEVEL == 0 (void) e; // suppress warning #else - OString sMessage( "UnoComboBoxControl::itemStateChanged: caught an exception:\n" ); - sMessage += OString( e.Message.getStr(), e.Message.getLength(), RTL_TEXTENCODING_ASCII_US ); - OSL_FAIL( sMessage.getStr() ); + SAL_WARN( "toolkit", "UnoComboBoxControl::itemStateChanged: caught an exception: " << e.Message); #endif } } |