diff options
-rw-r--r-- | sc/source/core/data/postit.cxx | 11 | ||||
-rw-r--r-- | svx/source/svdraw/svdotxat.cxx | 7 |
2 files changed, 5 insertions, 13 deletions
diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx index 7bb1b96eb2b4..bafd2e9e901b 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 4b96bb04c12a..5ba5ec6a82cc 100644 --- a/svx/source/svdraw/svdotxat.cxx +++ b/svx/source/svdraw/svdotxat.cxx @@ -263,8 +263,12 @@ bool SdrTextObj::AdjustTextFrameWidthAndHeight() if (auto pRectObj = dynamic_cast<SdrRectObj *>(this)) { // this is a hack pRectObj->SetXPolyDirty(); } + 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(); |