Bug 80869 - FILEOPEN: illegal DOC DOCX with floating table and negative position to margin opens with wrong left margin as 0
Summary: FILEOPEN: illegal DOC DOCX with floating table and negative position to margi...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.1.0.4 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords: bibisected, bisected, filter:doc, filter:docx, regression
Depends on:
Blocks: DOC-Tables DOCX-Floatingtable
  Show dependency treegraph
 
Reported: 2014-07-03 19:26 UTC by Gabriel
Modified: 2023-04-21 19:46 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
original ms word document (46.00 KB, application/msword)
2014-07-03 19:26 UTC, Gabriel
Details
exported document (27.75 KB, application/pdf)
2014-07-03 19:28 UTC, Gabriel
Details
comparative screenshot MS Word Viewer vs. LibO (53.80 KB, image/png)
2014-07-06 06:37 UTC, tommy27
Details
bugdoc saved as .docx also imported incorrectly (21.84 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-11-09 19:04 UTC, Luke
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabriel 2014-07-03 19:26:55 UTC
Created attachment 102217 [details]
original ms word document

Problem description: 

Steps to reproduce:
1. open document (ms word doc 2003/xp) with a wide table inside it
2. export to pdf
3. view pdf document

Current behavior:
has a right truncated table

Expected behavior:
adjust table to page (in the original file, the table is inside page limits)
              
Operating System: All
Version: 4.2.5.2 release
Comment 1 Gabriel 2014-07-03 19:28:12 UTC
Created attachment 102218 [details]
exported document
Comment 2 tommy27 2014-07-05 05:46:18 UTC
IMHO the issue is not about PDF export... it's about file open...

I mean the .doc has a table which is shown off-center and out of bounds in LibO so if you pdf export it you will obtain the same error in the resulting pdf

can you confirm it?
Comment 3 Gabriel 2014-07-05 13:25:03 UTC
Yes, as you sed, the exported pdf looks like the opened document (I realize that after report the bug), so, the issue would be opening the document. If I change the left margin to center the table, the document look ok and the exported pdf too. Can't edit the document by hand, my process involve convert programmatically different documents into pdf through Java-UNO interface. Thank you for your time.
Comment 4 Cor Nouws 2014-07-05 21:39:07 UTC
thanks for the report - prolly already a problem in earlier versions too ?
Comment 5 tommy27 2014-07-06 06:37:56 UTC
Created attachment 102320 [details]
comparative screenshot MS Word Viewer vs. LibO

thanks Cor for summary notes change.

I post here's a screenshot and results of my tests with older releases.

that .doc file is correctly rendered in AOO 4.1 and LibO 4.0.6.2

bug appeared in 4.1.0.4 and persists in 4.4.0.0.alpha0+
Build ID: 95272e7e5b7e38753ab07dbd6503b7cfa2974842
TinderBox: Win-x86@42, Branch:master, Time: 2014-06-26_23:01:43

hence a regression of the 4.1.x branch.
needs bibisecting if not already reported before...
we should dig Bugzilla in search for duplicates.
Comment 6 Michael Stahl (allotropia) 2014-07-11 20:35:53 UTC
commit 8fe8bd6c3b5b1a539b7370f8c457fa69c061d2de
Author:     Miklos Vajna <vmiklos@suse.cz>
AuthorDate: Mon May 13 11:24:58 2013 +0200

    Related: fdo#61594 SwWW8ImplReader::StartApo: don't always start a frame


yet another one of those pesky Word floating tables...
Comment 7 Gabriel 2014-07-11 20:56:43 UTC
I did see in version 3.5 too.

(In reply to comment #4)
> thanks for the report - prolly already a problem in earlier versions too ?
Comment 8 Björn Michaelsen 2014-10-16 14:59:05 UTC Comment hidden (obsolete)
Comment 9 Xisco Faulí 2015-09-08 15:18:26 UTC
This issue is still present in

Version: 5.0.1.2
Build ID: 81898c9f5c0d43f3473ba111d7b351050be20261
Locale: es-ES (es_ES)

on Windows 7 (64-bit)
Comment 10 Robinson Tryon (qubit) 2015-12-13 11:16:16 UTC Comment hidden (obsolete)
Comment 11 Björn Michaelsen 2016-08-14 18:47:27 UTC Comment hidden (obsolete)
Comment 12 Timur 2016-08-17 13:19:35 UTC
Looks like a duplicate. 
Left margin here is table spacing in Bug 80635. 
They can all be changed manually and it's correct then.

*** This bug has been marked as a duplicate of bug 80635 ***
Comment 13 Luke 2018-11-09 19:04:05 UTC Comment hidden (obsolete)
Comment 14 Luke 2018-11-09 19:06:22 UTC
Created attachment 146508 [details]
bugdoc saved as .docx also imported incorrectly

Not a dupe of Bug 80635. Proof, when its bugdoc,attachment 146506 [details] , is saved as .docx by Word, writer *correctly* handles the margins.
Comment 15 Luke 2018-11-09 19:15:48 UTC
*** Bug 94950 has been marked as a duplicate of this bug. ***
Comment 16 QA Administrators 2019-11-20 03:50:40 UTC Comment hidden (obsolete)
Comment 17 Gabriel 2019-11-21 18:39:52 UTC
Hi all, the issue still exists. 

Example document (act2.docx) opened in LibreOffice 6.3.3.2 (Ubuntu) show it truncated on right margin like in snapshot attached to this bug report.

Best regards.
Comment 18 Justin L 2020-03-25 12:48:38 UTC
NOTE: there likely is something illegal about this document. I open it in Word 2003 and it looks good.  Looking in Table Properties - Positioning, it reports a Horizontal position of LEFT of the MARGIN. When I press OK, it changes to look the way that LO imported it.

So just viewing and approving the settings in Word changes the layout.

Thus, I'm not sure this import bug is worth fixing - especially considering that it is complicated by emulating as an inline, non-wrapped table.
Comment 19 QA Administrators 2023-01-12 03:21:12 UTC Comment hidden (obsolete)
Comment 20 Roman Kuznetsov 2023-04-21 19:46:08 UTC
the bug document looks the same as in MS Word 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

(I think we should say "thanks" to Miklos)