From 0fcd1a73f0e1ec564f3c6da1ccd890183d3c18db Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 1 Jun 2012 15:15:25 +0200 Subject: fdo#46808, Adapt UNO services to new style, Part 7, updating ::create Update code to use factory method URLTransformer::create Change-Id: I3fd2e838497bcfd8fc949615c0e7d60a6ea47118 Signed-off-by: Stephan Bergmann , added some tweaks. --- vcl/source/gdi/pdfwriter_impl.cxx | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'vcl/source/gdi') diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 2c4d10b61ca7..df7d15eb5b2c 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -76,6 +76,7 @@ #include #include +#include #include #include "cppuhelper/implbase1.hxx" @@ -10560,19 +10561,14 @@ sal_Int32 PDFWriterImpl::setLinkURL( sal_Int32 nLinkId, const OUString& rURL ) if (!m_xTrans.is()) { - uno::Reference< lang::XMultiServiceFactory > xFact( comphelper::getProcessServiceFactory() ); - if( xFact.is() ) - { - m_xTrans = uno::Reference < util::XURLTransformer >( - xFact->createInstance( OUString( "com.sun.star.util.URLTransformer" ) ), uno::UNO_QUERY ); - } + uno::Reference< uno::XComponentContext > xContext( comphelper::getProcessComponentContext() ); + m_xTrans = util::URLTransformer::create(xContext);; } util::URL aURL; aURL.Complete = rURL; - if (m_xTrans.is()) - m_xTrans->parseStrict( aURL ); + m_xTrans->parseStrict( aURL ); m_aLinks[ nLinkId ].m_aURL = aURL.Complete; -- cgit