Bug 116854 - FILEOPEN DOCX: Floating table with 75,4% width in MSO opens 100% width in LO
Summary: FILEOPEN DOCX: Floating table with 75,4% width in MSO opens 100% width in LO
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.1 all versions
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:docx
Depends on:
Blocks: DOCX-Anchor-and-Text-Wrap DOCX-Floatingtable
  Show dependency treegraph
 
Reported: 2018-04-06 22:28 UTC by Jon LaBadie
Modified: 2023-04-21 20:11 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Document causing the problem (83.00 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-04-06 22:35 UTC, Jon LaBadie
Details
Exported PDF (from Word) (401.93 KB, application/pdf)
2018-04-08 19:22 UTC, Aron Budea
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jon LaBadie 2018-04-06 22:28:29 UTC
Description:
I received the attached document which seems to display the actual pages 1-3 all
as page 1.

Steps to Reproduce:
1.Either open the attached .docx file with libreoffice, writer, or convert headless to odt.
2.
3.

Actual Results:  
Tables and pagination do not match those in Word 2010.

Expected Results:
Formatting that approximates those in Word.  Certainly not a 4 page document
from a 6 page source


Reproducible: Always


User Profile Reset: No



Additional Info:


User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0
Comment 1 Jon LaBadie 2018-04-06 22:35:26 UTC
Created attachment 141181 [details]
Document causing the problem
Comment 2 Aron Budea 2018-04-08 01:14:50 UTC
The document looks better in LO 6.0.3.2, but the table with the addresses still overlaps the form (I suspect because it's a floating table).
A new issue is that it opens as 10 pages instead of 6, I opened a separate ticket, bug 116872 on that.
Comment 3 Eyal Rozenberg 2018-04-08 08:39:59 UTC
1. Please attach screenshots of the first page or two from MS-Word.
2. The "table with the addresses" is not a table at all, it's just a textbox.
3. I'm not sure the way the file is opened in LO is necessarily a bug. Its XML within document.xml is:

<v:shape id="Text Box 3" o:spid="_x0000_s1026" type="#_x0000_t202" style="position:absolute;margin-left:449.35pt;margin-top:33.9pt;width:2in;height:0;z-index:251659264;visibility:visible;mso-wrap-style:square;mso-position-horizontal-relative:page;mso-position-vertical-relative:page;v-text-anchor:top" filled="f" stroked="f">
<v:textbox style="mso-next-textbox:#Text Box 3;mso-rotate-with-shape:t;mso-fit-shape-to-text:t" inset="0,0,0,0">
... etc. etc. ...
</v:textbox>
<w10:wrap type="square" anchorx="page" anchory="page"/>
</v:shape>

I'm not an expert on OOXML; are you certain LibreOffice is getting this wrong?
Comment 4 Aron Budea 2018-04-08 19:21:27 UTC
(In reply to Eyal Rozenberg from comment #3)
> 1. Please attach screenshots of the first page or two from MS-Word.
Sure, attaching the exported PDF.

> 2. The "table with the addresses" is not a table at all, it's just a textbox.
Fair enough, however the problem isn't with the text box, but with the table.

> I'm not an expert on OOXML; are you certain LibreOffice is getting this
> wrong?
I'll let devs who know more about OOXML decide that, generally we can take MS Office as reference.
Comment 5 Aron Budea 2018-04-08 19:22:14 UTC
Created attachment 141209 [details]
Exported PDF (from Word)
Comment 6 Xisco Faulí 2018-04-10 18:20:56 UTC
it seems that the document has been always broken in LibreOffice
Although in LibreOffice 3 the table is correctly displayed
Comment 7 Timur 2018-10-10 16:25:39 UTC
Cause is that floating table with 75,4% width in MSO opens 100% width in LO.
If not floating it keeps the width.
And consequence is that it overlaps with textbox.
This is 2007 DOCX but regardless.
Comment 8 Silvestr VS 2022-05-04 22:13:35 UTC
Partially reproducible in 

Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: 465c3ad95059f0efa13c8027f7383c4d20a5b2ff
CPU threads: 4; OS: Linux 5.15; UI render: default; VCL: kf5 (cairo+xcb)
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded

The document does not look exactly as the PDF, though it does span to 6 pages almost as expected.
However the blue box with addresses is still pushed away to page 2, so the issue described by Timur in comment #7 still exists.
Comment 9 Justin L 2023-03-15 14:36:36 UTC
I suspect this may be fixed when we no longer convert page-wide floating tables into regular tables. (bug 65509)
Comment 10 Roman Kuznetsov 2023-04-21 20:11:34 UTC
The document looks the same as in attached PDF 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

closed as WFM