summaryrefslogtreecommitdiff
path: root/sw/source/filter/xml/xmlmeta.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/filter/xml/xmlmeta.cxx')
-rw-r--r--sw/source/filter/xml/xmlmeta.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sw/source/filter/xml/xmlmeta.cxx b/sw/source/filter/xml/xmlmeta.cxx
index 0b80ece87fed..58b472fbc61d 100644
--- a/sw/source/filter/xml/xmlmeta.cxx
+++ b/sw/source/filter/xml/xmlmeta.cxx
@@ -30,6 +30,8 @@
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
#include <com/sun/star/text/XTextDocument.hpp>
+#include <com/sun/star/xml/dom/SAXDocumentBuilder.hpp>
+#include <comphelper/componentcontext.hxx>
#include <xmloff/xmlnmspe.hxx>
#include <xmloff/xmlmetai.hxx>
#include <xmloff/xmlmetae.hxx>
@@ -75,8 +77,7 @@ SvXMLImportContext *SwXMLImport::CreateMetaContext(
if (getImportFlags() & IMPORT_META)
{
uno::Reference<xml::sax::XDocumentHandler> const 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::XDocumentProperties> const xDocProps(
GetDocumentProperties());