summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/undo/undobj.cxx3
-rw-r--r--sw/source/uibase/shells/textsh1.cxx8
2 files changed, 8 insertions, 3 deletions
diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx
index 3c5f3844591e..d872bc812166 100644
--- a/sw/source/core/undo/undobj.cxx
+++ b/sw/source/core/undo/undobj.cxx
@@ -655,6 +655,9 @@ OUString GetUndoComment(SwUndoId eId)
case SwUndoId::DELETE_FORM_FIELDS:
pId = STR_UNDO_DELETE_FORM_FIELDS;
break;
+ case SwUndoId::UPDATE_BOOKMARK:
+ pId = STR_UPDATE_BOOKMARK;
+ break;
}
assert(pId);
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index b68d5cd83baa..156572854c19 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -610,13 +610,15 @@ void UpdateBookmark(SfxRequest& rReq, SwWrtShell& rWrtSh)
return;
}
- rWrtSh.GetDoc()->GetIDocumentUndoRedo().StartUndo(SwUndoId::INSBOOKMARK, nullptr);
+ SwRewriter aRewriter;
+ aRewriter.AddRule(UndoArg1, pBookmark->GetName());
+ rWrtSh.GetDoc()->GetIDocumentUndoRedo().StartUndo(SwUndoId::UPDATE_BOOKMARK, &aRewriter);
rWrtSh.StartAction();
comphelper::ScopeGuard g(
- [&rWrtSh]
+ [&rWrtSh, &aRewriter]
{
rWrtSh.EndAction();
- rWrtSh.GetDoc()->GetIDocumentUndoRedo().EndUndo(SwUndoId::INSBOOKMARK, nullptr);
+ rWrtSh.GetDoc()->GetIDocumentUndoRedo().EndUndo(SwUndoId::UPDATE_BOOKMARK, &aRewriter);
});