diff --git a/sc/source/filter/ftools/fapihelper.cxx b/sc/source/filter/ftools/fapihelper.cxx index 82c720e559b9..97770ceecfb9 100644 --- a/sc/source/filter/ftools/fapihelper.cxx +++ b/sc/source/filter/ftools/fapihelper.cxx @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -280,13 +281,13 @@ void ScfPropertySet::SetAnyProperty( const OUString& rPropName, const Any& rValu if( mxPropSet.is() ) mxPropSet->setPropertyValue( rPropName, rValue ); } - catch( Exception& ) + catch (const Exception&) { - OSL_FAIL( - ByteString( "ScfPropertySet::SetAnyProperty - cannot set property \"" ). - Append( ByteString( String( rPropName ), RTL_TEXTENCODING_ASCII_US ) ). - Append( '"' ). - GetBuffer() ); + OSL_FAIL(rtl::OStringBuffer(RTL_CONSTASCII_STRINGPARAM( + "ScfPropertySet::SetAnyProperty - cannot set property \"")) + .append(rtl::OUStringToOString(rPropName, + RTL_TEXTENCODING_ASCII_US)) + .append('"').getStr()); } }