diff options
39 files changed, 74 insertions, 64 deletions
diff --git a/include/svx/sdr/properties/defaultproperties.hxx b/include/svx/sdr/properties/defaultproperties.hxx index 54ca6c591561..15e73926b70c 100644 --- a/include/svx/sdr/properties/defaultproperties.hxx +++ b/include/svx/sdr/properties/defaultproperties.hxx @@ -57,7 +57,9 @@ namespace sdr::properties // Internally react on ItemSet changes. The given span contains changed items. // If nDeletedWhich is not 0, it indicates a deleted item. - SAL_DLLPRIVATE virtual void ItemSetChanged(std::span< const SfxPoolItem* const > aChangedItems, sal_uInt16 nDeletedWhich); + // @param bAdjustTextFrameWidthAndHeight pass false if you know it it safe to avoid the cost of doing + // text layout right now. + SAL_DLLPRIVATE virtual void ItemSetChanged(std::span< const SfxPoolItem* const > aChangedItems, sal_uInt16 nDeletedWhich, bool bAdjustTextFrameWidthAndHeight = true); // check if SfxItemSet exists bool HasSfxItemSet() const { return bool(moItemSet); } @@ -94,7 +96,7 @@ namespace sdr::properties SAL_DLLPRIVATE virtual void ClearObjectItemDirect(const sal_uInt16 nWhich) override; // set complete item set - SAL_DLLPRIVATE virtual void SetObjectItemSet(const SfxItemSet& rSet) override; + SAL_DLLPRIVATE virtual void SetObjectItemSet(const SfxItemSet& rSet, bool bAdjustTextFrameWidthAndHeight = true) override; // set a new StyleSheet and broadcast SAL_DLLPRIVATE virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr, diff --git a/include/svx/sdr/properties/properties.hxx b/include/svx/sdr/properties/properties.hxx index 0ae9a0e599ad..efcaf309676f 100644 --- a/include/svx/sdr/properties/properties.hxx +++ b/include/svx/sdr/properties/properties.hxx @@ -111,10 +111,15 @@ namespace sdr::properties // Sets all items which are on state SfxItemState::SET in rSet at the local ItemSet. // Uses AllowItemChange(), ItemChange(), PostItemChange() and ItemSetChanged() calls. - virtual void SetObjectItemSet(const SfxItemSet& rSet) = 0; + // @param bAdjustTextFrameWidthAndHeight pass false if you know it it safe to avoid the cost of doing + // text layout right now. + virtual void SetObjectItemSet(const SfxItemSet& rSet, bool bAdjustTextFrameWidthAndHeight = true) = 0; // Set merged ItemSet. Normally, this maps to SetObjectItemSet(). - virtual void SetMergedItemSet(const SfxItemSet& rSet, bool bClearAllItems = false); + // @param bAdjustTextFrameWidthAndHeight pass false if you know it it safe to avoid the cost of doing + // text layout right now. + virtual void SetMergedItemSet(const SfxItemSet& rSet, bool bClearAllItems = false, + bool bAdjustTextFrameWidthAndHeight = true); // Set single item at the local ItemSet. Uses AllowItemChange(), // ItemChange(), PostItemChange() and ItemSetChanged() calls. diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx index 33208177019b..bfc9107de165 100644 --- a/include/svx/svdobj.hxx +++ b/include/svx/svdobj.hxx @@ -602,7 +602,9 @@ public: const SfxItemSet& GetMergedItemSet() const; void SetMergedItem(const SfxPoolItem& rItem); void ClearMergedItem(const sal_uInt16 nWhich = 0); - void SetMergedItemSet(const SfxItemSet& rSet, bool bClearAllItems = false); + // @param bAdjustTextFrameWidthAndHeight pass false if you know it it safe to avoid the cost of doing + // text layout right now. + void SetMergedItemSet(const SfxItemSet& rSet, bool bClearAllItems = false, bool bAdjustTextFrameWidthAndHeight = true); const SfxPoolItem& GetMergedItem(const sal_uInt16 nWhich) const; template<class T> const T& GetMergedItem( TypedWhichId<T> nWhich ) const diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx index 88c88307ebf3..34c395803dc8 100644 --- a/sc/source/core/data/postit.cxx +++ b/sc/source/core/data/postit.cxx @@ -113,7 +113,7 @@ void ScCaptionUtil::SetExtraItems( SdrCaptionObj& rCaption, const SfxItemSet& rE aItemSet.Put( makeSdrShadowXDistItem( 100 ) ); aItemSet.Put( makeSdrShadowYDistItem( 100 ) ); - rCaption.SetMergedItemSet( aItemSet ); + rCaption.SetMergedItemSet( aItemSet, /*bClearAllItems*/false, /*bAdjustTextFrameWidthAndHeight*/false ); } /** Helper for creation and manipulation of caption drawing objects independent @@ -662,7 +662,8 @@ void ScPostIt::CreateCaptionFromInitData( const ScAddress& rPos ) const maNoteData.mxCaption->NbcSetStyleSheet(static_cast<SfxStyleSheet*>(pStyleSheet), true, /*bAdjustTextFrameWidthAndHeight*/false); if (xInitData->moItemSet) - maNoteData.mxCaption->SetMergedItemSet(*xInitData->moItemSet); + maNoteData.mxCaption->SetMergedItemSet(*xInitData->moItemSet, + /*bClearAllItems*/false, /*bAdjustTextFrameWidthAndHeight*/false); } else { diff --git a/svx/inc/sdr/properties/attributeproperties.hxx b/svx/inc/sdr/properties/attributeproperties.hxx index d536d8c200dd..19d7a0f7aa18 100644 --- a/svx/inc/sdr/properties/attributeproperties.hxx +++ b/svx/inc/sdr/properties/attributeproperties.hxx @@ -46,7 +46,7 @@ namespace sdr::properties virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = nullptr) override; // react on ItemSet changes - virtual void ItemSetChanged(std::span< const SfxPoolItem* const > aChangedItems, sal_uInt16 nDeletedWhich) override; + virtual void ItemSetChanged(std::span< const SfxPoolItem* const > aChangedItems, sal_uInt16 nDeletedWhich, bool bAdjustTextFrameWidthAndHeight = true) override; // apply the correct SfyStyleSheet from SdrObject's SdrModel virtual void applyDefaultStyleSheetFromSdrModel(); diff --git a/svx/inc/sdr/properties/captionproperties.hxx b/svx/inc/sdr/properties/captionproperties.hxx index c22032f0d146..20d2e3b0636f 100644 --- a/svx/inc/sdr/properties/captionproperties.hxx +++ b/svx/inc/sdr/properties/captionproperties.hxx @@ -31,7 +31,7 @@ namespace sdr::properties virtual SfxItemSet CreateObjectSpecificItemSet(SfxItemPool& rPool) override; // react on ItemSet changes - virtual void ItemSetChanged(std::span< const SfxPoolItem* const > aChangedItems, sal_uInt16 nDeletedWhich) override; + virtual void ItemSetChanged(std::span< const SfxPoolItem* const > aChangedItems, sal_uInt16 nDeletedWhich, bool bAdjustTextFrameWidthAndHeight = true) override; public: // basic constructor diff --git a/svx/inc/sdr/properties/cellproperties.hxx b/svx/inc/sdr/properties/cellproperties.hxx index 653c3b158a3a..f2531061b024 100644 --- a/svx/inc/sdr/properties/cellproperties.hxx +++ b/svx/inc/sdr/properties/cellproperties.hxx @@ -65,8 +65,8 @@ public: void ForceDefaultAttributes() override; - void ItemSetChanged(std::span<const SfxPoolItem* const> aChangedItems, - sal_uInt16 nDeletedWhich) override; + void ItemSetChanged(std::span<const SfxPoolItem* const> aChangedItems, sal_uInt16 nDeletedWhich, + bool bAdjustTextFrameWidthAndHeight = true) override; void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = nullptr) override; diff --git a/svx/inc/sdr/properties/circleproperties.hxx b/svx/inc/sdr/properties/circleproperties.hxx index 27ceabdea511..bb70bc814ae6 100644 --- a/svx/inc/sdr/properties/circleproperties.hxx +++ b/svx/inc/sdr/properties/circleproperties.hxx @@ -31,7 +31,7 @@ namespace sdr::properties virtual SfxItemSet CreateObjectSpecificItemSet(SfxItemPool& rPool) override; // react on ItemSet changes - virtual void ItemSetChanged(std::span< const SfxPoolItem* const > aChangedItems, sal_uInt16 nDeletedWhich) override; + virtual void ItemSetChanged(std::span< const SfxPoolItem* const > aChangedItems, sal_uInt16 nDeletedWhich, bool bAdjustTextFrameWidthAndHeight = true) override; public: // basic constructor diff --git a/svx/inc/sdr/properties/connectorproperties.hxx b/svx/inc/sdr/properties/connectorproperties.hxx index 41ec492fa40b..b0d66de6544d 100644 --- a/svx/inc/sdr/properties/connectorproperties.hxx +++ b/svx/inc/sdr/properties/connectorproperties.hxx @@ -31,7 +31,7 @@ namespace sdr::properties virtual SfxItemSet CreateObjectSpecificItemSet(SfxItemPool& rPool) override; // react on ItemSet changes - virtual void ItemSetChanged(std::span< const SfxPoolItem* const > aChangedItems, sal_uInt16 nDeletedWhich) override; + virtual void ItemSetChanged(std::span< const SfxPoolItem* const > aChangedItems, sal_uInt16 nDeletedWhich, bool bAdjustTextFrameWidthAndHeight = true) override; public: // basic constructor diff --git a/svx/inc/sdr/properties/customshapeproperties.hxx b/svx/inc/sdr/properties/customshapeproperties.hxx index 01c0ca3f0963..4f7e60f3cd43 100644 --- a/svx/inc/sdr/properties/customshapeproperties.hxx +++ b/svx/inc/sdr/properties/customshapeproperties.hxx @@ -37,7 +37,7 @@ namespace sdr::properties virtual bool AllowItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = nullptr) const override; // react on ItemSet changes - virtual void ItemSetChanged(std::span< const SfxPoolItem* const > aChangedItems, sal_uInt16 nDeletedWhich) override; + virtual void ItemSetChanged(std::span< const SfxPoolItem* const > aChangedItems, sal_uInt16 nDeletedWhich, bool bAdjustTextFrameWidthAndHeight = true) override; // react on Item change virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = nullptr) override; diff --git a/svx/inc/sdr/properties/e3dcompoundproperties.hxx b/svx/inc/sdr/properties/e3dcompoundproperties.hxx index e776abfdbc59..6dc9afd4d356 100644 --- a/svx/inc/sdr/properties/e3dcompoundproperties.hxx +++ b/svx/inc/sdr/properties/e3dcompoundproperties.hxx @@ -52,7 +52,7 @@ namespace sdr::properties virtual const SfxItemSet& GetMergedItemSet() const override; // Set merged ItemSet. Normally, this maps to SetObjectItemSet(). - virtual void SetMergedItemSet(const SfxItemSet& rSet, bool bClearAllItems = false) override; + virtual void SetMergedItemSet(const SfxItemSet& rSet, bool bClearAllItems = false, bool bAdjustTextFrameWidthAndHeight = true) override; }; } // end of namespace sdr::properties diff --git a/svx/inc/sdr/properties/e3dproperties.hxx b/svx/inc/sdr/properties/e3dproperties.hxx index 519bf904a431..4e93d5887cd9 100644 --- a/svx/inc/sdr/properties/e3dproperties.hxx +++ b/svx/inc/sdr/properties/e3dproperties.hxx @@ -32,7 +32,7 @@ namespace sdr::properties virtual SfxItemSet CreateObjectSpecificItemSet(SfxItemPool& rPool) override; // react on ItemSet changes - virtual void ItemSetChanged(std::span< const SfxPoolItem* const > aChangedItems, sal_uInt16 nDeletedWhich) override; + virtual void ItemSetChanged(std::span< const SfxPoolItem* const > aChangedItems, sal_uInt16 nDeletedWhich, bool bAdjustTextFrameWidthAndHeight = true) override; public: // basic constructor diff --git a/svx/inc/sdr/properties/e3dsceneproperties.hxx b/svx/inc/sdr/properties/e3dsceneproperties.hxx index 71b8b5972699..d1c10fc73afb 100644 --- a/svx/inc/sdr/properties/e3dsceneproperties.hxx +++ b/svx/inc/sdr/properties/e3dsceneproperties.hxx @@ -51,7 +51,7 @@ namespace sdr::properties virtual const SfxItemSet& GetMergedItemSet() const override; // Set merged ItemSet. Normally, this maps to SetObjectItemSet(). - virtual void SetMergedItemSet(const SfxItemSet& rSet, bool bClearAllItems = false) override; + virtual void SetMergedItemSet(const SfxItemSet& rSet, bool bClearAllItems = false, bool bAdjustTextFrameWidthAndHeight = true) override; // Set a single item, iterate over hierarchies if necessary. virtual void SetMergedItem(const SfxPoolItem& rItem) override; diff --git a/svx/inc/sdr/properties/emptyproperties.hxx b/svx/inc/sdr/properties/emptyproperties.hxx index e01d59bfcee8..65cc0a85c743 100644 --- a/svx/inc/sdr/properties/emptyproperties.hxx +++ b/svx/inc/sdr/properties/emptyproperties.hxx @@ -57,7 +57,7 @@ namespace sdr::properties virtual void ClearObjectItemDirect(const sal_uInt16 nWhich) override; // set complete item set - virtual void SetObjectItemSet(const SfxItemSet& rSet) override; + virtual void SetObjectItemSet(const SfxItemSet& rSet, bool bAdjustTextFrameWidthAndHeight = true) override; // set a new StyleSheet and broadcast virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr, diff --git a/svx/inc/sdr/properties/graphicproperties.hxx b/svx/inc/sdr/properties/graphicproperties.hxx index d434ec08c4cf..e1ab266ce058 100644 --- a/svx/inc/sdr/properties/graphicproperties.hxx +++ b/svx/inc/sdr/properties/graphicproperties.hxx @@ -34,7 +34,7 @@ namespace sdr::properties virtual SfxItemSet CreateObjectSpecificItemSet(SfxItemPool& rPool) override; // react on ItemSet changes - virtual void ItemSetChanged(std::span< const SfxPoolItem* const > aChangedItems, sal_uInt16 nDeletedWhich) override; + virtual void ItemSetChanged(std::span< const SfxPoolItem* const > aChangedItems, sal_uInt16 nDeletedWhich, bool bAdjustTextFrameWidthAndHeight = true) override; public: // basic constructor diff --git a/svx/inc/sdr/properties/groupproperties.hxx b/svx/inc/sdr/properties/groupproperties.hxx index 8ceb2ee348ae..a2f83af65c7c 100644 --- a/svx/inc/sdr/properties/groupproperties.hxx +++ b/svx/inc/sdr/properties/groupproperties.hxx @@ -54,7 +54,7 @@ namespace sdr::properties virtual const SfxItemSet& GetMergedItemSet() const override; // Set merged ItemSet. Normally, this maps to SetObjectItemSet(). - virtual void SetMergedItemSet(const SfxItemSet& rSet, bool bClearAllItems = false) override; + virtual void SetMergedItemSet(const SfxItemSet& rSet, bool bClearAllItems = false, bool bAdjustTextFrameWidthAndHeight = true) override; // set single item virtual void SetObjectItem(const SfxPoolItem& rItem) override; @@ -76,7 +76,7 @@ namespace sdr::properties virtual void ClearMergedItem(const sal_uInt16 nWhich) override; // set complete item set - virtual void SetObjectItemSet(const SfxItemSet& rSet) override; + virtual void SetObjectItemSet(const SfxItemSet& rSet, bool bAdjustTextFrameWidthAndHeight = true) override; // set a new StyleSheet virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr, diff --git a/svx/inc/sdr/properties/measureproperties.hxx b/svx/inc/sdr/properties/measureproperties.hxx index 64277239bfd2..7d85743489ad 100644 --- a/svx/inc/sdr/properties/measureproperties.hxx +++ b/svx/inc/sdr/properties/measureproperties.hxx @@ -31,7 +31,7 @@ namespace sdr::properties virtual SfxItemSet CreateObjectSpecificItemSet(SfxItemPool& rPool) override; // react on ItemSet changes - virtual void ItemSetChanged(std::span< const SfxPoolItem* const > aChangedItems, sal_uInt16 nDeletedWhich) override; + virtual void ItemSetChanged(std::span< const SfxPoolItem* const > aChangedItems, sal_uInt16 nDeletedWhich, bool bAdjustTextFrameWidthAndHeight = true) override; public: // basic constructor diff --git a/svx/inc/sdr/properties/pageproperties.hxx b/svx/inc/sdr/properties/pageproperties.hxx index 6045aa038f84..6ec599e80a04 100644 --- a/svx/inc/sdr/properties/pageproperties.hxx +++ b/svx/inc/sdr/properties/pageproperties.hxx @@ -70,7 +70,7 @@ namespace sdr::properties virtual void ClearObjectItemDirect(const sal_uInt16 nWhich) override; // set complete item set - virtual void SetObjectItemSet(const SfxItemSet& rSet) override; + virtual void SetObjectItemSet(const SfxItemSet& rSet, bool bAdjustTextFrameWidthAndHeight = true) override; }; } // end of namespace sdr::properties diff --git a/svx/inc/sdr/properties/rectangleproperties.hxx b/svx/inc/sdr/properties/rectangleproperties.hxx index 32ca7c230a97..bcef4f758f7a 100644 --- a/svx/inc/sdr/properties/rectangleproperties.hxx +++ b/svx/inc/sdr/properties/rectangleproperties.hxx @@ -29,7 +29,7 @@ namespace sdr::properties { protected: // react on ItemSet changes - virtual void ItemSetChanged(std::span< const SfxPoolItem* const > aChangedItems, sal_uInt16 nDeletedWhich) override; + virtual void ItemSetChanged(std::span< const SfxPoolItem* const > aChangedItems, sal_uInt16 nDeletedWhich, bool bAdjustTextFrameWidthAndHeight = true) override; public: // basic constructor diff --git a/svx/inc/sdr/properties/textproperties.hxx b/svx/inc/sdr/properties/textproperties.hxx index 24b711592ccd..980096229253 100644 --- a/svx/inc/sdr/properties/textproperties.hxx +++ b/svx/inc/sdr/properties/textproperties.hxx @@ -40,7 +40,7 @@ namespace sdr::properties virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = nullptr) override; // react on ItemSet changes - virtual void ItemSetChanged(std::span< const SfxPoolItem* const > aChangedItems, sal_uInt16 nDeletedWhich) override; + virtual void ItemSetChanged(std::span< const SfxPoolItem* const > aChangedItems, sal_uInt16 nDeletedWhich, bool bAdjustTextFrameWidthAndHeight = true) override; /// Get the TextProvider related to our SdrObject virtual const svx::ITextProvider& getTextProvider() const; diff --git a/svx/source/sdr/properties/attributeproperties.cxx b/svx/source/sdr/properties/attributeproperties.cxx index f1c57313a5ab..4b010ba978c3 100644 --- a/svx/source/sdr/properties/attributeproperties.cxx +++ b/svx/source/sdr/properties/attributeproperties.cxx @@ -270,7 +270,7 @@ namespace sdr::properties return *moItemSet; } - void AttributeProperties::ItemSetChanged(std::span< const SfxPoolItem* const > /*aChangedItems*/, sal_uInt16 /*nDeletedWhich*/) + void AttributeProperties::ItemSetChanged(std::span< const SfxPoolItem* const > /*aChangedItems*/, sal_uInt16 /*nDeletedWhich*/, bool /*bAdjustTextFrameWidthAndHeight*/) { // own modifications SdrObject& rObj = GetSdrObject(); diff --git a/svx/source/sdr/properties/captionproperties.cxx b/svx/source/sdr/properties/captionproperties.cxx index 17302effb5a1..958f9eecf080 100644 --- a/svx/source/sdr/properties/captionproperties.cxx +++ b/svx/source/sdr/properties/captionproperties.cxx @@ -62,7 +62,7 @@ namespace sdr::properties return std::unique_ptr<BaseProperties>(new CaptionProperties(*this, rObj)); } - void CaptionProperties::ItemSetChanged(std::span< const SfxPoolItem* const > aChangedItems, sal_uInt16 nDeletedWhich) + void CaptionProperties::ItemSetChanged(std::span< const SfxPoolItem* const > aChangedItems, sal_uInt16 nDeletedWhich, bool bAdjustTextFrameWidthAndHeight) { SdrCaptionObj& rObj = static_cast<SdrCaptionObj&>(GetSdrObject()); @@ -70,7 +70,7 @@ namespace sdr::properties rObj.ImpRecalcTail(); // call parent - RectangleProperties::ItemSetChanged(aChangedItems, nDeletedWhich); + RectangleProperties::ItemSetChanged(aChangedItems, nDeletedWhich, bAdjustTextFrameWidthAndHeight); } void CaptionProperties::SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr, diff --git a/svx/source/sdr/properties/circleproperties.cxx b/svx/source/sdr/properties/circleproperties.cxx index 48b38620d29e..217b9e7b257e 100644 --- a/svx/source/sdr/properties/circleproperties.cxx +++ b/svx/source/sdr/properties/circleproperties.cxx @@ -66,12 +66,12 @@ namespace sdr::properties return std::unique_ptr<BaseProperties>(new CircleProperties(*this, rObj)); } - void CircleProperties::ItemSetChanged(std::span< const SfxPoolItem* const > aChangedItems, sal_uInt16 nDeletedWhich) + void CircleProperties::ItemSetChanged(std::span< const SfxPoolItem* const > aChangedItems, sal_uInt16 nDeletedWhich, bool bAdjustTextFrameWidthAndHeight) { SdrCircObj& rObj = static_cast<SdrCircObj&>(GetSdrObject()); // call parent - RectangleProperties::ItemSetChanged(aChangedItems, nDeletedWhich); + RectangleProperties::ItemSetChanged(aChangedItems, nDeletedWhich, bAdjustTextFrameWidthAndHeight); // local changes rObj.ImpSetAttrToCircInfo(); diff --git a/svx/source/sdr/properties/connectorproperties.cxx b/svx/source/sdr/properties/connectorproperties.cxx index 667082fb4586..e5e29de75979 100644 --- a/svx/source/sdr/properties/connectorproperties.cxx +++ b/svx/source/sdr/properties/connectorproperties.cxx @@ -64,12 +64,12 @@ namespace sdr::properties return std::unique_ptr<BaseProperties>(new ConnectorProperties(*this, rObj)); } - void ConnectorProperties::ItemSetChanged(std::span< const SfxPoolItem* const > aChangedItems, sal_uInt16 nDeletedWhich) + void ConnectorProperties::ItemSetChanged(std::span< const SfxPoolItem* const > aChangedItems, sal_uInt16 nDeletedWhich, bool bAdjustTextFrameWidthAndHeight) { SdrEdgeObj& rObj = static_cast<SdrEdgeObj&>(GetSdrObject()); // call parent - TextProperties::ItemSetChanged(aChangedItems, nDeletedWhich); + TextProperties::ItemSetChanged(aChangedItems, nDeletedWhich, bAdjustTextFrameWidthAndHeight); // local changes rObj.ImpSetAttrToEdgeInfo(); diff --git a/svx/source/sdr/properties/customshapeproperties.cxx b/svx/source/sdr/properties/customshapeproperties.cxx index 7fb9bb21e33b..2626d133d1b0 100644 --- a/svx/source/sdr/properties/customshapeproperties.cxx +++ b/svx/source/sdr/properties/customshapeproperties.cxx @@ -124,10 +124,10 @@ namespace sdr::properties TextProperties::ClearObjectItemDirect( nWhich ); } - void CustomShapeProperties::ItemSetChanged(std::span< const SfxPoolItem* const > aChangedItems, sal_uInt16 nDeletedWhich) + void CustomShapeProperties::ItemSetChanged(std::span< const SfxPoolItem* const > aChangedItems, sal_uInt16 nDeletedWhich, bool bAdjustTextFrameWidthAndHeight) { // call parent - TextProperties::ItemSetChanged(aChangedItems, nDeletedWhich); + TextProperties::ItemSetChanged(aChangedItems, nDeletedWhich, bAdjustTextFrameWidthAndHeight); // update bTextFrame and RenderGeometry UpdateTextFrameStatus(true); diff --git a/svx/source/sdr/properties/defaultproperties.cxx b/svx/source/sdr/properties/defaultproperties.cxx index 40631fe7b70c..75bef5ff697c 100644 --- a/svx/source/sdr/properties/defaultproperties.cxx +++ b/svx/source/sdr/properties/defaultproperties.cxx @@ -150,7 +150,7 @@ namespace sdr::properties } } - void DefaultProperties::SetObjectItemSet(const SfxItemSet& rSet) + void DefaultProperties::SetObjectItemSet(const SfxItemSet& rSet, bool bAdjustTextFrameWidthAndHeight) { if (rSet.HasItem(XATTR_FILLBITMAP)) { @@ -195,11 +195,11 @@ namespace sdr::properties PostItemChange(rItem->Which()); } - ItemSetChanged(aPostItemChangeList, 0); + ItemSetChanged(aPostItemChangeList, 0, bAdjustTextFrameWidthAndHeight); } } - void DefaultProperties::ItemSetChanged(std::span< const SfxPoolItem* const > /*aChangedItems*/, sal_uInt16 /*nDeletedWhich*/) + void DefaultProperties::ItemSetChanged(std::span< const SfxPoolItem* const > /*aChangedItems*/, sal_uInt16 /*nDeletedWhich*/, bool /*bAdjustTextFrameWidthAndHeight*/) { } diff --git a/svx/source/sdr/properties/e3dcompoundproperties.cxx b/svx/source/sdr/properties/e3dcompoundproperties.cxx index 2d65a74983f9..5b30f0922aa9 100644 --- a/svx/source/sdr/properties/e3dcompoundproperties.cxx +++ b/svx/source/sdr/properties/e3dcompoundproperties.cxx @@ -65,7 +65,7 @@ namespace sdr::properties return E3dProperties::GetMergedItemSet(); } - void E3dCompoundProperties::SetMergedItemSet(const SfxItemSet& rSet, bool bClearAllItems) + void E3dCompoundProperties::SetMergedItemSet(const SfxItemSet& rSet, bool bClearAllItems, bool bAdjustTextFrameWidthAndHeight) { // Set scene specific items at scene E3dCompoundObject& rObj = static_cast<E3dCompoundObject&>(GetSdrObject()); @@ -92,7 +92,7 @@ namespace sdr::properties } // call parent. This will set items on local object, too. - E3dProperties::SetMergedItemSet(rSet, bClearAllItems); + E3dProperties::SetMergedItemSet(rSet, bClearAllItems, bAdjustTextFrameWidthAndHeight); } void E3dCompoundProperties::PostItemChange(const sal_uInt16 nWhich) diff --git a/svx/source/sdr/properties/e3dproperties.cxx b/svx/source/sdr/properties/e3dproperties.cxx index d7a106088e76..2cd011ffbb55 100644 --- a/svx/source/sdr/properties/e3dproperties.cxx +++ b/svx/source/sdr/properties/e3dproperties.cxx @@ -60,12 +60,12 @@ namespace sdr::properties return std::unique_ptr<BaseProperties>(new E3dProperties(*this, rObj)); } - void E3dProperties::ItemSetChanged(std::span< const SfxPoolItem* const > aChangedItems, sal_uInt16 nDeletedWhich) + void E3dProperties::ItemSetChanged(std::span< const SfxPoolItem* const > aChangedItems, sal_uInt16 nDeletedWhich, bool bAdjustTextFrameWidthAndHeight) { E3dObject& rObj = static_cast<E3dObject&>(GetSdrObject()); // call parent - AttributeProperties::ItemSetChanged(aChangedItems, nDeletedWhich); + AttributeProperties::ItemSetChanged(aChangedItems, nDeletedWhich, bAdjustTextFrameWidthAndHeight); // local changes rObj.StructureChanged(); diff --git a/svx/source/sdr/properties/e3dsceneproperties.cxx b/svx/source/sdr/properties/e3dsceneproperties.cxx index 02ef68bb36a3..bf1d4cd6f55d 100644 --- a/svx/source/sdr/properties/e3dsceneproperties.cxx +++ b/svx/source/sdr/properties/e3dsceneproperties.cxx @@ -102,7 +102,7 @@ namespace sdr::properties return E3dProperties::GetMergedItemSet(); } - void E3dSceneProperties::SetMergedItemSet(const SfxItemSet& rSet, bool bClearAllItems) + void E3dSceneProperties::SetMergedItemSet(const SfxItemSet& rSet, bool bClearAllItems, bool bAdjustTextFrameWidthAndHeight) { // Set SDRATTR_3DOBJ_ range at contained objects. const SdrObjList* pSub(static_cast<const E3dScene&>(GetSdrObject()).GetSubList()); @@ -127,14 +127,14 @@ namespace sdr::properties if(dynamic_cast<const E3dCompoundObject* >(pObj.get())) { // set merged ItemSet at contained 3d object. - pObj->SetMergedItemSet(*xNewSet, bClearAllItems); + pObj->SetMergedItemSet(*xNewSet, bClearAllItems, bAdjustTextFrameWidthAndHeight); } } } } // call parent. This will set items on local object, too. - E3dProperties::SetMergedItemSet(rSet, bClearAllItems); + E3dProperties::SetMergedItemSet(rSet, bClearAllItems, bAdjustTextFrameWidthAndHeight); } void E3dSceneProperties::SetMergedItem(const SfxPoolItem& rItem) diff --git a/svx/source/sdr/properties/emptyproperties.cxx b/svx/source/sdr/properties/emptyproperties.cxx index 79b1d240937a..6f7b0f6876e5 100644 --- a/svx/source/sdr/properties/emptyproperties.cxx +++ b/svx/source/sdr/properties/emptyproperties.cxx @@ -68,7 +68,7 @@ namespace sdr::properties assert(!"EmptyProperties::ClearObjectItemDirect() should never be called"); } - void EmptyProperties::SetObjectItemSet(const SfxItemSet& /*rSet*/) + void EmptyProperties::SetObjectItemSet(const SfxItemSet& /*rSet*/, bool /*bAdjustTextFrameWidthAndHeight*/) { assert(!"EmptyProperties::SetObjectItemSet() should never be called"); } diff --git a/svx/source/sdr/properties/graphicproperties.cxx b/svx/source/sdr/properties/graphicproperties.cxx index 7f2988650d23..90e7820f1200 100644 --- a/svx/source/sdr/properties/graphicproperties.cxx +++ b/svx/source/sdr/properties/graphicproperties.cxx @@ -94,7 +94,7 @@ namespace sdr::properties return std::unique_ptr<BaseProperties>(new GraphicProperties(*this, rObj)); } - void GraphicProperties::ItemSetChanged(std::span< const SfxPoolItem* const > aChangedItems, sal_uInt16 nDeletedWhich) + void GraphicProperties::ItemSetChanged(std::span< const SfxPoolItem* const > aChangedItems, sal_uInt16 nDeletedWhich, bool bAdjustTextFrameWidthAndHeight) { SdrGrafObj& rObj = static_cast<SdrGrafObj&>(GetSdrObject()); @@ -110,7 +110,7 @@ namespace sdr::properties rObj.ImpSetAttrToGrafInfo(); // call parent - RectangleProperties::ItemSetChanged(aChangedItems, nDeletedWhich); + RectangleProperties::ItemSetChanged(aChangedItems, nDeletedWhich, bAdjustTextFrameWidthAndHeight); } void GraphicProperties::SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr, diff --git a/svx/source/sdr/properties/groupproperties.cxx b/svx/source/sdr/properties/groupproperties.cxx index db66d2061d0f..41852c2bd42d 100644 --- a/svx/source/sdr/properties/groupproperties.cxx +++ b/svx/source/sdr/properties/groupproperties.cxx @@ -95,7 +95,7 @@ namespace sdr::properties return *moMergedItemSet; } - void GroupProperties::SetMergedItemSet(const SfxItemSet& rSet, bool bClearAllItems) + void GroupProperties::SetMergedItemSet(const SfxItemSet& rSet, bool bClearAllItems, bool bAdjustTextFrameWidthAndHeight) { // iterate over contained SdrObjects const SdrObjList* pSub(static_cast<const SdrObjGroup&>(GetSdrObject()).GetSubList()); @@ -104,7 +104,7 @@ namespace sdr::properties return; for (const rtl::Reference<SdrObject>& pObj : *pSub) // Set merged ItemSet at contained object - pObj->SetMergedItemSet(rSet, bClearAllItems); + pObj->SetMergedItemSet(rSet, bClearAllItems, bAdjustTextFrameWidthAndHeight); // Do not call parent here. Group objects do not have local ItemSets // where items need to be set. @@ -156,7 +156,7 @@ namespace sdr::properties pObj->GetProperties().ClearMergedItem(nWhich); } - void GroupProperties::SetObjectItemSet(const SfxItemSet& /*rSet*/) + void GroupProperties::SetObjectItemSet(const SfxItemSet& /*rSet*/, bool /*bAdjustTextFrameWidthAndHeight*/) { assert(!"GroupProperties::SetObjectItemSet() should never be called"); } diff --git a/svx/source/sdr/properties/measureproperties.cxx b/svx/source/sdr/properties/measureproperties.cxx index 0fc8d7c1d278..c0dcfb5dae90 100644 --- a/svx/source/sdr/properties/measureproperties.cxx +++ b/svx/source/sdr/properties/measureproperties.cxx @@ -72,12 +72,12 @@ namespace sdr::properties return std::unique_ptr<BaseProperties>(new MeasureProperties(*this, rObj)); } - void MeasureProperties::ItemSetChanged(std::span< const SfxPoolItem* const > aChangedItems, sal_uInt16 nDeletedWhich) + void MeasureProperties::ItemSetChanged(std::span< const SfxPoolItem* const > aChangedItems, sal_uInt16 nDeletedWhich, bool bAdjustTextFrameWidthAndHeight) { SdrMeasureObj& rObj = static_cast<SdrMeasureObj&>(GetSdrObject()); // call parent - TextProperties::ItemSetChanged(aChangedItems, nDeletedWhich); + TextProperties::ItemSetChanged(aChangedItems, nDeletedWhich, bAdjustTextFrameWidthAndHeight); // local changes rObj.SetTextDirty(); diff --git a/svx/source/sdr/properties/pageproperties.cxx b/svx/source/sdr/properties/pageproperties.cxx index 030d0afc4768..6b532d2d487b 100644 --- a/svx/source/sdr/properties/pageproperties.cxx +++ b/svx/source/sdr/properties/pageproperties.cxx @@ -97,7 +97,7 @@ namespace sdr::properties assert(!"PageProperties::ClearObjectItemDirect() should never be called"); } - void PageProperties::SetObjectItemSet(const SfxItemSet& /*rSet*/) + void PageProperties::SetObjectItemSet(const SfxItemSet& /*rSet*/, bool /*bAdjustTextFrameWidthAndHeight*/) { // This can be called e.g. when positioning the slide using dialog in Notes view } diff --git a/svx/source/sdr/properties/properties.cxx b/svx/source/sdr/properties/properties.cxx index 97a264712b54..612813bb1aac 100644 --- a/svx/source/sdr/properties/properties.cxx +++ b/svx/source/sdr/properties/properties.cxx @@ -56,7 +56,7 @@ namespace sdr::properties return GetObjectItemSet(); } - void BaseProperties::SetMergedItemSet(const SfxItemSet& rSet, bool bClearAllItems) + void BaseProperties::SetMergedItemSet(const SfxItemSet& rSet, bool bClearAllItems, bool bAdjustTextFrameWidthAndHeight) { // clear items if requested if(bClearAllItems) @@ -65,7 +65,7 @@ namespace sdr::properties } // default implementation falls back to SetObjectItemSet() - SetObjectItemSet(rSet); + SetObjectItemSet(rSet, bAdjustTextFrameWidthAndHeight); } void BaseProperties::SetMergedItem(const SfxPoolItem& rItem) diff --git a/svx/source/sdr/properties/rectangleproperties.cxx b/svx/source/sdr/properties/rectangleproperties.cxx index 978ab8bbf415..9242fa5f9ac5 100644 --- a/svx/source/sdr/properties/rectangleproperties.cxx +++ b/svx/source/sdr/properties/rectangleproperties.cxx @@ -42,12 +42,12 @@ namespace sdr::properties return std::unique_ptr<BaseProperties>(new RectangleProperties(*this, rObj)); } - void RectangleProperties::ItemSetChanged(std::span< const SfxPoolItem* const > aChangedItems, sal_uInt16 nDeletedWhich) + void RectangleProperties::ItemSetChanged(std::span< const SfxPoolItem* const > aChangedItems, sal_uInt16 nDeletedWhich, bool bAdjustTextFrameWidthAndHeight) { SdrRectObj& rObj = static_cast<SdrRectObj&>(GetSdrObject()); // call parent - TextProperties::ItemSetChanged(aChangedItems, nDeletedWhich); + TextProperties::ItemSetChanged(aChangedItems, nDeletedWhich, bAdjustTextFrameWidthAndHeight); // local changes rObj.SetXPolyDirty(); diff --git a/svx/source/sdr/properties/textproperties.cxx b/svx/source/sdr/properties/textproperties.cxx index 7eb9603d739e..cce8ee75fc37 100644 --- a/svx/source/sdr/properties/textproperties.cxx +++ b/svx/source/sdr/properties/textproperties.cxx @@ -81,7 +81,7 @@ namespace sdr::properties return std::unique_ptr<BaseProperties>(new TextProperties(*this, rObj)); } - void TextProperties::ItemSetChanged(std::span< const SfxPoolItem* const > aChangedItems, sal_uInt16 nDeletedWhich) + void TextProperties::ItemSetChanged(std::span< const SfxPoolItem* const > aChangedItems, sal_uInt16 nDeletedWhich, bool bAdjustTextFrameWidthAndHeight) { SdrTextObj& rObj = static_cast<SdrTextObj&>(GetSdrObject()); @@ -141,7 +141,7 @@ namespace sdr::properties std::optional<OutlinerParaObject> pTemp = pOutliner->CreateParaObject(0, nParaCount); pOutliner->Clear(); - rObj.NbcSetOutlinerParaObjectForText(std::move(pTemp),pText); + rObj.NbcSetOutlinerParaObjectForText(std::move(pTemp), pText, bAdjustTextFrameWidthAndHeight); } } } @@ -157,7 +157,7 @@ namespace sdr::properties } // call parent - AttributeProperties::ItemSetChanged(aChangedItems, nDeletedWhich); + AttributeProperties::ItemSetChanged(aChangedItems, nDeletedWhich, bAdjustTextFrameWidthAndHeight); } void TextProperties::ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem) diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index 609a0bb2364c..c28770ab2f7c 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -2019,9 +2019,9 @@ void SdrObject::SetObjectItemSet(const SfxItemSet& rSet) GetProperties().SetObjectItemSet(rSet); } -void SdrObject::SetMergedItemSet(const SfxItemSet& rSet, bool bClearAllItems) +void SdrObject::SetMergedItemSet(const SfxItemSet& rSet, bool bClearAllItems, bool bAdjustTextFrameWidthAndHeight) { - GetProperties().SetMergedItemSet(rSet, bClearAllItems); + GetProperties().SetMergedItemSet(rSet, bClearAllItems, bAdjustTextFrameWidthAndHeight); } const SfxPoolItem& SdrObject::GetObjectItem(const sal_uInt16 nWhich) const diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx index 9073266b7ab8..fb99029d6e92 100644 --- a/svx/source/table/cell.cxx +++ b/svx/source/table/cell.cxx @@ -183,7 +183,7 @@ SdrText* CellTextProvider::getText(sal_Int32 nIndex) const // deliberately do not run superclass ForceDefaultAttributes, we don't want any default attributes } - void CellProperties::ItemSetChanged(std::span< const SfxPoolItem* const > aChangedItems, sal_uInt16 nDeletedWhich) + void CellProperties::ItemSetChanged(std::span< const SfxPoolItem* const > aChangedItems, sal_uInt16 nDeletedWhich, bool bAdjustTextFrameWidthAndHeight) { SdrTextObj& rObj = static_cast<SdrTextObj&>(GetSdrObject()); @@ -252,7 +252,7 @@ SdrText* CellTextProvider::getText(sal_Int32 nIndex) const } // call parent - AttributeProperties::ItemSetChanged(aChangedItems, nDeletedWhich); + AttributeProperties::ItemSetChanged(aChangedItems, nDeletedWhich, bAdjustTextFrameWidthAndHeight); if( mxCell.is() ) mxCell->notifyModified(); |