https://bugs.documentfoundation.org/show_bug.cgi?id=156993

--- Comment #4 from Regina Henschel <[email protected]> ---
The problem is in
https://opengrok.libreoffice.org/xref/core/svx/source/sdr/contact/viewcontactofsdrpage.cxx?r=33b7d622#521
514  sal_uInt32 ViewContactOfSdrPage::GetObjectCount() const
515  {
516      // Fixed count of content. It contains PageBackground (Wiese),
PageShadow, PageFill,
517      // then - depending on if the page has a MasterPage - either
MasterPage Hierarchy
518      // or MPBGO. Also OuterPageBorder, InnerPageBorder and two pairs of
Grid and Helplines
519      // (for front and back) which internally are visible or not depending
on the current
520      // front/back setting for those.
521      return 10;
522  }

The returned value 10 is used for the upper limit in the for-loop in
https://opengrok.libreoffice.org/xref/core/svx/source/sdr/contact/viewobjectcontact.cxx?r=33b7d622#566
566  void ViewObjectContact::getPrimitive2DSequenceSubHierarchy(DisplayInfo&
rDisplayInfo, drawinglayer::primitive2d::Primitive2DDecompositionVisitor&
rVisitor) const
567  {
568      ViewContact& rViewContact = GetViewContact();
569      const sal_uInt32 nSubHierarchyCount(rViewContact.GetObjectCount());
570  
571      for(sal_uInt32 a(0); a < nSubHierarchyCount; a++)
572          rViewContact.getPrimitive2DSequenceHierarchyOfIndex(a,
rDisplayInfo, GetObjectContact(), rVisitor);
573  }

So the loop goes from a=0 to a=9 and therefore never reaches the case 10 in
https://opengrok.libreoffice.org/xref/core/svx/source/sdr/contact/viewcontactofsdrpage.cxx?r=33b7d622#524
ViewContactOfSdrPage::GetViewContact(sal_uInt32 nIndex)

The list in the comment #516 to #520 misses the case 8: return
const_cast<ViewContactOfPageHierarchy&>(maViewContactOfPageHierarchy);

Armin: Is there any reason not to simply reset the value to 11?

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to