summaryrefslogtreecommitdiff
path: root/jvmaccess/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-02-08 11:02:37 +0200
committerNoel Grandin <noel@peralex.com>2013-02-11 08:02:13 +0200
commit591ef7844079e93ff627c7e194c04d520d2f1d55 (patch)
tree39c16f140ef2eae20f00a6c078d49519d4bd6bdc /jvmaccess/source
parent81c967e06e4247dec7ecb9ffec695ba31cb4f057 (diff)
fdo#46808, Use singleton util::theMacroExpander new-style constructor
And deprecate the old-style service util::MacroExpander Change-Id: Ifcefe31a8f8c68c6d44d6ec19616727eb607e1cd
Diffstat (limited to 'jvmaccess/source')
-rw-r--r--jvmaccess/source/classpath.cxx13
1 files changed, 4 insertions, 9 deletions
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(