sw/source/core/crsr/crstrvl.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit 91fa7cc3dc124877f810599fe3c315cda6d03df6 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Tue Feb 7 16:44:11 2023 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Tue Feb 7 19:55:17 2023 +0000 cid#1520798 Use after free since: commit 441d0b0fb2eef890a465c061a3d68a07c4a51832 Date: Fri Jan 27 19:03:35 2023 -0500 tdf#151548 sw content controls: actually gotoFormatContentControl Change-Id: I0460023c2f89a3a151c01a8f844513df39a35855 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146638 Tested-by: Jenkins Reviewed-by: Justin Luth <jl...@mail.com> diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index f55ede18d43d..954e9ba6707c 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -844,6 +844,7 @@ bool SwCursorShell::GotoFormatContentControl(const SwFormatContentControl& rCont sal_Int32 nStart = pTextContentControl->GetStart() + 1; pCursor->GetPoint()->Assign(*pTextNode, nStart); + bool bRet = true; // select contents for certain controls or conditions if (pContentControl->GetShowingPlaceHolder() || pContentControl->GetCheckbox() || pContentControl->GetSelectedListItem() || pContentControl->GetSelectedDate()) @@ -852,11 +853,11 @@ bool SwCursorShell::GotoFormatContentControl(const SwFormatContentControl& rCont // Don't select the CH_TXTATR_BREAKWORD itself at the end. sal_Int32 nEnd = *pTextContentControl->End() - 1; pCursor->GetMark()->Assign(*pTextNode, nEnd); + bRet = !pCursor->IsSelOvr(); } else ClearMark(); - bool bRet = !pCursor->IsSelOvr(); if (bRet) { UpdateCursor(SwCursorShell::SCROLLWIN | SwCursorShell::CHKRANGE