• Miklos Vajna's avatar
    tdf#108524 sw: split section frames inside table cells, non-split text frames · f8a76d21
    Miklos Vajna yazdı
    Commit f991b842 (tdf#108524 sw: attempt
    to split section frames inside table cells, 2017-06-19) added initial
    support for multi-page sections inside a table cell, but turns out this
    only worked in case at the split point there was a long enough
    paragraph, so it was split into two (a "master" text frame and a
    "follow" one), and then the follow was moved to the next page by
    SwContentFrame::MakeAll(), with the MoveFwd() call in the "If a Follow
    sits next to its Master and doesn't fit, we know it can be moved right
    now." block.
    
    However, if the section contains lots of one-liner text frames, then all
    of them are masters, so the above code doesn't move them to the next
    page; so the section frame is still not split. Fix the problem by
    allowing the move of frames inside table-in-sections in
    SwSectionFrame::MoveAllowed(), that way SwTextFrame::AdjustFrame() will
    not set the text frame as undersized, so at the end
    SwContentFrame::MakeAll() will call MoveFwd() in the "If a column
    section can't find any space for its first ContentFrame" block.
    
    With this the split of text frames in section-in-table frames is
    consistent regardless if they are of multiple or single lines.
    
    Change-Id: Ief9d62da3fd8a5c707e1f9489a92f7a81e7b38ac
    Reviewed-on: https://gerrit.libreoffice.org/39623Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
    Tested-by: 's avatarJenkins <ci@libreoffice.org>
    f8a76d21
uiwriter.cxx 229 KB