From a6a8a8707b6ae111f94bac094d3c2909f523ca6f Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 4 Feb 2013 13:20:48 +0200 Subject: fdo#46808, convert xmloff module code to use XComponentContext with lots of repurcussions in other modules Change-Id: I6982671eecc701b06cf85d93533e1fe618044fea --- svx/source/xml/xmlxtimp.cxx | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'svx/source/xml') diff --git a/svx/source/xml/xmlxtimp.cxx b/svx/source/xml/xmlxtimp.cxx index ae81d1541ae5..c7f638352685 100644 --- a/svx/source/xml/xmlxtimp.cxx +++ b/svx/source/xml/xmlxtimp.cxx @@ -328,10 +328,10 @@ void SvxXMLTableImportContext::importBitmap( sal_uInt16 nPrfx, const OUString& r // #110680# SvxXMLXTableImport::SvxXMLXTableImport( - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory, + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > xContext, const uno::Reference< XNameContainer > & rTable, uno::Reference< XGraphicObjectResolver >& xGrfResolver ) -: SvXMLImport(xServiceFactory, 0), +: SvXMLImport(xContext, 0), mrTable( rTable ) { SetGraphicResolver( xGrfResolver ); @@ -383,13 +383,7 @@ bool SvxXMLXTableImport::load( const rtl::OUString &rPath, try { - uno::Reference xServiceFactory( ::comphelper::getProcessServiceFactory() ); uno::Reference xContext( ::comphelper::getProcessComponentContext() ); - if( !xServiceFactory.is() ) - { - OSL_FAIL( "SvxXMLXTableImport::load: got no service manager" ); - return false; - } uno::Reference< xml::sax::XParser > xParser = xml::sax::Parser::create( xContext ); @@ -448,7 +442,7 @@ bool SvxXMLXTableImport::load( const rtl::OUString &rPath, { } - uno::Reference< XDocumentHandler > xHandler( new SvxXMLXTableImport( xServiceFactory, xTable, xGrfResolver ) ); + uno::Reference< XDocumentHandler > xHandler( new SvxXMLXTableImport( xContext, xTable, xGrfResolver ) ); xParser->setDocumentHandler( xHandler ); xParser->parseStream( aParserInput ); -- cgit