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. --- chart2/source/controller/main/CommandDispatch.cxx | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'chart2') diff --git a/chart2/source/controller/main/CommandDispatch.cxx b/chart2/source/controller/main/CommandDispatch.cxx index bf3d996b201b..8940686b12e8 100644 --- a/chart2/source/controller/main/CommandDispatch.cxx +++ b/chart2/source/controller/main/CommandDispatch.cxx @@ -30,6 +30,7 @@ #include "CommandDispatch.hxx" #include "CommonFunctors.hxx" #include "macros.hxx" +#include #include #include @@ -155,14 +156,9 @@ void CommandDispatch::fireStatusEventForURL( aURL.Complete = rURL; if( !m_xURLTransformer.is()) { - m_xURLTransformer.set( - m_xContext->getServiceManager()->createInstanceWithContext( - C2U( "com.sun.star.util.URLTransformer" ), - m_xContext ), - uno::UNO_QUERY ); + m_xURLTransformer.set( util::URLTransformer::create(m_xContext) ); } - if( m_xURLTransformer.is()) - m_xURLTransformer->parseStrict( aURL ); + m_xURLTransformer->parseStrict( aURL ); frame::FeatureStateEvent aEventToSend( static_cast< cppu::OWeakObject* >( this ), // Source -- cgit