sw/source/core/doc/DocumentRedlineManager.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
New commits: commit ad304d978b1a88d3ecadfef88d3a7a4c2475be5e Author: Michael Stahl <michael.st...@cib.de> AuthorDate: Mon Aug 6 14:07:26 2018 +0200 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Thu Sep 20 17:42:38 2018 +0200 sw: fix return value of DocumentRedlineManager::AppendRedline() If a footnote is inserted, a redline that includes the start/end node of the footnote is created, but that is not a valid redline (as far as HasValidRange() is concerned), so instead a different redline without start/end nodes is inserted, but pNewRedl is reset and so AppendRedline() returns IGNORED, and then we get an assert in Undo from SwRedlineSaveData::RedlineToDoc(). Change-Id: I92253e1a40ba98e34e0bca601b4e3b6ef3751b08 (cherry picked from commit deacee23d9530350988eef68b0e9bb5cfcf2fde3) Reviewed-on: https://gerrit.libreoffice.org/60750 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/source/core/doc/DocumentRedlineManager.cxx b/sw/source/core/doc/DocumentRedlineManager.cxx index 4f12cd39d827..ca6fd3ac539e 100644 --- a/sw/source/core/doc/DocumentRedlineManager.cxx +++ b/sw/source/core/doc/DocumentRedlineManager.cxx @@ -1680,7 +1680,14 @@ DocumentRedlineManager::AppendRedline(SwRangeRedline* pNewRedl, bool const bCall pNewRedl = nullptr; } else - mpRedlineTable->Insert( pNewRedl ); + { + bool const ret = mpRedlineTable->Insert( pNewRedl ); + assert(ret || !pNewRedl); + if (ret && !pNewRedl) + { + bMerged = true; // treat InsertWithValidRanges as "merge" + } + } } if( bCompress ) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits