diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-11-23 16:25:02 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-11-23 20:56:17 +0100 |
commit | 85cc3d3f6932f73abda2dcd4814f6a8c000b09bf (patch) | |
tree | 587d61522585799e1db0fcd9c6c6624391dcbdce /sc | |
parent | 49890bfe62694ec9ed10204e9874512daf6b4620 (diff) |
tdf#138428 don't record SetName("ScPostIt") in undo
Change-Id: Iae87db47907078282e48035ad7892dbf52942e53
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106426
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/postit.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx index f826e1d66478..7bb1b96eb2b4 100644 --- a/sc/source/core/data/postit.cxx +++ b/sc/source/core/data/postit.cxx @@ -382,9 +382,17 @@ void ScCaptionCreator::CreateCaption( bool bShown, bool bTailFront ) *mrDoc.GetDrawLayer(), // TTTT should ret a ref? aTextRect, aTailPos)); + // tdf#114956 a way to recognize that this SdrCaption is for a ScPostit in // SdrTextObj::AdjustTextFrameWidthAndHeight + SdrModel& rModel = mxCaption->getSdrModelFromSdrObject(); + const bool bUndoEnabled = rModel.IsUndoEnabled(); + if (bUndoEnabled) + rModel.EnableUndo(false); mxCaption->SetName("ScPostIt"); + if (bUndoEnabled) + rModel.EnableUndo(true); + // basic caption settings ScCaptionUtil::SetBasicCaptionSettings( *mxCaption, bShown ); } |