summaryrefslogtreecommitdiff
path: root/filter/source/odfflatxml
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 /filter/source/odfflatxml
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 'filter/source/odfflatxml')
-rw-r--r--filter/source/odfflatxml/OdfFlatXml.cxx12
1 files changed, 3 insertions, 9 deletions
diff --git a/filter/source/odfflatxml/OdfFlatXml.cxx b/filter/source/odfflatxml/OdfFlatXml.cxx
index 18451904a632..cad9039a9a53 100644
--- a/filter/source/odfflatxml/OdfFlatXml.cxx
+++ b/filter/source/odfflatxml/OdfFlatXml.cxx
@@ -28,6 +28,7 @@
*/
+#include <comphelper/processfactory.hxx>
#include <cppuhelper/factory.hxx>
#include <cppuhelper/servicefactory.hxx>
#include <cppuhelper/implbase3.hxx>
@@ -44,7 +45,7 @@
#include <com/sun/star/xml/XImportFilter.hpp>
#include <com/sun/star/xml/XExportFilter.hpp>
-#include <com/sun/star/xml/sax/XParser.hpp>
+#include <com/sun/star/xml/sax/Parser.hpp>
#include <com/sun/star/xml/sax/InputSource.hpp>
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
#include <com/sun/star/xml/sax/XExtendedDocumentHandler.hpp>
@@ -141,14 +142,7 @@ OdfFlatXml::importer(
if (!inputStream.is())
return sal_False;
- OUString SAX_PARSER_SERVICE(
- RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Parser"));
- Reference<XParser> saxParser(m_rServiceFactory->createInstance(
- SAX_PARSER_SERVICE), UNO_QUERY);
-
- OSL_ASSERT(saxParser.is());
- if (!saxParser.is())
- return sal_False;
+ Reference<XParser> saxParser = Parser::create(comphelper::getComponentContext(m_rServiceFactory));
InputSource inputSource;
inputSource.sSystemId = url;