summaryrefslogtreecommitdiff
path: root/shell
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 /shell
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 'shell')
-rw-r--r--shell/source/unix/exec/shellexec.cxx16
1 files changed, 2 insertions, 14 deletions
diff --git a/shell/source/unix/exec/shellexec.cxx b/shell/source/unix/exec/shellexec.cxx
index be926bf89cf4..755e1ecef321 100644
--- a/shell/source/unix/exec/shellexec.cxx
+++ b/shell/source/unix/exec/shellexec.cxx
@@ -27,7 +27,7 @@
#include "shellexec.hxx"
#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
-#include <com/sun/star/util/XMacroExpander.hpp>
+#include <com/sun/star/util/theMacroExpander.hpp>
#include <com/sun/star/uri/XExternalUriReferenceTranslator.hpp>
#include <com/sun/star/uri/ExternalUriReferenceTranslator.hpp>
#include <com/sun/star/uri/UriReferenceFactory.hpp>
@@ -168,19 +168,7 @@ void SAL_CALL ShellExec::execute( const OUString& aCommand, const OUString& aPar
// The url launchers are expected to be in the $BRAND_BASE_DIR/program
// directory:
com::sun::star::uno::Reference< com::sun::star::util::XMacroExpander >
- exp;
- if (!(m_xContext->getValueByName(
- rtl::OUString( "/singletons/com.sun.star.util.theMacroExpander"))
- >>= exp)
- || !exp.is())
- {
- throw SystemShellExecuteException(
- rtl::OUString(
- "component context fails to supply singleton"
- " com.sun.star.util.theMacroExpander of type"
- " com.sun.star.util.XMacroExpander"),
- static_cast< XSystemShellExecute * >(this), ENOENT);
- }
+ exp = com::sun::star::util::theMacroExpander::get(m_xContext);
OUString aProgramURL;
try {
aProgramURL = exp->expandMacros(