On 12/08/2011 09:45 PM, Cédric Bosdonnat wrote:
@@ -102,7 +102,7 @@ sal_Bool RtfFilter::filter( const uno::Sequence< beans::PropertyValue>&
aDescri
catch (const uno::Exception& e)
{
#if OSL_DEBUG_LEVEL> 1
- OSL_TRACE( "Exception caught: %s",
+ SAL_INFO("writerfilter", "Exception caught: "<<
rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
#endif
(void)e;
For one, the "#if OSL_DEBUG_LEVEL> 1" condition can be removed (SAL_INFO
handles that well enough internally, in combination with the SAL_LOG
environment variable), together with the "(void)e;" -- the arguments to
SAL_INFO are visible to the compiler regardless of OSL_DEBUG_LEVEL and
DBG_UTIL settings, so it never considers e unused.
For another, #include "rtl/oustringostreaminserter.hxx" overloads
std::ostream's << for rtl::OUString, so the catch block can be
simplified to just
{
SAL_INFO("writerfilter", "Exception caught: " << e.Message);
}
Stephan
Context
- [Libreoffice] SAL_INFO usage (was: [Libreoffice-commits] .: writerfilter/source) · Stephan Bergmann
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.