From c57b9282a500741812448a4ad3c68956f6764b4a Mon Sep 17 00:00:00 2001 From: Pranam Lashkari Date: Wed, 13 Mar 2024 20:23:47 +0530 Subject: sd:annotation: added missing comment reply undo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I63e005aa35faad1ebdaad228a22477cb1dd6de67 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164812 Tested-by: Jenkins CollaboraOffice Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara --- sd/source/ui/annotations/annotationmanager.cxx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx index 81d6b3c0176b..734229e36c39 100644 --- a/sd/source/ui/annotations/annotationmanager.cxx +++ b/sd/source/ui/annotations/annotationmanager.cxx @@ -553,6 +553,10 @@ void AnnotationManagerImpl::ExecuteReplyToAnnotation( SfxRequest const & rReq ) if( !pTextApi ) return; + if (mpDoc->IsUndoEnabled()) + mpDoc->BegUndo(SdResId(STR_ANNOTATION_REPLY)); + + CreateChangeUndo(xAnnotation); ::Outliner aOutliner( GetAnnotationPool(),OutlinerMode::TextObject ); SdDrawDocument::SetCalcFieldValueHdl( &aOutliner ); @@ -610,6 +614,9 @@ void AnnotationManagerImpl::ExecuteReplyToAnnotation( SfxRequest const & rReq ) // Tell our LOK clients about this (comment modification) LOKCommentNotifyAll(CommentNotificationType::Modify, xAnnotation); + if( mpDoc->IsUndoEnabled() ) + mpDoc->EndUndo(); + UpdateTags(true); SelectAnnotation( xAnnotation, true ); } -- cgit