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

            Bug ID: 171383
           Summary: FILEOPEN DOCX: table text transferred to next cell
                    when next cell starts with a reference field
           Product: LibreOffice
           Version: 25.8.0.4 release
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Keywords: bisected, filter:docx, regression
          Severity: normal
          Priority: medium
         Component: Writer
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
            Blocks: 104444, 112969

Created attachment 206264
  --> https://bugs.documentfoundation.org/attachment.cgi?id=206264&action=edit
forum-mso-en-2596min2.docx: minimized example

This file has never worked properly, but it became worse in 25.8.0. Now the
content of the last paragraph from the A1 cell is being moved (split actually)
into the top of the next cell (B1) along with its numbering property (which
throws the numbering off completely in the original forum-mso-en-2596.docx)!

The problem is related to the multi-paragraph reference field at the start of
cell B1. By delaying the paragraph, TableManager was no longer getting the
"next paragraph" cursor change, so it was trying to start the new cell at the
last known position (the end of A1). Since that position was used for both
cells A1 and B1, it called splitNode.

The delayed creation of the multi-paragraph field (backported to 25.8) came
from
commit aa689d596c44c1c51ab9345df5d063768936fe74 
Author: Jaume Pujantell on Fri Jun 13 12:05:20 2025 +0200
    tdf#166940 sw: defer line break in ref field
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186008

AFAICS the patch itself is fine; it just used an existing mechanism that was
somewhat flawed.

Steps to reproduce:
1.) open forum-mso-en-2596min2.docx in LO.

Cell A1 should contain "1 Xyz", and cell B1 should start with "Issue 1".

Found by Collabora's mso-test


Referenced Bugs:

https://bugs.documentfoundation.org/show_bug.cgi?id=104444
[Bug 104444] [META] DOCX (OOXML) table-related issues
https://bugs.documentfoundation.org/show_bug.cgi?id=112969
[Bug 112969] [META] DOCX (OOXML) field-related issues
-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to