[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - sw/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Tue Sep 24 07:30:42 UTC 2019


 sw/source/core/doc/doclay.cxx |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit e6c07d2018d0b6be7492664fa22f70461b1422b8
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Sep 23 15:38:12 2019 +0100
Commit:     Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Tue Sep 24 09:29:59 2019 +0200

    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 at libreoffice.org>
    Tested-by: Xisco Faulí <xiscofauli at libreoffice.org>

diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index 4d8775fa3514..851be6949741 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