diff options
Diffstat (limited to 'reportdesign/source/filter/xml/xmlfilter.cxx')
-rw-r--r-- | reportdesign/source/filter/xml/xmlfilter.cxx | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/reportdesign/source/filter/xml/xmlfilter.cxx b/reportdesign/source/filter/xml/xmlfilter.cxx index bf246129d9e3..054e9b2e39c9 100644 --- a/reportdesign/source/filter/xml/xmlfilter.cxx +++ b/reportdesign/source/filter/xml/xmlfilter.cxx @@ -745,10 +745,6 @@ SvXMLImportContext* ORptFilter::CreateDocumentContext( sal_uInt16 nPrefix, case XML_TOK_DOC_CONTENT: pContext = new RptXMLDocumentContentContext(*this, nPrefix, rLocalName); break; - case XML_TOK_DOC_META: - GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP ); - pContext = CreateMetaContext( rLocalName ); - break; default: break; } @@ -759,6 +755,23 @@ SvXMLImportContext* ORptFilter::CreateDocumentContext( sal_uInt16 nPrefix, return pContext; } +SvXMLImportContext *ORptFilter::CreateFastContext( sal_Int32 nElement, + const uno::Reference< xml::sax::XFastAttributeList >& /*xAttrList*/ ) +{ + SvXMLImportContext *pContext = nullptr; + + switch (nElement) + { + case XML_ELEMENT( OFFICE, XML_DOCUMENT_META ): + GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP ); + pContext = CreateMetaContext( nElement ); + break; + default: + pContext = new SvXMLImportContext(*this); + } + return pContext; +} + const SvXMLTokenMap& ORptFilter::GetDocElemTokenMap() const { if ( !m_pDocElemTokenMap.get() ) @@ -1102,14 +1115,14 @@ void ORptFilter::insertFunction(const css::uno::Reference< css::report::XFunctio m_aFunctions.emplace(_xFunction->getName(),_xFunction); } -SvXMLImportContext* ORptFilter::CreateMetaContext(const OUString& rLocalName) +SvXMLImportContext* ORptFilter::CreateMetaContext(const sal_Int32 /*nElement*/) { SvXMLImportContext* pContext = nullptr; if ( getImportFlags() & SvXMLImportFlags::META ) { uno::Reference<document::XDocumentPropertiesSupplier> xDPS(GetModel(), uno::UNO_QUERY_THROW); - pContext = new SvXMLMetaDocumentContext(*this,XML_NAMESPACE_OFFICE, rLocalName,xDPS->getDocumentProperties()); + pContext = new SvXMLMetaDocumentContext(*this, xDPS->getDocumentProperties()); } return pContext; } |