summaryrefslogtreecommitdiff
path: root/sc/source/filter/xml/xmlimprt.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-01-21 16:59:30 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-01-21 17:56:56 +0100
commit998308c363dfad03143591aa18256d2669b4da11 (patch)
tree1eec3bb9ab79fa54d3bfc37c6bc969349ab24909 /sc/source/filter/xml/xmlimprt.cxx
parent63b7e282a598ff5dc9d665127f567b20adc56f24 (diff)
use more FastParser in SvXMLStylesContext
Change-Id: I05c7314739246a864b16723c13bd8fbb4ef725e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87146 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/filter/xml/xmlimprt.cxx')
-rw-r--r--sc/source/filter/xml/xmlimprt.cxx21
1 files changed, 10 insertions, 11 deletions
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index 0e22d225672a..fdc16dfd477d 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -357,14 +357,6 @@ SvXMLImportContextRef ScXMLDocContext_Impl::CreateChildContext( sal_uInt16 nPref
if (GetScImport().getImportFlags() & SvXMLImportFlags::FONTDECLS)
pContext = GetScImport().CreateFontDeclsContext(nPrefix, rLocalName, xAttrList);
break;
- case XML_TOK_DOC_STYLES:
- if (GetScImport().getImportFlags() & SvXMLImportFlags::STYLES)
- pContext = GetScImport().CreateStylesContext( rLocalName, xAttrList, false);
- break;
- case XML_TOK_DOC_AUTOSTYLES:
- if (GetScImport().getImportFlags() & SvXMLImportFlags::AUTOSTYLES)
- pContext = GetScImport().CreateStylesContext( rLocalName, xAttrList, true);
- break;
case XML_TOK_DOC_MASTERSTYLES:
if (GetScImport().getImportFlags() & SvXMLImportFlags::MASTERSTYLES)
pContext = new ScXMLMasterStylesContext( GetImport(), nPrefix, rLocalName,
@@ -398,6 +390,14 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL
if (GetScImport().getImportFlags() & SvXMLImportFlags::SETTINGS)
pContext = new XMLDocumentSettingsContext(GetScImport());
break;
+ case XML_ELEMENT(OFFICE, XML_STYLES):
+ if (GetScImport().getImportFlags() & SvXMLImportFlags::STYLES)
+ pContext = GetScImport().CreateStylesContext( false);
+ break;
+ case XML_ELEMENT(OFFICE, XML_AUTOMATIC_STYLES):
+ if (GetScImport().getImportFlags() & SvXMLImportFlags::AUTOSTYLES)
+ pContext = GetScImport().CreateStylesContext( true);
+ break;
//TODO: handle all other cases
}
@@ -752,11 +752,10 @@ SvXMLImportContext *ScXMLImport::CreateFontDeclsContext(const sal_uInt16 nPrefix
return pContext;
}
-SvXMLImportContext *ScXMLImport::CreateStylesContext(const OUString& rLocalName,
- const uno::Reference<xml::sax::XAttributeList>& xAttrList, bool bIsAutoStyle )
+SvXMLImportContext *ScXMLImport::CreateStylesContext( bool bIsAutoStyle )
{
SvXMLImportContext* pContext = new XMLTableStylesContext(
- *this, XML_NAMESPACE_OFFICE, rLocalName, xAttrList, bIsAutoStyle);
+ *this, bIsAutoStyle);
if (bIsAutoStyle)
SetAutoStyles(static_cast<SvXMLStylesContext*>(pContext));