[Libreoffice-commits] core.git: sw/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Mon Sep 23 15:51:54 UTC 2019
sw/source/core/doc/doclay.cxx | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
New commits:
commit b02f8f3f9feae18db17312eafc8b496079a5872f
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Sep 23 15:38:12 2019 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Sep 23 17:50:58 2019 +0200
IsGroupObject == true doesn't mean its a SdrObjGroup
but that it has a SubList
Change-Id: I473464de5c6bba5c36be1ad7cbd21a3158645d66
Reviewed-on: https://gerrit.libreoffice.org/79411
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index 4b228ae5d85d..7ec2417fd2de 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -1306,10 +1306,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);
More information about the Libreoffice-commits
mailing list