diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2023-02-22 19:47:22 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2023-02-23 07:09:57 +0000 |
commit | 7897143a7313c57aed262826b736619bf9432b48 (patch) | |
tree | aac60441aff54c3063875af7958e818cc462c895 /sw | |
parent | 228caa2bafe214a0b502db4ac288dd70169ac2b8 (diff) |
sw: fix undo comment of FN_DELETE_TEXT_FORMFIELDS
It's deletes, not an insert. One has to dispatch
.uno:DeleteTextFormFields to see this in action.
Change-Id: I7c5afa6acc633e0d0a750d97ff6477b9511e816c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147489
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/strings.hrc | 1 | ||||
-rw-r--r-- | sw/inc/swundo.hxx | 1 | ||||
-rw-r--r-- | sw/source/core/undo/undobj.cxx | 3 | ||||
-rw-r--r-- | sw/source/uibase/shells/textfld.cxx | 4 |
4 files changed, 7 insertions, 2 deletions
diff --git a/sw/inc/strings.hrc b/sw/inc/strings.hrc index ec0903f48560..40cbb9acb8c4 100644 --- a/sw/inc/strings.hrc +++ b/sw/inc/strings.hrc @@ -590,6 +590,7 @@ #define STR_UNDO_INSERT_FORM_FIELD NC_("STR_UNDO_INSERT_FORM_FIELD", "Insert form field") #define STR_UNDO_UPDATE_FORM_FIELD NC_("STR_UNDO_UPDATE_FORM_FIELD", "Update form field") #define STR_UNDO_UPDATE_FORM_FIELDS NC_("STR_UNDO_UPDATE_FORM_FIELDS", "Update form fields") +#define STR_UNDO_DELETE_FORM_FIELDS NC_("STR_UNDO_DELETE_FORM_FIELDS", "Delete form fields") #define STR_UNDO_INSERT_PAGE_NUMBER NC_("STR_UNDO_INSERT_PAGE_NUMBER", "Insert page number") #define STR_DROP_DOWN_FIELD_ITEM_LIMIT NC_("STR_DROP_DOWN_FIELD_ITEM_LIMIT", "You can specify maximum of 25 items for a drop-down form field.") diff --git a/sw/inc/swundo.hxx b/sw/inc/swundo.hxx index a387757bfd6b..61261fb9769b 100644 --- a/sw/inc/swundo.hxx +++ b/sw/inc/swundo.hxx @@ -169,6 +169,7 @@ enum class SwUndoId INSERT_PAGE_NUMBER, // 137 UPDATE_FORM_FIELD, // 138 UPDATE_FORM_FIELDS, // 139 + DELETE_FORM_FIELDS, // 140 }; OUString GetUndoComment(SwUndoId eId); diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx index 8a23ae1f03ff..3c5f3844591e 100644 --- a/sw/source/core/undo/undobj.cxx +++ b/sw/source/core/undo/undobj.cxx @@ -652,6 +652,9 @@ OUString GetUndoComment(SwUndoId eId) case SwUndoId::UPDATE_FORM_FIELDS: pId = STR_UNDO_UPDATE_FORM_FIELDS; break; + case SwUndoId::DELETE_FORM_FIELDS: + pId = STR_UNDO_DELETE_FORM_FIELDS; + break; } assert(pId); diff --git a/sw/source/uibase/shells/textfld.cxx b/sw/source/uibase/shells/textfld.cxx index 785b2d95d6c9..e94b230a8f9d 100644 --- a/sw/source/uibase/shells/textfld.cxx +++ b/sw/source/uibase/shells/textfld.cxx @@ -982,7 +982,7 @@ FIELD_INSERT: { aFieldCommandPrefix = pFieldCommandPrefix->GetValue(); } - rSh.GetDoc()->GetIDocumentUndoRedo().StartUndo(SwUndoId::INSERT_FORM_FIELD, nullptr); + rSh.GetDoc()->GetIDocumentUndoRedo().StartUndo(SwUndoId::DELETE_FORM_FIELDS, nullptr); rSh.StartAction(); IDocumentMarkAccess* pMarkAccess = rSh.GetDoc()->getIDocumentMarkAccess(); @@ -1021,7 +1021,7 @@ FIELD_INSERT: } rSh.EndAction(); - rSh.GetDoc()->GetIDocumentUndoRedo().EndUndo(SwUndoId::INSERT_FORM_FIELD, nullptr); + rSh.GetDoc()->GetIDocumentUndoRedo().EndUndo(SwUndoId::DELETE_FORM_FIELDS, nullptr); } break; case FN_PGNUMBER_WIZARD: |