[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sw/source
Michael Stahl (via logerrit)
logerrit at kemper.freedesktop.org
Tue Aug 18 06:52:59 UTC 2020
sw/source/core/undo/undobj.cxx | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
New commits:
commit 4860c07c58c25fe89b0eea792f4a273145a3f9d6
Author: Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Wed Aug 12 16:32:07 2020 +0200
Commit: Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Tue Aug 18 08:52:27 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/+/100660
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl at cib.de>
(cherry picked from commit 5364c0815734d864e3c26090f1219d58a4022f8b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100671
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx
index a7a6119176fd..db2fee97bb6b 100644
--- a/sw/source/core/undo/undobj.cxx
+++ b/sw/source/core/undo/undobj.cxx
@@ -1105,12 +1105,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;
More information about the Libreoffice-commits
mailing list