Kaydet (Commit) be6b882f authored tarafından Caolán McNamara's avatar Caolán McNamara

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

üst 083e8d90
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* /*
* Version: MPL 1.1 / GPLv3+ / LGPLv3+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
* *
...@@ -30,6 +31,7 @@ ...@@ -30,6 +31,7 @@
#include <comphelper/processfactory.hxx> #include <comphelper/processfactory.hxx>
#include <comphelper/componentfactory.hxx> #include <comphelper/componentfactory.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <rtl/strbuf.hxx>
// ugly but so is this namespacing evil. // ugly but so is this namespacing evil.
#define css ::com::sun::star #define css ::com::sun::star
...@@ -43,16 +45,19 @@ inline css::uno::Reference<css::uno::XInterface> ...@@ -43,16 +45,19 @@ inline css::uno::Reference<css::uno::XInterface>
{ {
css::uno::Reference<css::uno::XInterface> xRet; css::uno::Reference<css::uno::XInterface> xRet;
css::uno::Reference<css::lang::XMultiServiceFactory > xSMgr( xOptSF ); css::uno::Reference<css::lang::XMultiServiceFactory > xSMgr( xOptSF );
try { try
{
if (!xSMgr.is()) if (!xSMgr.is())
xSMgr = ::comphelper::getProcessServiceFactory(); xSMgr = ::comphelper::getProcessServiceFactory();
xRet = xSMgr->createInstance( rtl::OUString::createFromAscii( serviceName ) ); xRet = xSMgr->createInstance( rtl::OUString::createFromAscii( serviceName ) );
} catch (css::uno::Exception &e) { }
catch (const css::uno::Exception &e)
{
#ifdef DBG_UTIL #ifdef DBG_UTIL
ByteString aMsg( context ); rtl::OStringBuffer aMsg( context );
aMsg += "ctor: Exception caught\n"; aMsg.append(RTL_CONSTASCII_STRINGPARAM("ctor: Exception caught\n"));
aMsg += ByteString( String( e.Message ), RTL_TEXTENCODING_UTF8 ); aMsg.append(rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8));
DBG_ERRORFILE( aMsg.GetBuffer() ); DBG_ERRORFILE(aMsg.getStr());
#else #else
(void)e; (void)context; (void)e; (void)context;
#endif #endif
...@@ -62,3 +67,5 @@ inline css::uno::Reference<css::uno::XInterface> ...@@ -62,3 +67,5 @@ inline css::uno::Reference<css::uno::XInterface>
} }
#endif // _INTL_INSTANCE_HXX #endif // _INTL_INSTANCE_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment