summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorArmin Le Grand (allotropia) <armin.le.grand.extern@allotropia.de>2023-09-28 17:44:36 +0200
committerArmin Le Grand <Armin.Le.Grand@me.com>2023-09-29 11:18:52 +0200
commitb45ab5256c9768914bcad854ce32b06caa0539b8 (patch)
treeba8a29c1ff0ebc5cb9e912a3daaeaa123190c82a /svl
parent83abd141bf41c1c8a1d4e5a894b235c842da2a07 (diff)
ITEM: Correct handling of Items in sw
...that use internally an sw::BroadcastingModify*. This caused an error/crash with the testfile ooo58307-1.sxw, thanks to Caolan to find it. For BG info please see comments in the changed sw/source/core/attr/swatrset.cxx Change-Id: Ia91fff19ffb39873c7e2bd5ff8806b95fc5ac7ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157383 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Diffstat (limited to 'svl')
-rw-r--r--svl/source/items/itemset.cxx2
-rw-r--r--svl/source/items/poolitem.cxx1
2 files changed, 2 insertions, 1 deletions
diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx
index 4f71a8aafb5e..48f0679e481d 100644
--- a/svl/source/items/itemset.cxx
+++ b/svl/source/items/itemset.cxx
@@ -159,7 +159,7 @@ SfxPoolItem const* SfxItemSet::implCreateItemEntry(SfxPoolItem const* pSource, s
// these need to be cloned
return pSource->Clone();
- if (bItemIsSetMember && IsPooledItem(pSource))//!IsPoolDefaultItem(pSource) && GetPool()->IsItemPoolable(*pSource))
+ if (pSource->isShareable() && bItemIsSetMember && IsPooledItem(pSource))//!IsPoolDefaultItem(pSource) && GetPool()->IsItemPoolable(*pSource))
{
// shortcut: if we know that the Item is already a member
// of another SfxItemSet we can just copy the pointer and increase RefCount
diff --git a/svl/source/items/poolitem.cxx b/svl/source/items/poolitem.cxx
index a4f02d19b4e3..928ac3de3430 100644
--- a/svl/source/items/poolitem.cxx
+++ b/svl/source/items/poolitem.cxx
@@ -475,6 +475,7 @@ SfxPoolItem::SfxPoolItem(sal_uInt16 const nWhich)
, m_bDeleteOnIdle(false)
, m_bStaticDefault(false)
, m_bPoolDefault(false)
+ , m_bShareable(true)
#ifdef DBG_UTIL
, m_bDeleted(false)
#endif