[Libreoffice-commits] core.git: sw/source

László Németh (via logerrit) logerrit at kemper.freedesktop.org
Mon Jan 11 09:19:54 UTC 2021


 sw/source/core/doc/DocumentRedlineManager.cxx |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit df8d5a15fb68e8517800d6219350ff160d70e483
Author:     László Németh <nemeth at numbertext.org>
AuthorDate: Thu Jan 7 14:43:48 2021 +0100
Commit:     László Németh <nemeth at numbertext.org>
CommitDate: Mon Jan 11 10:19:05 2021 +0100

    sw: fix redline assert during moving down
    
    numbered list items:
    
    sw/source/core/doc/DocumentRedlineManager.cxx:97: redline table corrupted: empty redline
    
    Change-Id: Ief26248b5cad3967d867c80261c1d51f11e6233d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108940
    Tested-by: Jenkins
    Reviewed-by: László Németh <nemeth at numbertext.org>

diff --git a/sw/source/core/doc/DocumentRedlineManager.cxx b/sw/source/core/doc/DocumentRedlineManager.cxx
index 889b725e8e3e..ea9b7164d683 100644
--- a/sw/source/core/doc/DocumentRedlineManager.cxx
+++ b/sw/source/core/doc/DocumentRedlineManager.cxx
@@ -2147,7 +2147,13 @@ DocumentRedlineManager::AppendRedline(SwRangeRedline* pNewRedl, bool const bCall
                                         xRedlineExtraData.reset(pExtraData);
                                         pPar->SetExtraData( xRedlineExtraData.get() );
                                     }
-                                    mpRedlineTable->Insert( pPar );
+
+                                    // skip empty redlines without ExtraData
+                                    // FIXME: maybe checking pExtraData is redundant here
+                                    if ( pExtraData || *pPar->Start() != *pPar->End() )
+                                        mpRedlineTable->Insert( pPar );
+                                    else
+                                        delete pPar;
                                 }
 
                                 // modify paragraph formatting


More information about the Libreoffice-commits mailing list