From a20f9a410fdd3f776f870434bc39219d5fc64b40 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 3 Oct 2012 13:30:43 +0200 Subject: fdo#46808, Adapt xml::sax::XParser UNO service to new style The xml.sax.Parser service already existed, it just did not have a new-style service to create it. Change-Id: I6f145a7504ff9e149c802f723991954a2801cbc9 --- starmath/source/mathmlimport.cxx | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'starmath') diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx index a71fc36683fc..2273c10a4b46 100644 --- a/starmath/source/mathmlimport.cxx +++ b/starmath/source/mathmlimport.cxx @@ -26,7 +26,7 @@ one go*/ #include #include #include -#include +#include #include #include #include @@ -38,6 +38,7 @@ one go*/ #include #include +#include #include #include #include @@ -273,13 +274,7 @@ sal_uLong SmXMLImportWrapper::ReadThroughComponent( aParserInput.aInputStream = xInputStream; // get parser - Reference< xml::sax::XParser > xParser( - rFactory->createInstance( - "com.sun.star.xml.sax.Parser"), - UNO_QUERY ); - OSL_ENSURE( xParser.is(), "Can't create parser" ); - if ( !xParser.is() ) - return nError; + Reference< xml::sax::XParser > xParser = xml::sax::Parser::create(comphelper::getComponentContext(rFactory)); Sequence aArgs( 1 ); aArgs[0] <<= rPropSet; -- cgit