diff options
author | Noel Grandin <noel@peralex.com> | 2012-09-06 14:00:14 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-09-12 10:24:55 +0200 |
commit | 372f9801687cad620924b7ac6e4fe488ff998334 (patch) | |
tree | 2f439042ac40dd775c52427da5acdd7f0fcde595 /sc | |
parent | a5036f396aadb44e44844ad2c784ee521eeda55a (diff) |
fdo#46808, Adapt xml::dom::SAXDocumentBuilderr UNO service to new style
Create a merged XSAXDocumentBuilder2 interface for this service to implement.
Which is backwards-compatible, but does not require creating a new service.
Change-Id: Iaa96031a0b7c27e957d2edb0394e5eeaaa84cdca
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/xml/xmlimprt.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx index 0de87a254df3..3df0818c5de4 100644 --- a/sc/source/filter/xml/xmlimprt.cxx +++ b/sc/source/filter/xml/xmlimprt.cxx @@ -71,6 +71,7 @@ #include "rangeutl.hxx" #include "postit.hxx" #include "formulaparserpool.hxx" +#include <comphelper/componentcontext.hxx> #include <comphelper/extract.hxx> #include <com/sun/star/document/XDocumentPropertiesSupplier.hpp> @@ -90,6 +91,7 @@ #include <com/sun/star/sheet/XLabelRanges.hpp> #include <com/sun/star/io/XSeekable.hpp> #include <com/sun/star/beans/XPropertySet.hpp> +#include <com/sun/star/xml/dom/SAXDocumentBuilder.hpp> #include <memory> @@ -1831,8 +1833,7 @@ SvXMLImportContext *ScXMLImport::CreateContext( sal_uInt16 nPrefix, } else if ( (XML_NAMESPACE_OFFICE == nPrefix) && ( IsXMLToken(rLocalName, XML_DOCUMENT)) ) { uno::Reference<xml::sax::XDocumentHandler> xDocBuilder( - mxServiceFactory->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.xml.dom.SAXDocumentBuilder"))), + xml::dom::SAXDocumentBuilder::create(comphelper::ComponentContext(mxServiceFactory).getUNOContext()), uno::UNO_QUERY_THROW); uno::Reference<document::XDocumentPropertiesSupplier> xDPS( GetModel(), uno::UNO_QUERY_THROW); @@ -2127,8 +2128,7 @@ SvXMLImportContext *ScXMLImport::CreateMetaContext( if( !IsStylesOnlyMode() && (getImportFlags() & IMPORT_META)) { uno::Reference<xml::sax::XDocumentHandler> xDocBuilder( - mxServiceFactory->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.xml.dom.SAXDocumentBuilder"))), + xml::dom::SAXDocumentBuilder::create(comphelper::ComponentContext(mxServiceFactory).getUNOContext()), uno::UNO_QUERY_THROW); uno::Reference<document::XDocumentPropertiesSupplier> xDPS( GetModel(), uno::UNO_QUERY_THROW); |