summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2020-05-05 20:11:15 +0200
committerJulien Nabet <serval2412@yahoo.fr>2020-05-15 13:09:07 +0200
commitc7709eb11cddc37883d1a2391a1dd83f03f5cfa3 (patch)
treeb129b17376468284429ae57742e6413867fd3a34
parent8d4dee8ee96c27454968d19518153ca892194a77 (diff)
tdf#132730: fix assertion on group
See bt here: https://bugs.documentfoundation.org/attachment.cgi?id=160397 Implement GroupProperties::ClearObjectItem Change-Id: I967f8bda6e4a4edaccdb4a0bd2150bb2af2c1316 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93512 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
-rw-r--r--svx/source/sdr/properties/groupproperties.cxx17
1 files changed, 15 insertions, 2 deletions
diff --git a/svx/source/sdr/properties/groupproperties.cxx b/svx/source/sdr/properties/groupproperties.cxx
index a2772bb63c4e..4ccd517f4d82 100644
--- a/svx/source/sdr/properties/groupproperties.cxx
+++ b/svx/source/sdr/properties/groupproperties.cxx
@@ -140,9 +140,22 @@ namespace sdr::properties
assert(!"GroupProperties::SetObjectItemDirect() should never be called");
}
- void GroupProperties::ClearObjectItem(const sal_uInt16 /*nWhich*/)
+ void GroupProperties::ClearObjectItem(const sal_uInt16 nWhich)
{
- assert(!"GroupProperties::ClearObjectItem() should never be called");
+ // iterate over contained SdrObjects
+ const SdrObjList* pSub(static_cast<const SdrObjGroup&>(GetSdrObject()).GetSubList());
+ OSL_ENSURE(nullptr != pSub, "Children of SdrObject expected (!)");
+ const size_t nCount(nullptr == pSub ? 0 : pSub->GetObjCount());
+
+ for(size_t a = 0; a < nCount; ++a)
+ {
+ SdrObject* pObj = pSub->GetObj(a);
+
+ if(pObj)
+ {
+ pObj->GetProperties().ClearObjectItem(nWhich);
+ }
+ }
}
void GroupProperties::ClearObjectItemDirect(const sal_uInt16 /*nWhich*/)