diff options
author | Pranam Lashkari <lpranam@collabora.com> | 2024-03-13 20:23:47 +0530 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-03-14 09:51:48 +0100 |
commit | c57b9282a500741812448a4ad3c68956f6764b4a (patch) | |
tree | cb194d9e8a4c9bc102177d00249f3613e5e442df | |
parent | 8231eaa096051172d62cc7ac8e14abceb1204a16 (diff) |
sd:annotation: added missing comment reply undo
Change-Id: I63e005aa35faad1ebdaad228a22477cb1dd6de67
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164812
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
-rw-r--r-- | sd/source/ui/annotations/annotationmanager.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
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 ); } |