[Libreoffice-commits] core.git: Branch 'libreoffice-7-0-4' - sc/source svx/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Tue Dec 1 14:58:08 UTC 2020
sc/source/core/data/postit.cxx | 11 -----------
svx/source/svdraw/svdotxat.cxx | 11 +++++++----
2 files changed, 7 insertions(+), 15 deletions(-)
New commits:
commit 77670f84c1148d15ab9a34c4db150e87ad9949eb
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Dec 1 09:09:45 2020 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Dec 1 15:57:34 2020 +0100
Resolves: tdf#138549 use GetSpecialTextBoxShadow to identify ScPostIt
instead of a 'special' name which causes undo-related causes side effects
Change-Id: Id36b0b5360ddde3469721a7c837fe3942af08209
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106938
Tested-by: Xisco Fauli <xiscofauli at libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
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 92221fe87430..d0ac658f3e35 100644
--- a/sc/source/core/data/postit.cxx
+++ b/sc/source/core/data/postit.cxx
@@ -382,17 +382,6 @@ 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 );
}
diff --git a/svx/source/svdraw/svdotxat.cxx b/svx/source/svdraw/svdotxat.cxx
index 6f97960b5377..315e57e7cb06 100644
--- a/svx/source/svdraw/svdotxat.cxx
+++ b/svx/source/svdraw/svdotxat.cxx
@@ -263,8 +263,12 @@ bool SdrTextObj::AdjustTextFrameWidthAndHeight()
if (dynamic_cast<const SdrRectObj *>(this) != nullptr) { // this is a hack
static_cast<SdrRectObj*>(this)->SetXPolyDirty();
}
- if (dynamic_cast<const SdrCaptionObj *>(this) != nullptr) { // this is a hack
- static_cast<SdrCaptionObj*>(this)->ImpRecalcTail();
+ bool bScPostIt = false;
+ if (auto pCaptionObj = dynamic_cast<SdrCaptionObj *>(this)) { // this is a hack
+ pCaptionObj->ImpRecalcTail();
+ // tdf#114956, tdf#138549 use GetSpecialTextBoxShadow to recognize
+ // that this SdrCaption is for a ScPostit
+ bScPostIt = pCaptionObj->GetSpecialTextBoxShadow();
}
// to not slow down EditView visualization on Overlay (see
@@ -278,8 +282,7 @@ bool SdrTextObj::AdjustTextFrameWidthAndHeight()
GetTextEditOutliner() &&
GetTextEditOutliner()->hasEditViewCallbacks());
- // tdf#114956 always broadcast change for ScPostIts
- if (!bSuppressChangeWhenEditOnOverlay || GetName() == "ScPostIt")
+ if (!bSuppressChangeWhenEditOnOverlay || bScPostIt)
{
SetChanged();
BroadcastObjectChange();
More information about the Libreoffice-commits
mailing list