[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sc/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Mon Nov 23 19:57:49 UTC 2020
sc/source/core/data/postit.cxx | 8 ++++++++
1 file changed, 8 insertions(+)
New commits:
commit ef81ab795547ccdfda999a0490564ac6d9f5764f
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Nov 23 16:25:02 2020 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Nov 23 20:57:12 2020 +0100
tdf#138428 don't record SetName("ScPostIt") in undo
Change-Id: Iae87db47907078282e48035ad7892dbf52942e53
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106431
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
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 );
}
More information about the Libreoffice-commits
mailing list