[Libreoffice-commits] .: unotools/source

Caolán McNamara caolan at kemper.freedesktop.org
Fri Aug 19 05:27:44 PDT 2011


 unotools/source/i18n/instance.hxx |   19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)

New commits:
commit be6b882f8d5475cfa226e3f4e6bf3ac116c245b1
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Aug 19 13:27:37 2011 +0100

    fix build, add mode-lines, use rtl::OStringBuffer

diff --git a/unotools/source/i18n/instance.hxx b/unotools/source/i18n/instance.hxx
index 5127da6..248ab98 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: */


More information about the Libreoffice-commits mailing list