sw/source/uibase/utlui/content.cxx | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-)
New commits: commit 3cb601245676a67f5cd523e4f400f777b3e53dc6 Author: Jim Raykowski <rayk...@gmail.com> AuthorDate: Wed Dec 14 06:24:08 2022 -0900 Commit: Jim Raykowski <rayk...@gmail.com> CommitDate: Sat Dec 17 05:08:20 2022 +0000 SwNavigator: Fix delete field content deletes one character extra PostIt fields are no longer included in the fields content type since commit bf28e1df0a04cf6a06d9c4cf591e238a45a34ec1 so there is no need to check to delete them from the field content type, if ever this was needed, and fall through to the PostIt content handling which is where the extra character delete happens that is the cause of this bug. Change-Id: I61ded30fd89d87c536f0c050117d5b61fe3a9aef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144201 Tested-by: Jenkins Reviewed-by: Jim Raykowski <rayk...@gmail.com> diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index 42c6168a7eb7..83d2bc08c2a5 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -5386,22 +5386,17 @@ void SwContentTree::EditEntry(const weld::TreeIter& rEntry, EditEntryMode nMode) break; case ContentTypeId::TEXTFIELD: { - const SwTextFieldContent* pTextFieldCnt = static_cast<const SwTextFieldContent*>(pCnt); if (nMode == EditEntryMode::DELETE) { + const SwTextFieldContent* pTextFieldCnt = + static_cast<const SwTextFieldContent*>(pCnt); const SwTextField* pTextField = pTextFieldCnt->GetFormatField()->GetTextField(); SwTextField::DeleteTextField(*pTextField); } else - { - if (pTextFieldCnt->GetFormatField()->GetField()->GetTypeId() != SwFieldTypesEnum::Postit) - { - nSlot = FN_EDIT_FIELD; - break; - } - } - [[fallthrough]]; // execute FN_POSTIT assuring standard mode first + nSlot = FN_EDIT_FIELD; } + break; case ContentTypeId::POSTIT: { auto& rView = m_pActiveShell->GetView();