summaryrefslogtreecommitdiff
path: root/include/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-07-29 15:43:03 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-07-30 21:07:08 +0200
commit9bf97034601af0fd679a2d4349b6ac31be5e315d (patch)
treea0d486c0ea8014b0c7de7d83da52acb170ea8397 /include/svx
parentbc0d05bdc0dbd45c9d1605d689e5d02867ebfb74 (diff)
tdf#161846 remove one layout operations (v)
of the 6 we perform per caption Change-Id: I57b3f12ca73e08e18be4d22da74e688969ae35b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171214 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/svx')
-rw-r--r--include/svx/sdr/properties/defaultproperties.hxx6
-rw-r--r--include/svx/sdr/properties/properties.hxx9
-rw-r--r--include/svx/svdobj.hxx4
3 files changed, 14 insertions, 5 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