From e3cf16e6fbf8d39cad8762f002b6db1d4f61ed36 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 07:03:24 +0200 Subject: Merging upstream version 4:24.2.3. Signed-off-by: Daniel Baumann --- svx/source/sdr/properties/textproperties.cxx | 60 +++++++++++++--------------- 1 file changed, 27 insertions(+), 33 deletions(-) (limited to 'svx/source/sdr/properties') diff --git a/svx/source/sdr/properties/textproperties.cxx b/svx/source/sdr/properties/textproperties.cxx index 55b366bdc0..17f63d044d 100644 --- a/svx/source/sdr/properties/textproperties.cxx +++ b/svx/source/sdr/properties/textproperties.cxx @@ -554,50 +554,44 @@ namespace sdr::properties if(!rObj.HasText()) return; + SfxHintId nId(rHint.GetId()); const svx::ITextProvider& rTextProvider(getTextProvider()); - if(dynamic_cast(&rBC) != nullptr) - { - SfxHintId nId(rHint.GetId()); - if(SfxHintId::DataChanged == nId) + if(SfxHintId::DataChanged == nId && dynamic_cast(&rBC) != nullptr) + { + sal_Int32 nText = rTextProvider.getTextCount(); + while (nText--) { - sal_Int32 nText = rTextProvider.getTextCount(); - while (nText--) - { - OutlinerParaObject* pParaObj = rTextProvider.getText( nText )->GetOutlinerParaObject(); - if( pParaObj ) - pParaObj->ClearPortionInfo(); - } - rObj.SetTextSizeDirty(); - - if(rObj.IsTextFrame() && rObj.NbcAdjustTextFrameWidthAndHeight()) - { - // here only repaint wanted - rObj.ActionChanged(); - //rObj.BroadcastObjectChange(); - } + OutlinerParaObject* pParaObj = rTextProvider.getText( nText )->GetOutlinerParaObject(); + if( pParaObj ) + pParaObj->ClearPortionInfo(); + } + rObj.SetTextSizeDirty(); - // #i101556# content of StyleSheet has changed -> new version - maVersion++; + if(rObj.IsTextFrame() && rObj.NbcAdjustTextFrameWidthAndHeight()) + { + // here only repaint wanted + rObj.ActionChanged(); + //rObj.BroadcastObjectChange(); } - if(SfxHintId::Dying == nId) + // #i101556# content of StyleSheet has changed -> new version + maVersion++; + } + else if(SfxHintId::Dying == nId && dynamic_cast(&rBC) != nullptr) + { + sal_Int32 nText = rTextProvider.getTextCount(); + while (nText--) { - sal_Int32 nText = rTextProvider.getTextCount(); - while (nText--) - { - OutlinerParaObject* pParaObj = rTextProvider.getText( nText )->GetOutlinerParaObject(); - if( pParaObj ) - pParaObj->ClearPortionInfo(); - } + OutlinerParaObject* pParaObj = rTextProvider.getText( nText )->GetOutlinerParaObject(); + if( pParaObj ) + pParaObj->ClearPortionInfo(); } } - else if(dynamic_cast(&rBC) != nullptr) + else if (nId == SfxHintId::StyleSheetModified && dynamic_cast(&rBC) != nullptr) { const SfxStyleSheetModifiedHint* pExtendedHint = dynamic_cast(&rHint); - - if(pExtendedHint - && SfxHintId::StyleSheetModified == pExtendedHint->GetId()) + if (pExtendedHint) { const OUString& aOldName(pExtendedHint->GetOldName()); OUString aNewName(pExtendedHint->GetStyleSheet()->GetName()); -- cgit v1.2.3