diff options
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/chart/SchXMLImport.cxx | 6 | ||||
-rw-r--r-- | xmloff/source/draw/sdxmlimp.cxx | 8 | ||||
-rw-r--r-- | xmloff/source/meta/MetaImportComponent.cxx | 5 |
3 files changed, 10 insertions, 9 deletions
diff --git a/xmloff/source/chart/SchXMLImport.cxx b/xmloff/source/chart/SchXMLImport.cxx index f7ef9a7fe5fb..b3cd44db2240 100644 --- a/xmloff/source/chart/SchXMLImport.cxx +++ b/xmloff/source/chart/SchXMLImport.cxx @@ -35,6 +35,7 @@ #include <tools/debug.hxx> #include <rtl/ustrbuf.hxx> +#include <comphelper/componentcontext.hxx> #include <comphelper/processfactory.hxx> #include "xmloff/xmlnmspe.hxx" #include <xmloff/xmltoken.hxx> @@ -56,6 +57,7 @@ #include <com/sun/star/document/XDocumentProperties.hpp> #include <com/sun/star/document/XDocumentPropertiesSupplier.hpp> +#include <com/sun/star/xml/dom/SAXDocumentBuilder.hpp> #include <typeinfo> @@ -607,9 +609,7 @@ SvXMLImportContext *SchXMLImport::CreateContext( sal_uInt16 nPrefix, const OUStr // mst@: right now, this seems to be not supported, so it is untested if (xDPS.is()) { uno::Reference<xml::sax::XDocumentHandler> xDocBuilder( - mxServiceFactory->createInstance( - ::rtl::OUString( - "com.sun.star.xml.dom.SAXDocumentBuilder")), + xml::dom::SAXDocumentBuilder::create(comphelper::ComponentContext(mxServiceFactory).getUNOContext()), uno::UNO_QUERY_THROW); pContext = (IsXMLToken(rLocalName, XML_DOCUMENT_META)) ? new SvXMLMetaDocumentContext(*this, diff --git a/xmloff/source/draw/sdxmlimp.cxx b/xmloff/source/draw/sdxmlimp.cxx index a0fbcd18bac7..d581d8a121f7 100644 --- a/xmloff/source/draw/sdxmlimp.cxx +++ b/xmloff/source/draw/sdxmlimp.cxx @@ -55,6 +55,8 @@ #include <com/sun/star/document/XDocumentProperties.hpp> #include <com/sun/star/document/XDocumentPropertiesSupplier.hpp> +#include <com/sun/star/xml/dom/SAXDocumentBuilder.hpp> +#include <comphelper/componentcontext.hxx> using ::rtl::OUString; using ::rtl::OUStringBuffer; @@ -732,8 +734,7 @@ SvXMLImportContext *SdXMLImport::CreateContext(sal_uInt16 nPrefix, } else if ( (XML_NAMESPACE_OFFICE == nPrefix) && ( IsXMLToken(rLocalName, XML_DOCUMENT)) ) { uno::Reference<xml::sax::XDocumentHandler> xDocBuilder( - mxServiceFactory->createInstance(::rtl::OUString( - "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); @@ -757,8 +758,7 @@ SvXMLImportContext *SdXMLImport::CreateMetaContext(const OUString& rLocalName, if (getImportFlags() & IMPORT_META) { uno::Reference<xml::sax::XDocumentHandler> xDocBuilder( - mxServiceFactory->createInstance(::rtl::OUString( - "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); diff --git a/xmloff/source/meta/MetaImportComponent.cxx b/xmloff/source/meta/MetaImportComponent.cxx index 5c5afb91ac81..1acb47ea63c2 100644 --- a/xmloff/source/meta/MetaImportComponent.cxx +++ b/xmloff/source/meta/MetaImportComponent.cxx @@ -34,6 +34,8 @@ #include <xmloff/xmlmetai.hxx> #include <xmloff/nmspmap.hxx> +#include <com/sun/star/xml/dom/SAXDocumentBuilder.hpp> +#include <comphelper/componentcontext.hxx> using namespace ::com::sun::star; using namespace ::xmloff::token; @@ -67,8 +69,7 @@ SvXMLImportContext* XMLMetaImportComponent::CreateContext( "has not been called")), *this); } 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); return new SvXMLMetaDocumentContext( *this, nPrefix, rLocalName, mxDocProps, xDocBuilder); |