summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-06-01 15:15:25 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-06-06 10:53:34 +0200
commit0fcd1a73f0e1ec564f3c6da1ccd890183d3c18db (patch)
tree3895ecd6f804b8f3ef3a8f03f1739e17918feeef /vcl
parent8a95074eaefd01621dc55db8567b19c8e6157f95 (diff)
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 <sbergman@redhat.com>, added some tweaks.
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx12
1 files changed, 4 insertions, 8 deletions
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 <comphelper/processfactory.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/util/URLTransformer.hpp>
#include <com/sun/star/util/URL.hpp>
#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;