From be6b882f8d5475cfa226e3f4e6bf3ac116c245b1 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 19 Aug 2011 13:27:37 +0100 Subject: fix build, add mode-lines, use rtl::OStringBuffer --- unotools/source/i18n/instance.hxx | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'unotools') diff --git a/unotools/source/i18n/instance.hxx b/unotools/source/i18n/instance.hxx index 5127da6b2ec2..248ab9851903 100644 --- a/unotools/source/i18n/instance.hxx +++ b/unotools/source/i18n/instance.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * Version: MPL 1.1 / GPLv3+ / LGPLv3+ * @@ -30,6 +31,7 @@ #include #include #include +#include // ugly but so is this namespacing evil. #define css ::com::sun::star @@ -43,16 +45,19 @@ inline css::uno::Reference { css::uno::Reference xRet; css::uno::Reference xSMgr( xOptSF ); - try { + try + { if (!xSMgr.is()) xSMgr = ::comphelper::getProcessServiceFactory(); xRet = xSMgr->createInstance( rtl::OUString::createFromAscii( serviceName ) ); - } catch (css::uno::Exception &e) { + } + catch (const css::uno::Exception &e) + { #ifdef DBG_UTIL - ByteString aMsg( context ); - aMsg += "ctor: Exception caught\n"; - aMsg += ByteString( String( e.Message ), RTL_TEXTENCODING_UTF8 ); - DBG_ERRORFILE( aMsg.GetBuffer() ); + rtl::OStringBuffer aMsg( context ); + aMsg.append(RTL_CONSTASCII_STRINGPARAM("ctor: Exception caught\n")); + aMsg.append(rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8)); + DBG_ERRORFILE(aMsg.getStr()); #else (void)e; (void)context; #endif @@ -62,3 +67,5 @@ inline css::uno::Reference } #endif // _INTL_INSTANCE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit