sw/source/core/crsr/crbm.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9e2c13f6e569f821b629c056e6e282ccd7f38a1f
Author:     Justin Luth <[email protected]>
AuthorDate: Sat Oct 15 18:15:47 2022 -0400
Commit:     Miklos Vajna <[email protected]>
CommitDate: Mon Oct 24 17:13:17 2022 +0200

    related tdf#151548 sw: use start of selection for GetCurrentFieldmark
    
    When walking through a form, the current formfield is highlighted,
    and pressing space should toggle a checkmarkField. Well, GetPoint
    was pointing at the end of the selection, and so we were getting
    a "sw/source/uibase/docvw/edtwin.cxx:2499: Where is my FieldMark??".
    
    My attempt at a unit test caused random crashing (I assume it was
    the protection-editing dialog box) and I never did succeed
    in getting the checkbox to report an unchecked status anyway.
    
    Change-Id: I0f28fb117a84cb5e56463a65d5bb72bbac174865
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141424
    Reviewed-by: Justin Luth <[email protected]>
    Tested-by: Jenkins
    (cherry picked from commit 7d260761702a5a172f3554bbf44d0e810c441a51)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141587
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Miklos Vajna <[email protected]>

diff --git a/sw/source/core/crsr/crbm.cxx b/sw/source/core/crsr/crbm.cxx
index 02f554014568..bb17940a01d6 100644
--- a/sw/source/core/crsr/crbm.cxx
+++ b/sw/source/core/crsr/crbm.cxx
@@ -286,7 +286,7 @@ bool SwCursorShell::IsFormProtected()
 ::sw::mark::IFieldmark* SwCursorShell::GetCurrentFieldmark()
 {
     // TODO: Refactor
-    SwPosition pos(*GetCursor()->GetPoint());
+    SwPosition pos(*GetCursor()->Start());
     return getIDocumentMarkAccess()->getFieldmarkFor(pos);
 }
 

Reply via email to