diff options
author | Noel Grandin <noel@peralex.com> | 2013-02-08 11:02:37 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-02-11 08:02:13 +0200 |
commit | 591ef7844079e93ff627c7e194c04d520d2f1d55 (patch) | |
tree | 39c16f140ef2eae20f00a6c078d49519d4bd6bdc /stoc | |
parent | 81c967e06e4247dec7ecb9ffec695ba31cb4f057 (diff) |
fdo#46808, Use singleton util::theMacroExpander new-style constructor
And deprecate the old-style service util::MacroExpander
Change-Id: Ifcefe31a8f8c68c6d44d6ec19616727eb607e1cd
Diffstat (limited to 'stoc')
-rw-r--r-- | stoc/source/javavm/javavm.cxx | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx index e0ac281de0c6..d105f344aa9e 100644 --- a/stoc/source/javavm/javavm.cxx +++ b/stoc/source/javavm/javavm.cxx @@ -48,7 +48,7 @@ #include "com/sun/star/uno/XComponentContext.hpp" #include "com/sun/star/uno/XCurrentContext.hpp" #include "com/sun/star/uno/XInterface.hpp" -#include "com/sun/star/util/XMacroExpander.hpp" +#include "com/sun/star/util/theMacroExpander.hpp" #include "com/sun/star/container/XNameAccess.hpp" #include "cppuhelper/exc_hlp.hxx" #include "cppuhelper/factory.hxx" @@ -1624,22 +1624,7 @@ void JavaVirtualMachine::setINetSettingsInVM(bool set_reset) } void JavaVirtualMachine::setUpUnoVirtualMachine(JNIEnv * environment) { - css::uno::Reference< css::util::XMacroExpander > exp; - if (!(m_xContext->getValueByName( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "/singletons/com.sun.star.util.theMacroExpander"))) - >>= exp) - || !exp.is()) - { - throw css::uno::RuntimeException( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "component context fails to supply singleton" - " com.sun.star.util.theMacroExpander of type" - " com.sun.star.util.XMacroExpander")), - m_xContext); - } + css::uno::Reference< css::util::XMacroExpander > exp = css::util::theMacroExpander::get(m_xContext); rtl::OUString baseUrl; try { baseUrl = exp->expandMacros( |