From 591ef7844079e93ff627c7e194c04d520d2f1d55 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 8 Feb 2013 11:02:37 +0200 Subject: fdo#46808, Use singleton util::theMacroExpander new-style constructor And deprecate the old-style service util::MacroExpander Change-Id: Ifcefe31a8f8c68c6d44d6ec19616727eb607e1cd --- jvmaccess/source/classpath.cxx | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'jvmaccess') diff --git a/jvmaccess/source/classpath.cxx b/jvmaccess/source/classpath.cxx index 4861849e2789..5fc4a7e38ea7 100644 --- a/jvmaccess/source/classpath.cxx +++ b/jvmaccess/source/classpath.cxx @@ -31,7 +31,7 @@ #include "com/sun/star/uno/XInterface.hpp" #include "com/sun/star/uri/UriReferenceFactory.hpp" #include "com/sun/star/uri/XVndSunStarExpandUrlReference.hpp" -#include "com/sun/star/util/XMacroExpander.hpp" +#include "com/sun/star/util/theMacroExpander.hpp" #include "osl/diagnose.h" #include "rtl/ustring.hxx" #include "sal/types.h" @@ -65,15 +65,10 @@ void * ::jvmaccess::ClassPath::doTranslateToUrls( css::uri::UriReferenceFactory::create(context)->parse(url), css::uno::UNO_QUERY); if (expUrl.is()) { - css::uno::Reference< css::util::XMacroExpander > expander( - context->getValueByName( - ::rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "/singletons/" - "com.sun.star.util.theMacroExpander"))), - css::uno::UNO_QUERY_THROW); + css::uno::Reference< css::util::XMacroExpander > expander = + css::util::theMacroExpander::get(context); try { - url = expUrl->expand(expander); + url = expUrl->expand( expander ); } catch (const css::lang::IllegalArgumentException & e) { throw css::uno::RuntimeException( (::rtl::OUString( -- cgit v1.2.3