summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-09-23 15:38:12 +0100
committerMichael Stahl <michael.stahl@cib.de>2019-09-24 14:02:09 +0200
commitc72549d92c34e72ec9741ec6bfd137e8eec05a7b (patch)
tree24b2062e1cc768f60ca99454f66eb9e03ad4d60e
parent1e9d08d046bfe362e5e2ffeb36e35692fc3b55f5 (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>
-rw-r--r--sw/source/core/doc/doclay.cxx8
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);