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 /forms/source | |
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 'forms/source')
-rw-r--r-- | forms/source/component/Edit.cxx | 15 | ||||
-rw-r--r-- | forms/source/richtext/attributedispatcher.cxx | 13 | ||||
-rw-r--r-- | forms/source/xforms/submission/replace.cxx | 4 |
3 files changed, 7 insertions, 25 deletions
diff --git a/forms/source/component/Edit.cxx b/forms/source/component/Edit.cxx index fa4de8afddf3..d8a86b4c9634 100644 --- a/forms/source/component/Edit.cxx +++ b/forms/source/component/Edit.cxx @@ -447,19 +447,10 @@ namespace } catch(const IllegalArgumentException& e) { -#if OSL_DEBUG_LEVEL > 0 - OString sMessage( "could not transfer the property named '" ); - sMessage += OString( pSourceProps->Name.getStr(), pSourceProps->Name.getLength(), RTL_TEXTENCODING_ASCII_US ); - sMessage += OString( "'." ); - if ( !e.Message.isEmpty() ) - { - sMessage += OString( "\n\nMessage:\n" ); - sMessage += OString( e.Message.getStr(), e.Message.getLength(), RTL_TEXTENCODING_ASCII_US ); - } - OSL_FAIL( sMessage.getStr() ); -#else (void)e; -#endif + SAL_WARN( "forms.component", "could not transfer the property named '" + << pSourceProps->Name + << "'. " << e.Message ); } ++pSourceProps; diff --git a/forms/source/richtext/attributedispatcher.cxx b/forms/source/richtext/attributedispatcher.cxx index af06c8a26811..e5f38169cd93 100644 --- a/forms/source/richtext/attributedispatcher.cxx +++ b/forms/source/richtext/attributedispatcher.cxx @@ -90,16 +90,9 @@ namespace frm (void)_rArguments; OSL_ENSURE( _rURL.Complete == getFeatureURL().Complete, "OAttributeDispatcher::dispatch: invalid URL!" ); -#if OSL_DEBUG_LEVEL > 0 - if ( _rArguments.getLength() ) - { - OString sMessage( "OAttributeDispatcher::dispatch: found arguments, but can't handle arguments at all" ); - sMessage += "\n (URL: "; - sMessage += OString( _rURL.Complete.getStr(), _rURL.Complete.getLength(), RTL_TEXTENCODING_ASCII_US ); - sMessage += ")"; - OSL_FAIL( sMessage.getStr() ); - } -#endif + SAL_WARN_IF( _rArguments.getLength(), "forms.richtext", + "OAttributeDispatcher::dispatch: found arguments, but can't handle arguments at all" + " (URL: " << _rURL.Complete << ")"); if ( m_pMasterDispatcher ) m_pMasterDispatcher->executeAttribute( m_nAttributeId, nullptr ); diff --git a/forms/source/xforms/submission/replace.cxx b/forms/source/xforms/submission/replace.cxx index 03801430c773..e569e2634b63 100644 --- a/forms/source/xforms/submission/replace.cxx +++ b/forms/source/xforms/submission/replace.cxx @@ -101,9 +101,7 @@ CSubmission::SubmissionResult CSubmission::replace(const OUString& aReplace, con return CSubmission::SUCCESS; } } catch (const Exception& e) { - OString aMsg = "Exception during replace:\n" - + OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8); - OSL_FAIL(aMsg.getStr()); + SAL_WARN( "forms.xforms", "Exception during replace: " << e.Message); } return CSubmission::UNKNOWN_ERROR; } |