sw/source/filter/xml/xmlimpit.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 020fed1ce5891770c709cd49f17f4caa909efaba
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Wed Dec 4 11:34:25 2024 +0000
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Thu Dec 5 13:41:29 2024 +0100

    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/+/177807
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>

diff --git a/sw/source/filter/xml/xmlimpit.cxx 
b/sw/source/filter/xml/xmlimpit.cxx
index eaabf789e2ac..085231e02254 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

Reply via email to