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

Justin L <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://bugs.documentfounda
                   |                            |tion.org/show_bug.cgi?id=15
                   |                            |7573

--- Comment #14 from Justin L <[email protected]> ---
Fixed in 7.6.3 by commit 626fe9ab5ebebc4ef36e35f4aa597c03a3564d22
Author: Miklos Vajna on Wed Oct 18 14:20:37 2023 +0200
    tdf#157573 sw floattable: fix incorrect lack of left margin after table

    Regression from d477fa8ac1b0d3ee81427217bbb5950278ab16db (sw floattable:
    unconditionally map <w:tblpPr> to SwFormatFlySplit, 2023-03-17), the
    paragraph after the anchor of the floating table in the document lost
    its left paragraph margin at a layout level.

    Turns out the problem was there earlier, but it was hidden for this
    specific document, because we used to map DOCX floating tables to Writer
    inline tables in some cases before. The real problem was introduced
    earlier, in my 50a1df360c907d8419ce49f098b6bc87a37a9956 (n#775899 sw:
    add FloattableNomargins compat flag, 2012-08-23), even a TODO was added
    to point out this will be problematic. The old bugdoc wants to get rid
    of margins, because the floating table is already shifting text towards
    the right, the new bugdoc wants to keep the original margin as the
    paragraph after the anchor is not wrapping.

    Fix the problem by reverting the older fix and re-fix the old document
    differently. Don't do changes to the paragraph margin: that's not a good
    idea. If there is enough anchor text, it'll lead to a visibly bad
    paragraph margin anyway. Instead of reducing the paragraph margin,
    reduce the width of the fly portion in the paragraphs that intersect
    with the floating table. That's reasonly straightforward to do, because
    SwTextFormatter::CalcFlyWidth() already has a case when we know we're
    intersecting with a floating table and we also know that the floating
    table is aligned to the left. In this case we can simply reduce the fly
    portion width with the paragraph margin. This keeps the old bugdoc fixed
    and fixes the new bugdoc.

    It also means that DocumentSettingId::FLOATTABLE_NOMARGINS is now
    effectively unused, but that's not yet removed in this change.

    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158103

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

Reply via email to