diff options
Diffstat (limited to 'xmloff/source/draw/sdxmlimp.cxx')
-rw-r--r-- | xmloff/source/draw/sdxmlimp.cxx | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/xmloff/source/draw/sdxmlimp.cxx b/xmloff/source/draw/sdxmlimp.cxx index d581d8a121f7..01e4744b45aa 100644 --- a/xmloff/source/draw/sdxmlimp.cxx +++ b/xmloff/source/draw/sdxmlimp.cxx @@ -55,8 +55,6 @@ #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; @@ -254,8 +252,7 @@ public: SdXMLFlatDocContext_Impl( SdXMLImport& i_rImport, sal_uInt16 i_nPrefix, const OUString & i_rLName, const uno::Reference<xml::sax::XAttributeList>& i_xAttrList, - const uno::Reference<document::XDocumentProperties>& i_xDocProps, - const uno::Reference<xml::sax::XDocumentHandler>& i_xDocBuilder); + const uno::Reference<document::XDocumentProperties>& i_xDocProps); virtual ~SdXMLFlatDocContext_Impl(); @@ -267,12 +264,11 @@ public: SdXMLFlatDocContext_Impl::SdXMLFlatDocContext_Impl( SdXMLImport& i_rImport, sal_uInt16 i_nPrefix, const OUString & i_rLName, const uno::Reference<xml::sax::XAttributeList>& i_xAttrList, - const uno::Reference<document::XDocumentProperties>& i_xDocProps, - const uno::Reference<xml::sax::XDocumentHandler>& i_xDocBuilder) : + const uno::Reference<document::XDocumentProperties>& i_xDocProps) : SvXMLImportContext(i_rImport, i_nPrefix, i_rLName), SdXMLDocContext_Impl(i_rImport, i_nPrefix, i_rLName, i_xAttrList), SvXMLMetaDocumentContext(i_rImport, i_nPrefix, i_rLName, - i_xDocProps, i_xDocBuilder) + i_xDocProps) { } @@ -733,14 +729,11 @@ SvXMLImportContext *SdXMLImport::CreateContext(sal_uInt16 nPrefix, pContext = CreateMetaContext(rLocalName, xAttrList); } else if ( (XML_NAMESPACE_OFFICE == nPrefix) && ( IsXMLToken(rLocalName, XML_DOCUMENT)) ) { - uno::Reference<xml::sax::XDocumentHandler> xDocBuilder( - xml::dom::SAXDocumentBuilder::create(comphelper::ComponentContext(mxServiceFactory).getUNOContext()), - uno::UNO_QUERY_THROW); uno::Reference<document::XDocumentPropertiesSupplier> xDPS( GetModel(), uno::UNO_QUERY_THROW); // flat OpenDocument file format pContext = new SdXMLFlatDocContext_Impl( *this, nPrefix, rLocalName, - xAttrList, xDPS->getDocumentProperties(), xDocBuilder); + xAttrList, xDPS->getDocumentProperties()); } else { pContext = SvXMLImport::CreateContext(nPrefix, rLocalName, xAttrList); } @@ -757,16 +750,13 @@ SvXMLImportContext *SdXMLImport::CreateMetaContext(const OUString& rLocalName, if (getImportFlags() & IMPORT_META) { - uno::Reference<xml::sax::XDocumentHandler> xDocBuilder( - xml::dom::SAXDocumentBuilder::create(comphelper::ComponentContext(mxServiceFactory).getUNOContext()), - uno::UNO_QUERY_THROW); uno::Reference<document::XDocumentPropertiesSupplier> xDPS( GetModel(), uno::UNO_QUERY_THROW); uno::Reference<document::XDocumentProperties> const xDocProps( (IsStylesOnlyMode()) ? 0 : xDPS->getDocumentProperties()); pContext = new SvXMLMetaDocumentContext(*this, XML_NAMESPACE_OFFICE, rLocalName, - xDocProps, xDocBuilder); + xDocProps); } if(!pContext) |