Bug 94950 - FILEOPEN: text line inside .doc file showed in wrong position
Summary: FILEOPEN: text line inside .doc file showed in wrong position
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.3.0 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: interoperability
Keywords: bibisected, bisected, filter:doc, regression
Depends on:
Blocks: DOC
  Show dependency treegraph
 
Reported: 2015-10-11 11:07 UTC by Nikos Platis
Modified: 2023-05-19 12:35 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
The doc file demonstrating the bug (102.50 KB, application/msword)
2015-10-11 11:07 UTC, Nikos Platis
Details
Screenshot of MS Word with the file (127.74 KB, image/png)
2015-10-11 11:08 UTC, Nikos Platis
Details
Screenshot of LO Writer with the file (116.54 KB, image/png)
2015-10-11 11:09 UTC, Nikos Platis
Details
The file demonstrating the bug saved as .docx with Word 2016 (76.25 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-11-09 19:15 UTC, Luke
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nikos Platis 2015-10-11 11:07:44 UTC
Created attachment 119501 [details]
The doc file demonstrating the bug

The attached document has an image, a title and a table (in that order). However, in LO I see the table (not entirely, covered by the image), the image and the title.

Let me note that if I upload the file to Google Docs, it is displayed correctly from their viewer.
Comment 1 Nikos Platis 2015-10-11 11:08:28 UTC
Created attachment 119502 [details]
Screenshot of MS Word with the file
Comment 2 Nikos Platis 2015-10-11 11:09:02 UTC
Created attachment 119503 [details]
Screenshot of LO Writer with the file
Comment 3 tommy27 2015-10-11 13:02:19 UTC
tested under Win8.1 x64

OOo 3.3.0 correctly rendered the .doc file as MS Word

there are 2 position bugs here.

first one is the "2015 – 2016 MSc CultTech Students" text position which is shown below the table since LibO 3.3.4 ( I don't have earlier releases to test)

second one is the position of the "CulTech image banner" which is correctly shown at the top of the page until LibO 4.0.6 and starts displaced at the bottom since LibO 4.1.0

I will split this report in 2 different reports.
let's keep this one for the text position

I'll post later a link to the new report about the image position
Comment 4 tommy27 2015-10-11 13:11:28 UTC
here it is: Bug 94955
Comment 5 tommy27 2015-10-11 13:12:53 UTC
both bug persist in LibO 5.1.0.0.alpha1+ too

Build ID: f830600ece806ec365a4839e79afabe183c5e36d
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2015-10-06_22:49:09
Locale: it-IT (it_IT)
Comment 6 Nikos Platis 2015-10-12 06:04:59 UTC
Interesting: While bibisecting the spinned-off bug 94955, I found out that in 

Version: 4.1.0.0.alpha0+
Build ID: 688f72e3a2c3ef923389bbd21f6aea3afe1114d

and  in

Version: 4.1.0.0.alpha1+
Build ID: 2ede6c95e6481c92cc199e7d74fd36c84163630

the page appears completely correctly.
Comment 7 V Stuart Foote 2015-10-24 15:04:49 UTC
Hmm, here is an interesting twist.

Open attachment 119501 [details] in MS Word 2007, and Save-as ODF .odt

Reopen in MS Word 2007 -- the result? In MS Word it has the same malformed layout as seen in the LibreOffice flavors back to the opening release. I checked back to 3.3.0.4.

So, beside MS handling the filter conversion to OpenDocument Text with the same misformatting--the real issue seems to be with conversion positioning for the graphic, and positioning for the table. 

With the .DOC open in Word 2007 (Format Picture -> Layout -> Advanced -> Picture Position), the graphic has a Vertical absolute position -.37" below Paragraph, and a "Move object with Text" check-box enabled. The "Paragraph" seems to be the first of five--with the fifth holding the only text.

Also in Word 2007 the Table properties (Ribon Layout -> Table -> Properties: Table Properties -> Table -> Positioning: Table Positioning dialog) show Horizontal position Left relative to Margin. And Vertical position 2.5" relative to **PAGE**. Overlap is allowed, but the "Move with text" is unchecked.

When open in Word 2007 or in any LibreOffice build--either the MS Office saved .ODT or LO filter opening of the .DOC--the graphic is anchored to a Character (not Paragraph)--in first Paragraph. And the table is anchored to paragraph (but which one?)--its position now is Horizontal -.08" from Left margin of Page text area--while Vertical is set 2.50" from Top of Entire Page--with "Follow text flow" unchecked. Interesting in Word 2007 that the Table Properties -> Position Dialog is not available for .ODT Tables.

Someone more versed in our ww8 filter would need to comment, but to me this is a really strangely formatted MS binary document! It is no wonder that MS Word 2007 and LibreOffice builds get strange results parsing for use in ODF. 

Not a regression, and rather a corner case. Is it even our bug?
Comment 8 V Stuart Foote 2015-10-24 15:05:33 UTC
commented over on see also bug 94955
Comment 9 V Stuart Foote 2015-10-24 15:08:30 UTC
(In reply to V Stuart Foote from comment #8)
> commented over on see also bug 94955

oops, intended to make that entry on the see also--not here
Comment 10 Aron Budea 2016-08-15 00:02:20 UTC
Still buggy in v5.2.0.4.
Comment 11 Xisco Faulí 2016-09-20 12:26:20 UTC
Adding keyword 'bibisectRequest'.
Comment 12 Kevin Suo 2017-03-09 14:26:48 UTC
(In reply to Xisco Faulí from comment #11)

Bibisecting using the "releases" repo suggests that libreoffice-3.3.0 is the first version the bug (i.e., the text position bug, not the image bug) appears.

The text position shows correct in the "oldest" version (i.e., the OpenOffice.org version).

Revise the version field accordingly.

Further bibisecting needs the old old bibisect repo which I failed to download. Wondering if it is really needed?
Comment 13 Xisco Faulí 2017-03-10 13:10:34 UTC
(In reply to Kevin Suo from comment #12)
> (In reply to Xisco Faulí from comment #11)
> 
> Bibisecting using the "releases" repo suggests that libreoffice-3.3.0 is the
> first version the bug (i.e., the text position bug, not the image bug)
> appears.
> 
> The text position shows correct in the "oldest" version (i.e., the
> OpenOffice.org version).
> 
> Revise the version field accordingly.
> 
> Further bibisecting needs the old old bibisect repo which I failed to
> download. Wondering if it is really needed?

I'm afraid that's not true. I've just bisected it with bisect-41max and it pointed me to 8fe8bd6c3b5b1a539b7370f8c457fa69c061d2de which is the same as in bug 80635

*** This bug has been marked as a duplicate of bug 80635 ***
Comment 14 Luke 2018-11-09 19:15:31 UTC
Created attachment 146509 [details]
The file demonstrating the bug saved as .docx with Word 2016

This is another case of both the .doc and .docx files suffering from the exact same import error. Likely a dupe of bug 80869.
Comment 15 Luke 2018-11-09 19:15:48 UTC

*** This bug has been marked as a duplicate of bug 80869 ***
Comment 16 Justin L 2020-03-28 07:41:39 UTC

*** This bug has been marked as a duplicate of bug 80717 ***
Comment 17 Justin L 2023-05-19 12:35:28 UTC
fixed by 7.6 commit 61be351ac83acec75788d2f79a9038486163160f
Author: Miklos Vajna on Thu Apr 20 08:13:12 2023 +0200
    sw floattable: import floating tables from DOC as split flys by default