[Libreoffice-commits] core.git: sd/qa sd/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Wed Apr 1 18:26:39 UTC 2020


 sd/qa/unit/data/ppt/pass/ofz21531-1.ppt |binary
 sd/source/core/sdpage2.cxx              |    4 +++-
 2 files changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 57229c65dc4ee811fb620e66173e6a4fa57fa401
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Mar 31 13:53:29 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Apr 1 20:26:05 2020 +0200

    ofz#21531 limit to ord number under total obj count
    
    which fails recently since...
    
    commit b74798941dccd8fbe05c472c868f6c9a9c9a3f4f
    Author: Julien Nabet <serval2412 at yahoo.fr>
    Date:   Mon Mar 30 09:42:08 2020 +0200
    
        Simplify SdrObjList::GetObj (svx/svdpage)
    
    commit 8bbd58eca1ead1ec2360497e0d0d1d8125815f83
    Date:   Sun Mar 29 22:44:52 2020 +0200
    
        Replace OSL_ASSERT by assert in GetObj (svx/svdpage)
    
    Change-Id: Ieaafe4af370ecb83a95246010f2a973f503d12c3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91422
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Jenkins

diff --git a/sd/qa/unit/data/ppt/pass/ofz21531-1.ppt b/sd/qa/unit/data/ppt/pass/ofz21531-1.ppt
new file mode 100644
index 000000000000..0d93e5b845ff
Binary files /dev/null and b/sd/qa/unit/data/ppt/pass/ofz21531-1.ppt differ
diff --git a/sd/source/core/sdpage2.cxx b/sd/source/core/sdpage2.cxx
index 35dd423e2372..d6b29fa96594 100644
--- a/sd/source/core/sdpage2.cxx
+++ b/sd/source/core/sdpage2.cxx
@@ -367,9 +367,11 @@ void SdPage::lateInit(const SdPage& rSrcPage)
 
     // use shape list directly to preserve constness of rSrcPage
     const std::list< SdrObject* >& rShapeList = rSrcPage.maPresentationShapeList.getList();
+    const size_t nObjCount = GetObjCount();
     for( SdrObject* pObj : rShapeList )
     {
-        InsertPresObj(GetObj(pObj->GetOrdNum()), rSrcPage.GetPresObjKind(pObj));
+        size_t nOrdNum = pObj->GetOrdNum();
+        InsertPresObj(nOrdNum < nObjCount ? GetObj(nOrdNum) : nullptr, rSrcPage.GetPresObjKind(pObj));
     }
 
     // header footer


More information about the Libreoffice-commits mailing list