diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-12-20 14:34:56 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-12-20 19:26:18 +0100 |
commit | 813118bfbb453f812be9e1a30f84908b4e0bfb51 (patch) | |
tree | 7b032fc73b76a148ba98d85625596717e6f59d7d /sw/source/filter/xml/xmlimp.cxx | |
parent | e5f4aff517a674d12dd125601cc508feef854c15 (diff) |
add checks to optional fields in SvXMLImportContext
so when I convert ImportContext to FastParser APIs I don't accidentally
rely on data that is not there
Change-Id: If4700c7902e11f98a57542943f6a198822689df8
Reviewed-on: https://gerrit.libreoffice.org/85622
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/filter/xml/xmlimp.cxx')
-rw-r--r-- | sw/source/filter/xml/xmlimp.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index ebbd220e65a1..6b9a18327714 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -244,7 +244,7 @@ SvXMLImportContextRef SwXMLDocContext_Impl::CreateChildContext( break; case XML_TOK_DOC_AUTOSTYLES: // don't use the autostyles from the styles-document for the progress - if ( ! IsXMLToken( GetLocalName(), XML_DOCUMENT_STYLES ) ) + if ( !IsPrefixFilledIn() || ! IsXMLToken( GetLocalName(), XML_DOCUMENT_STYLES ) ) GetSwImport().GetProgressBarHelper()->Increment ( PROGRESS_BAR_STEP ); pContext = GetSwImport().CreateStylesContext( rLocalName, xAttrList, |