• Michael Stahl's avatar
    tdf#83260 sw: call CompressRedlines() in ODF import · 1c8efde4
    Michael Stahl yazdı
    It's possible that an ODF document contains redlines that will be
    deduplicated by CompressRedlines().
    
    If that happens during some editing operation, then a SwRedline
    will be deleted and the nodes array becomes smaller by at least 3
    nodes; any Undo actions that were created prior to the operation
    that called CompressRedlines() will store invalid node indexes now
    and Undo will crash.
    
    So presumably it's a precondition of editing operations
    that CompressRedlines() is a no-op.
    
    Interestingly CompressRedlines() is also called from
    SwEditShell::Undo()/Redo().
    
    Ensure it's a no-op later by calling CompressRedlines() immediately
    after load.
    
    (Hopefully this should also work for the Insert File case.)
    
    Add a test too.
    
    Change-Id: Iec8135cc60260ed5cfff05a196b5c92cc03265f9
    Reviewed-on: https://gerrit.libreoffice.org/49721Tested-by: 's avatarJenkins <ci@libreoffice.org>
    Reviewed-by: 's avatarMichael Stahl <mstahl@redhat.com>
    1c8efde4