summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-10-03 13:30:43 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-10-04 16:29:53 +0200
commita20f9a410fdd3f776f870434bc39219d5fc64b40 (patch)
tree079278e5859c5782fbe9bfcc34302d09bd8dfadd /xmloff
parentbd6b41bce491ac5a5f562652b7e32045cc22c35c (diff)
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
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/meta/xmlversion.cxx11
1 files changed, 3 insertions, 8 deletions
diff --git a/xmloff/source/meta/xmlversion.cxx b/xmloff/source/meta/xmlversion.cxx
index c5701d0cf8bb..8729cfd91160 100644
--- a/xmloff/source/meta/xmlversion.cxx
+++ b/xmloff/source/meta/xmlversion.cxx
@@ -33,13 +33,14 @@
#include <xmloff/xmlmetae.hxx>
#include <xmloff/xmltoken.hxx>
+#include <comphelper/componentcontext.hxx>
#include <comphelper/processfactory.hxx>
#include <com/sun/star/io/XActiveDataSource.hpp>
#include <com/sun/star/io/XOutputStream.hpp>
#include <com/sun/star/util/DateTime.hpp>
#include <com/sun/star/util/MeasureUnit.hpp>
#include <com/sun/star/xml/sax/InputSource.hpp>
-#include <com/sun/star/xml/sax/XParser.hpp>
+#include <com/sun/star/xml/sax/Parser.hpp>
using namespace ::com::sun::star::xml::sax;
using namespace ::com::sun::star::uno;
@@ -435,17 +436,11 @@ uno::Sequence< util::RevisionTag > SAL_CALL XMLVersionListPersistence::load( con
if ( !aParserInput.aInputStream.is() )
throw uno::RuntimeException();
- // get parser
- Reference< XInterface > xXMLParser = xServiceFactory->createInstance(
- OUString("com.sun.star.xml.sax.Parser") );
- DBG_ASSERT( xXMLParser.is(),
- "XMLReader::Read: com.sun.star.xml.sax.Parser service missing" );
-
// get filter
Reference< XDocumentHandler > xFilter = new XMLVersionListImport( xServiceFactory, aVersions );
// connect parser and filter
- Reference< XParser > xParser( xXMLParser, UNO_QUERY );
+ Reference< XParser > xParser = xml::sax::Parser::create(comphelper::getComponentContext(xServiceFactory));
xParser->setDocumentHandler( xFilter );
// parse