• Miklos Vajna's avatar
    tdf#113287 sw split sections in tables: fix missing invalidation on sect del · cd74225d
    Miklos Vajna yazdı
    The problem was that the Table1:A2 cell contents was wrapped in a
    section that was first split, then all the contents was moved to the
    next page, finally the empty master was also moved to the next page. At
    this point the master had 0 height, and when it was removed, the follow
    section frame had invalid positions, including all of its contents.
    
    Position invalidation for table contents works by first invalidating the
    table frame position, which triggers an invalidation chain for both all
    next frames and the lower frame. Other lower frames are not invalidated,
    that happens when the first lower is calculated, in
    SwLayoutFrame::MakeAll(), when the SwLayNotify dtor is executed. This
    mechanism did not help us here, as the master section frame was already
    marked for deletion, so SwLayoutFrame::MakeAll() was not called for it,
    so neither of its next frames were re-positioned.
    
    Fix the bug by explicitly invalidating the position of the next frame in
    SwSectionFrame::MakeAll(), for the "return early, this section will be
    deleted anyway" case. (The alternative could be to watch out for
    0-height sections in the SwLayNotify dtor, but the problem is specific
    to section frames, so SwSectionFrame is probably a more expected place
    for this change.)
    
    Change-Id: I5ab9475675d25bef7c0647893b1b5909da019f3f
    Reviewed-on: https://gerrit.libreoffice.org/43604Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
    Tested-by: 's avatarJenkins <ci@libreoffice.org>
    cd74225d