Bug 117447 - FILEOPEN Floating table in attached DOC(X) is lost(hidden) during import
Summary: FILEOPEN Floating table in attached DOC(X) is lost(hidden) during import
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
3.5.0 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, filter:doc, filter:docx, preBibisect, regression
: 84100 98331 (view as bug list)
Depends on:
Blocks: DOC-Tables DOCX-Floatingtable
  Show dependency treegraph
 
Reported: 2018-05-05 23:21 UTC by Aron Budea
Modified: 2023-08-18 12:51 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample in DOCX (18.45 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-05-05 23:21 UTC, Aron Budea
Details
Sample in DOC (69.00 KB, application/msword)
2018-05-05 23:22 UTC, Aron Budea
Details
PDF exported in Word (50.64 KB, application/pdf)
2018-05-05 23:25 UTC, Aron Budea
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aron Budea 2018-05-05 23:21:32 UTC
Created attachment 141911 [details]
Sample in DOCX

The attached Word document (same in DOC and DOCX formats) contains a regular and a floating table. When opened in Writer, only the regular table is shown, the floating table is lost upon import.

Observed using LO 6.1alpha1, 4.4.0.3 & 3.5.0.3 / Windows 7.
Both tables are imported in LO 3.3.0 (positioning is bad with DOCX, not with DOC).
=> regression, not bibisectable
Comment 1 Aron Budea 2018-05-05 23:22:21 UTC
Created attachment 141912 [details]
Sample in DOC
Comment 2 Aron Budea 2018-05-05 23:25:05 UTC
Created attachment 141913 [details]
PDF exported in Word

Note that the PDF only shows one table, the missing one, because the other has no borders, and they're both empty.
Comment 3 Buovjaga 2018-06-07 18:22:49 UTC
Confirmed.

Arch Linux 64-bit
Version: 6.2.0.0.alpha0+
Build ID: 67aaa98600269e6b8fa631146c3649a261369471
CPU threads: 8; OS: Linux 4.16; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group threaded
Built on June 7th 2018
Comment 4 Aron Budea 2019-01-24 17:03:34 UTC
(In reply to Aron Budea from comment #0)
> Observed using LO 6.1alpha1, 4.4.0.3 & 3.5.0.3 / Windows 7.
> Both tables are imported in LO 3.3.0 (positioning is bad with DOCX, not with
> DOC).
> => regression, not bibisectable
Also checked in bibisect-43all, and with the DOC it's already buggy in the oldest commit.

Now with the DOCX, the disappearance of the table could be bibisected with bibisect-43all, and the result is the following range:
https://cgit.freedesktop.org/libreoffice/core/log/?qt=range&q=c3aa1cefdc6521d34a2a32c20bae1593e1edb5ba..c29af1572ad15ac5199a09e5812fb8354c165329
suspecting one of the following DOCX-related changes from Miklos (on the basis that they are dealing with tables and/or DOCX):
n#775899 SwXText::convertToTextFrame fix for multi-paragraph tables
n#775899 initial docx import of w:vertAnchor inside w:tblpPr
n#775899 SwXText::convertToTextFrame fix removing fake paragraph


If it would be beneficial to have separate tickets for the DOC/DOCX case, let me know.
Comment 5 Justin L 2020-06-03 13:11:38 UTC
repro 7.1+
Table is still missing when first round-tripped by Office 2016, and when text is added to the floating table, and when the position is based on margin instead of page.

The 13 row table is definitely being read:
warn:sw.core:565509:565509:sw/source/core/table/swnewtable.cxx:2183: Line width differs from table width: 14784 current [13]: 14780
Comment 6 Justin L 2020-06-03 16:49:08 UTC
This is a "hidden" problem.  The paragraph before the table contains
<w:vanish/>
Comment 7 Justin L 2020-06-03 18:19:04 UTC
(In reply to Justin L from comment #6)
> The paragraph before the table contains <w:vanish/>
The paragraph AFTER the table contains the vanish actually.  Even worse...

The option to see hidden content is now in tools-options-writer-Formatting Aids-Hidden characters.
Comment 8 NISZ LibreOffice Team 2020-09-23 14:26:42 UTC
Adding some similar bugs about objects anchored to characters with w:vanish (hidden character) property... for inspiration.
Comment 9 QA Administrators 2023-01-12 03:20:46 UTC Comment hidden (obsolete)
Comment 10 Aron Budea 2023-01-12 05:06:53 UTC
Still in LO 7.6.0.0.alpha0+ (d993327eab0a2c9c8820c6528075b01de68b0ec6) / Ubuntu.
Comment 11 Roman Kuznetsov 2023-04-22 08:47:04 UTC
Still repro in

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 5cd9de202765e243e41416802f3e4486b8a96f16
CPU threads: 16; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: ru-RU
Calc: CL threaded
Comment 12 BogdanB 2023-04-22 08:55:11 UTC
Still repro
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 35787e07b7e83f7dcaa0c67830fcb4eded49c71f
CPU threads: 4; OS: Linux 6.2; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded
Comment 13 Justin L 2023-05-25 17:25:57 UTC
*** Bug 98331 has been marked as a duplicate of this bug. ***
Comment 14 Justin L 2023-05-31 10:47:35 UTC
*** Bug 84100 has been marked as a duplicate of this bug. ***
Comment 15 Justin L 2023-05-31 23:35:52 UTC Comment hidden (obsolete)
Comment 16 Justin L 2023-07-11 20:33:58 UTC
Some (but not all) of these have been fixed in 24.2 by
commit 79ddca4def81198e3eee42eca8aca42fef964c80
Author: Miklos Vajna on Wed Jul 5 08:33:06 2023 +0200
    sw floattable: fix lost floating table right before a table from DOC
    
    The bugdoc has a floating table, anchored in a paragraph that is hidden
    via character formatting.

Fixed:
-missing_table.doc from comment 1
-bug1.doc from bug 84100 comment 0
-grillexa2016.doc from bug 98331 comment 0
    -now the single-row table is lost underneath the now-visible floating table,
     BUT A LATER COMMIT FIXED THAT TOO.
-
NOT YET FIXED:
-floating_tables.doc from bug 119803 comment 0
-missing_table.docx from this bug, comment 0
Comment 17 Justin L 2023-07-15 22:01:20 UTC
(In reply to Justin L from comment #16)
> NOT YET FIXED:
> -floating_tables.doc from bug 119803 comment 0
confirmed still broken

> -missing_table.docx from this bug, comment 0
Fixed with commit 52d265c0d2f2638c386475e58c3ee489ccd3f06c
Author: Miklos Vajna on Thu Jul 13 08:14:42 2023 +0200
    sw floattable: fix lost floating table right before a hidden para from DOCX
Comment 18 Justin L 2023-08-18 12:51:02 UTC
Since the only thing remaining in this bug is a duplicate, lets mark this as fixed, and unmark the other as a duplicate, especially since the other is a "regression" based on the hugely problematic "W8PLCFMan::AdjustEnds deeply flawed concept wrt change tracking"