diff options
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/filter/xml/xmlimprt.cxx | 35 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlstyli.cxx | 7 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlstyli.hxx | 4 |
3 files changed, 10 insertions, 36 deletions
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx index c6875dcb9438..e1bcfa4e176a 100644 --- a/sc/source/filter/xml/xmlimprt.cxx +++ b/sc/source/filter/xml/xmlimprt.cxx @@ -234,10 +234,6 @@ protected: public: ScXMLDocContext_Impl( ScXMLImport& rImport ); - virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, - const OUString& rLocalName, - const uno::Reference<xml::sax::XAttributeList>& xAttrList ) override; - virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 nElement, const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList ) override; @@ -344,28 +340,6 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL return GetScImport().CreateBodyContext( pAttribList ); } -SvXMLImportContextRef ScXMLDocContext_Impl::CreateChildContext( sal_uInt16 nPrefix, - const OUString& rLocalName, - const uno::Reference<xml::sax::XAttributeList>& xAttrList ) -{ - SvXMLImportContext *pContext(nullptr); - - const SvXMLTokenMap& rTokenMap(GetScImport().GetDocElemTokenMap()); - switch( rTokenMap.Get( nPrefix, rLocalName ) ) - { - case XML_TOK_DOC_MASTERSTYLES: - if (GetScImport().getImportFlags() & SvXMLImportFlags::MASTERSTYLES) - pContext = new ScXMLMasterStylesContext( GetImport(), nPrefix, rLocalName, - xAttrList ); - break; - case XML_TOK_DOC_META: - SAL_INFO("sc", "XML_TOK_DOC_META: should not have come here, maybe document is invalid?"); - break; - } - - return pContext; -} - uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDocContext_Impl::createFastChildContext( sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList > & /*xAttrList*/ ) @@ -398,8 +372,13 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL if (GetScImport().getImportFlags() & SvXMLImportFlags::FONTDECLS) pContext = GetScImport().CreateFontDeclsContext(); break; - - //TODO: handle all other cases + case XML_ELEMENT(OFFICE, XML_MASTER_STYLES): + if (GetScImport().getImportFlags() & SvXMLImportFlags::MASTERSTYLES) + pContext = new ScXMLMasterStylesContext( GetImport() ); + break; + case XML_ELEMENT(OFFICE, XML_META): + SAL_INFO("sc", "XML_ELEMENT(OFFICE, XML_META): should not have come here, maybe document is invalid?"); + break; } return pContext; diff --git a/sc/source/filter/xml/xmlstyli.cxx b/sc/source/filter/xml/xmlstyli.cxx index e4fc574948a5..1d7656083233 100644 --- a/sc/source/filter/xml/xmlstyli.cxx +++ b/sc/source/filter/xml/xmlstyli.cxx @@ -900,11 +900,8 @@ bool ScXMLMasterStylesContext::InsertStyleFamily( sal_uInt16 ) const return true; } -ScXMLMasterStylesContext::ScXMLMasterStylesContext( - SvXMLImport& rImport, - sal_uInt16 nPrfx, const OUString& rLName, - const uno::Reference< XAttributeList > & xAttrList ) : - SvXMLStylesContext( rImport, nPrfx, rLName, xAttrList ) +ScXMLMasterStylesContext::ScXMLMasterStylesContext( SvXMLImport& rImport ) : + SvXMLStylesContext( rImport ) { } diff --git a/sc/source/filter/xml/xmlstyli.hxx b/sc/source/filter/xml/xmlstyli.hxx index 666bfa9fef7f..efd463d5713d 100644 --- a/sc/source/filter/xml/xmlstyli.hxx +++ b/sc/source/filter/xml/xmlstyli.hxx @@ -181,9 +181,7 @@ protected: public: - ScXMLMasterStylesContext( SvXMLImport& rImport, sal_uInt16 nPrfx, - const OUString& rLName, - const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList); + ScXMLMasterStylesContext( SvXMLImport& rImport ); virtual ~ScXMLMasterStylesContext() override; virtual void EndElement() override; |