diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-09-23 15:38:12 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2019-10-04 15:40:38 +0200 |
commit | e0a5f170b2a9d4b829e173c4c6619ec0527a609d (patch) | |
tree | 1d0f711ef2236f2686e4444c5f55c72dba853ef0 /sw/source | |
parent | 8f35d65bf3ad781bd38477a5770d5855322e0bf6 (diff) |
Resolves: tdf#127695 IsGroupObject == true doesn't mean its a SdrObjGroup
but that it has a SubList
Change-Id: I473464de5c6bba5c36be1ad7cbd21a3158645d66
Reviewed-on: https://gerrit.libreoffice.org/79412
Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
Tested-by: Xisco Faulí <xiscofauli@libreoffice.org>
(cherry picked from commit e6c07d2018d0b6be7492664fa22f70461b1422b8)
Reviewed-on: https://gerrit.libreoffice.org/79428
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/doc/doclay.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx index fb7c6d29436a..b8c91b4965fa 100644 --- a/sw/source/core/doc/doclay.cxx +++ b/sw/source/core/doc/doclay.cxx @@ -1305,10 +1305,12 @@ static void lcl_SetNumUsedBit(std::vector<sal_uInt8>& rSetFlags, size_t nFormatS // contents for name collision check if (rObj.IsGroupObject()) { - const SdrObjGroup &rGroupObj = static_cast<const SdrObjGroup&>(rObj); - for (size_t i = 0, nCount = rGroupObj.GetObjCount(); i < nCount; ++i) + const SdrObjList* pSub(rObj.GetSubList()); + assert(pSub && "IsGroupObject is implented as GetSubList != nullptr"); + const size_t nCount = pSub->GetObjCount(); + for (size_t i = 0; i < nCount; ++i) { - SdrObject* pObj = rGroupObj.GetObj(i); + SdrObject* pObj = pSub->GetObj(i); if (!pObj) continue; lcl_SetNumUsedBit(rSetFlags, nFormatSize, nNmLen, *pObj, rCmpName); |