diff options
Diffstat (limited to 'sw/source/uibase/shells/textsh1.cxx')
-rw-r--r-- | sw/source/uibase/shells/textsh1.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
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); }); |