diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-08-19 13:27:37 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-08-19 13:27:37 +0100 |
commit | be6b882f8d5475cfa226e3f4e6bf3ac116c245b1 (patch) | |
tree | 681343cdac8f2dfa64cab30e76715b476bebed7d /unotools | |
parent | correct typo (diff) | |
download | core-be6b882f8d5475cfa226e3f4e6bf3ac116c245b1.tar.gz core-be6b882f8d5475cfa226e3f4e6bf3ac116c245b1.zip |
fix build, add mode-lines, use rtl::OStringBuffer
Diffstat (limited to 'unotools')
-rw-r--r-- | unotools/source/i18n/instance.hxx | 19 |
1 files changed, 13 insertions, 6 deletions
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 <comphelper/processfactory.hxx> #include <comphelper/componentfactory.hxx> #include <com/sun/star/lang/XMultiServiceFactory.hpp> +#include <rtl/strbuf.hxx> // ugly but so is this namespacing evil. #define css ::com::sun::star @@ -43,16 +45,19 @@ inline css::uno::Reference<css::uno::XInterface> { css::uno::Reference<css::uno::XInterface> xRet; css::uno::Reference<css::lang::XMultiServiceFactory > 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<css::uno::XInterface> } #endif // _INTL_INSTANCE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |