diff options
author | Noel Grandin <noel@peralex.com> | 2012-05-30 16:45:36 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-06-06 10:01:22 +0200 |
commit | 392a483e1040787857fa09fead0547d567c570b5 (patch) | |
tree | 76f2f1aab1a5a9c81c30e212e0df3f568fa92e34 /filter | |
parent | d08578912f2c9ef42d4349079422e25b951e544e (diff) |
fdo#46808, Adapt UNO services to new style, Part 7, updating ::create
Update code to use factory method PathSubstitutions::create
Change-Id: I3721bd93c36b207d849eea19102f5ac61cadd205
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>, added some tweaks.
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/xsltfilter/XSLTFilter.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/filter/source/xsltfilter/XSLTFilter.cxx b/filter/source/xsltfilter/XSLTFilter.cxx index f3ebd2f62992..fd3fc8b6a51b 100644 --- a/filter/source/xsltfilter/XSLTFilter.cxx +++ b/filter/source/xsltfilter/XSLTFilter.cxx @@ -41,6 +41,7 @@ #include <rtl/strbuf.hxx> #include <tools/urlobj.hxx> +#include <comphelper/componentcontext.hxx> #include <comphelper/interaction.hxx> #include <com/sun/star/lang/XComponent.hpp> @@ -67,6 +68,7 @@ #include <com/sun/star/io/XActiveDataSink.hpp> #include <com/sun/star/io/XActiveDataControl.hpp> #include <com/sun/star/io/XStreamListener.hpp> +#include <com/sun/star/util/PathSubstitution.hpp> #include <com/sun/star/util/XStringSubstitution.hpp> #include <com/sun/star/beans/NamedValue.hpp> #include <com/sun/star/task/XInteractionHandler.hpp> @@ -245,12 +247,9 @@ m_rServiceFactory(r), m_bTerminated(sal_False), m_bError(sal_False) XSLTFilter::rel2abs(const OUString& s) { + css::uno::Reference< css::uno::XComponentContext > xContext( comphelper::ComponentContext(m_rServiceFactory).getUNOContext() ); css::uno::Reference<XStringSubstitution> - subs( - m_rServiceFactory->createInstance( - OUString( - "com.sun.star.util.PathSubstitution" )), - UNO_QUERY); + subs(css::util::PathSubstitution::create(xContext)); OUString aWorkingDir(subs->getSubstituteVariableValue(OUString( "$(progurl)"))); INetURLObject aObj(aWorkingDir); aObj.setFinalSlash(); |