diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-09-03 13:42:40 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-09-03 15:33:36 +0200 |
commit | 12a7a3d57d3dcf222b13fa9143c37736f8ea3d0b (patch) | |
tree | 0cf118576f8e313fd5321e2ee49b73546c79b2ae /sw/source | |
parent | 8db4b89e6b4a0f6be6e1040aec9fd9c0c0bdd608 (diff) |
Fix crashtest fdo77855.odt
regression from commit
commit 9814c1f2edf56ecc0f31001db9234ef335488879
use fastparser in SvXMLPropertySetContext subclasses
and add some asserts to find the problems earlier.
Change-Id: Ief64f813f2ef7ec005f682713dadb1be47cbcd15
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101998
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/filter/xml/xmlimpit.cxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx index 023eae8dc25b..be7ffaa95b8f 100644 --- a/sw/source/filter/xml/xmlimpit.cxx +++ b/sw/source/filter/xml/xmlimpit.cxx @@ -218,7 +218,15 @@ void SvXMLImportItemMapper::importXMLUnknownAttributes( SfxItemSet& rSet, pUnknownItem->AddAttr( rAttribute.Name, rAttribute.Value ); else { - pUnknownItem->AddAttr( rAttribute.Name, rAttribute.NamespaceURL, rAttribute.Name, + OUString sPrefix; + OUString sName = rAttribute.Name; + int i = sName.indexOf(':'); + if (i != -1) + { + sPrefix = sName.copy(0, i-1); + sName = sName.copy(i+1); + } + pUnknownItem->AddAttr( sPrefix, rAttribute.NamespaceURL, sName, rAttribute.Value ); } } |