From ef513fd4b049b214a03fbe6e62a5ea43680a7a9b Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 26 May 2017 10:58:42 +0200 Subject: remove unnecessary use of OString::getStr Change-Id: I0490efedf459190521f4339854b3394d57765fdb Reviewed-on: https://gerrit.libreoffice.org/38058 Tested-by: Jenkins Reviewed-by: Noel Grandin --- filter/source/config/cache/filtercache.cxx | 17 +++++------------ filter/source/svg/svgwriter.cxx | 2 +- filter/source/svg/test/odfserializer.cxx | 3 +-- filter/source/xsltfilter/XSLTFilter.cxx | 2 +- 4 files changed, 8 insertions(+), 16 deletions(-) (limited to 'filter') diff --git a/filter/source/config/cache/filtercache.cxx b/filter/source/config/cache/filtercache.cxx index 3d836d9fdb2b..cfc5ad0e5513 100644 --- a/filter/source/config/cache/filtercache.cxx +++ b/filter/source/config/cache/filtercache.cxx @@ -820,7 +820,7 @@ css::uno::Reference< css::uno::XInterface > FilterCache::impl_openConfig(EConfig } { - SAL_INFO( "filter.config", "" << sRtlLog.getStr()); + SAL_INFO( "filter.config", "" << sRtlLog); *pConfig = impl_createConfigAccess(sPath , false, // bReadOnly true ); // bLocalesMode @@ -878,15 +878,10 @@ css::uno::Any FilterCache::impl_getDirectCFGValue(const OUString& sDirectKey) } catch(const css::uno::RuntimeException&) { throw; } - #if OSL_DEBUG_LEVEL > 0 catch(const css::uno::Exception& ex) - #else - catch(const css::uno::Exception&) - #endif { - #if OSL_DEBUG_LEVEL > 0 - OSL_FAIL(OUStringToOString(ex.Message, RTL_TEXTENCODING_UTF8).getStr()); - #endif + (void)ex; + SAL_WARN( "filter.config", ex.Message); aValue.clear(); } @@ -1537,10 +1532,8 @@ void FilterCache::impl_readPatchUINames(const css::uno::Reference< css::containe return; OUString sName = rItem.getUnpackedValueOrDefault(PROPNAME_NAME, OUString()); - OUString sMsg("Fallback scenario for filter or type '" + sName + "' and locale '" + - sActLocale + "' failed. Please check your filter configuration."); - - OSL_FAIL(FILTER_CONFIG_TO_ASCII_(sMsg)); + SAL_WARN("filter.config", "Fallback scenario for filter or type '" << sName << "' and locale '" << + sActLocale << "' failed. Please check your filter configuration."); #endif return; } diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx index c9a9115bb509..a9b9dbbc5e87 100644 --- a/filter/source/svg/svgwriter.cxx +++ b/filter/source/svg/svgwriter.cxx @@ -2836,7 +2836,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, catch( ... ) { const MetaCommentAction* pA = static_cast(pAction); - OSL_FAIL( pA->GetComment().getStr() ); + SAL_WARN( "filter.svg", pA->GetComment() ); } } diff --git a/filter/source/svg/test/odfserializer.cxx b/filter/source/svg/test/odfserializer.cxx index 48d5e1be759a..8a3d62996279 100644 --- a/filter/source/svg/test/odfserializer.cxx +++ b/filter/source/svg/test/odfserializer.cxx @@ -94,8 +94,7 @@ void SAL_CALL ODFSerializer::endElement( const OUString& aName ) void SAL_CALL ODFSerializer::characters( const OUString& aChars ) { - const OString aStr = OUStringToOString(aChars, - RTL_TEXTENCODING_UTF8); + const OString aStr = OUStringToOString(aChars, RTL_TEXTENCODING_UTF8); const sal_Int32 nLen( aStr.getLength() ); m_aBuf.realloc( nLen ); const sal_Char* pStr = aStr.getStr(); diff --git a/filter/source/xsltfilter/XSLTFilter.cxx b/filter/source/xsltfilter/XSLTFilter.cxx index 47d9e380ae14..d4455f620a0a 100644 --- a/filter/source/xsltfilter/XSLTFilter.cxx +++ b/filter/source/xsltfilter/XSLTFilter.cxx @@ -402,7 +402,7 @@ namespace XSLT catch( const Exception& exc) { // something went wrong - OSL_FAIL(OUStringToOString(exc.Message, RTL_TEXTENCODING_ASCII_US).getStr()); + SAL_WARN("filter.xslt", exc.Message); return false; } } -- cgit