sd/source/ui/annotations/annotationmanager.cxx |    7 +++++++
 1 file changed, 7 insertions(+)

New commits:
commit 05022d33be70a76ff14ba2cda84b5fd8a15a47a1
Author:     Pranam Lashkari <lpra...@collabora.com>
AuthorDate: Wed Mar 13 20:23:47 2024 +0530
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Thu Mar 14 09:50:55 2024 +0100

    sd:annotation: added missing comment reply undo
    
    Change-Id: I63e005aa35faad1ebdaad228a22477cb1dd6de67
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164811
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sd/source/ui/annotations/annotationmanager.cxx 
b/sd/source/ui/annotations/annotationmanager.cxx
index 2caf48df3f5e..0ab47a7b1a07 100644
--- a/sd/source/ui/annotations/annotationmanager.cxx
+++ b/sd/source/ui/annotations/annotationmanager.cxx
@@ -567,6 +567,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 );
@@ -624,6 +628,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 );
 }

Reply via email to