summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2023-03-16 08:27:33 +0100
committerMiklos Vajna <vmiklos@collabora.com>2023-03-16 08:42:06 +0000
commit7a7eb4aa21ca0c83db825fe8d5a5278611b391d8 (patch)
treecd4f50bea7a0aa150cc01fd3b9d5bd228bc10588
parent1916d161902bdd52b8cfa5b29153c8f8c39fce52 (diff)
sw: fix undo comment of FN_DELETE_BOOKMARKS
It's bookmarks, not bookmark. One has to dispatch .uno:DeleteBookmarks to see this in action, which does something if the document already contains at least one bookmark. Change-Id: I7678f6bc6a00a95cfd4ecc87e97e8db6d469216d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148945 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
-rw-r--r--sw/inc/strings.hrc1
-rw-r--r--sw/inc/swundo.hxx1
-rw-r--r--sw/source/core/undo/undobj.cxx3
-rw-r--r--sw/source/uibase/shells/textsh1.cxx4
4 files changed, 7 insertions, 2 deletions
diff --git a/sw/inc/strings.hrc b/sw/inc/strings.hrc
index cca6a14cd1e4..57710c5a4524 100644
--- a/sw/inc/strings.hrc
+++ b/sw/inc/strings.hrc
@@ -437,6 +437,7 @@
#define STR_INSERT_DOC_UNDO NC_("STR_INSERT_DOC_UNDO", "Insert file")
#define STR_INSERT_GLOSSARY NC_("STR_INSERT_GLOSSARY", "Insert AutoText")
#define STR_DELBOOKMARK NC_("STR_DELBOOKMARK", "Delete bookmark: $1")
+#define STR_DELETE_BOOKMARKS NC_("STR_DELETE_BOOKMARKS", "Delete bookmarks")
#define STR_INSBOOKMARK NC_("STR_INSBOOKMARK", "Insert bookmark: $1")
#define STR_UPDATE_BOOKMARK NC_("STR_UPDATE_BOOKMARK", "Update bookmark: $1")
#define STR_UPDATE_BOOKMARKS NC_("STR_UPDATE_BOOKMARKS", "Update bookmarks")
diff --git a/sw/inc/swundo.hxx b/sw/inc/swundo.hxx
index efca97bc1b23..9728f96b93de 100644
--- a/sw/inc/swundo.hxx
+++ b/sw/inc/swundo.hxx
@@ -172,6 +172,7 @@ enum class SwUndoId
DELETE_FORM_FIELDS, // 140
UPDATE_BOOKMARK, // 141
UPDATE_BOOKMARKS, // 142
+ DELETE_BOOKMARKS, // 143
};
OUString GetUndoComment(SwUndoId eId);
diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx
index 8e5638205c61..af1388dec6ef 100644
--- a/sw/source/core/undo/undobj.cxx
+++ b/sw/source/core/undo/undobj.cxx
@@ -661,6 +661,9 @@ OUString GetUndoComment(SwUndoId eId)
case SwUndoId::UPDATE_BOOKMARKS:
pId = STR_UPDATE_BOOKMARKS;
break;
+ case SwUndoId::DELETE_BOOKMARKS:
+ pId = STR_DELETE_BOOKMARKS;
+ break;
}
assert(pId);
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index c79d2bec1fbe..d765b62f9328 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -675,13 +675,13 @@ void DeleteBookmarks(SfxRequest& rReq, SwWrtShell& rWrtSh)
aBookmarkNamePrefix = pBookmarkNamePrefix->GetValue();
}
- rWrtSh.GetDoc()->GetIDocumentUndoRedo().StartUndo(SwUndoId::DELBOOKMARK, nullptr);
+ rWrtSh.GetDoc()->GetIDocumentUndoRedo().StartUndo(SwUndoId::DELETE_BOOKMARKS, nullptr);
rWrtSh.StartAction();
comphelper::ScopeGuard g(
[&rWrtSh]
{
rWrtSh.EndAction();
- rWrtSh.GetDoc()->GetIDocumentUndoRedo().EndUndo(SwUndoId::DELBOOKMARK, nullptr);
+ rWrtSh.GetDoc()->GetIDocumentUndoRedo().EndUndo(SwUndoId::DELETE_BOOKMARKS, nullptr);
});
IDocumentMarkAccess* pMarkAccess = rWrtSh.GetDoc()->getIDocumentMarkAccess();