summaryrefslogtreecommitdiff
path: root/basctl
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 /basctl
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 'basctl')
-rw-r--r--basctl/source/basicide/scriptdocument.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/basctl/source/basicide/scriptdocument.cxx b/basctl/source/basicide/scriptdocument.cxx
index b184974b0fc0..fac7f9dca87f 100644
--- a/basctl/source/basicide/scriptdocument.cxx
+++ b/basctl/source/basicide/scriptdocument.cxx
@@ -26,7 +26,7 @@
#include "documentenumeration.hxx"
#include <com/sun/star/uri/UriReferenceFactory.hpp>
-#include <com/sun/star/util/XMacroExpander.hpp>
+#include <com/sun/star/util/theMacroExpander.hpp>
#include <com/sun/star/document/MacroExecMode.hpp>
#include <com/sun/star/frame/XStorable.hpp>
#include <com/sun/star/frame/FrameSearchFlag.hpp>
@@ -93,6 +93,7 @@ namespace basctl
using ::com::sun::star::uri::XUriReference;
using ::com::sun::star::uno::XComponentContext;
using ::com::sun::star::util::XMacroExpander;
+ using ::com::sun::star::util::theMacroExpander;
using ::com::sun::star::io::XInputStreamProvider;
using ::com::sun::star::uno::Any;
using ::com::sun::star::io::XInputStream;
@@ -953,10 +954,7 @@ namespace basctl
{
OUString aDecodedURL( aAuthority.copy( sizeof ( "vnd.sun.star.expand:" ) - 1 ) );
aDecodedURL = ::rtl::Uri::decode( aDecodedURL, rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8 );
- Reference< XMacroExpander > xMacroExpander(
- xContext->getValueByName(
- "/singletons/com.sun.star.util.theMacroExpander" ),
- UNO_QUERY_THROW );
+ Reference< XMacroExpander > xMacroExpander = theMacroExpander::get(xContext);
aFileURL = xMacroExpander->expandMacros( aDecodedURL );
}
}