sw/source/core/undo/undobj.cxx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)
New commits: commit f54bcc07945a80dec20cf899caa2b1910a6eaa50 Author: Michael Stahl <michael.st...@cib.de> AuthorDate: Wed Aug 12 16:32:07 2020 +0200 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Aug 17 10:30:43 2020 +0200 sw: avoid assert when deletion starts at fieldmark end This hit assert(bSavePos && bSaveOtherPos); Tweak SwUndoSaveContent::DelContentIndex() for fieldmarks to only accept an equal end position if the start position was in range as well. (regression from 24fd14b387dca458a1b6e9415e936d26562ddb1e) Change-Id: If6c9b049193bb7f1bc39ec66d1c965512f9d6ec1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100673 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx index c37cffbaf9f8..bfea81a886b6 100644 --- a/sw/source/core/undo/undobj.cxx +++ b/sw/source/core/undo/undobj.cxx @@ -1097,12 +1097,14 @@ void SwUndoSaveContent::DelContentIndex( const SwPosition& rMark, if( pBkmk->IsExpanded() && *pStt <= pBkmk->GetOtherMarkPos() && pBkmk->GetOtherMarkPos() <= *pEnd ) { - if ( bSavePos || bSaveOtherPos + assert(!bSaveOtherPos); + if ( bSavePos || (*pStt < pBkmk->GetOtherMarkPos() && pBkmk->GetOtherMarkPos() < *pEnd) - || type == IDocumentMarkAccess::MarkType::TEXT_FIELDMARK - || type == IDocumentMarkAccess::MarkType::CHECKBOX_FIELDMARK - || type == IDocumentMarkAccess::MarkType::DROPDOWN_FIELDMARK - || type == IDocumentMarkAccess::MarkType::DATE_FIELDMARK) + || (bMaybe + && ( type == IDocumentMarkAccess::MarkType::TEXT_FIELDMARK + || type == IDocumentMarkAccess::MarkType::CHECKBOX_FIELDMARK + || type == IDocumentMarkAccess::MarkType::DROPDOWN_FIELDMARK + || type == IDocumentMarkAccess::MarkType::DATE_FIELDMARK))) { if( bMaybe ) bSavePos = true; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits