summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-12-04 11:34:25 +0000
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2024-12-10 16:03:55 +0100
commit79f43f7a2fbe6daaff4507bf2856322824c0c09b (patch)
tree115686a7336719ab0f4a71bf0f068a338bb1dd42
parent497ca77d329aef04f30d74f1ddcea67ac62712f5 (diff)
crashtesting: failure to reimport forum-es-2526.odt after export to odt
2nd arg to copy is len, not index. Probably a problem since: commit 12a7a3d57d3dcf222b13fa9143c37736f8ea3d0b CommitDate: Thu Sep 3 15:33:36 2020 +0200 Fix crashtest fdo77855.odt in forum-es-2526.odt the input has: fo:border-=".009cm solid #595959" where 'fo:border-' is an unknown attr and "fo" ends up truncated to "f". On export and reimport the 'f' is further truncated to '' and we assert on this oddness. Change-Id: Ie85d81947504bf15b9caefb92477c7f977eb5cb9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177806 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> (cherry picked from commit c599597b35a312ccc6fdb71eb2b1bd165dcdf94b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177819 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
-rw-r--r--sw/source/filter/xml/xmlimpit.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx
index 141491db92de..ac8f4d851ed4 100644
--- a/sw/source/filter/xml/xmlimpit.cxx
+++ b/sw/source/filter/xml/xmlimpit.cxx
@@ -227,7 +227,7 @@ void SvXMLImportItemMapper::importXMLUnknownAttributes( SfxItemSet& rSet,
int i = sName.indexOf(':');
if (i != -1)
{
- sPrefix = sName.copy(0, i-1);
+ sPrefix = sName.copy(0, i);
sName = sName.copy(i+1);
}
// the sax parser doesn't reject these, strangely