Bug 92642 - FILEOPEN / IMPORT DOCX - Wrapping and Size of textboxes/drawing objects is wrong
Summary: FILEOPEN / IMPORT DOCX - Wrapping and Size of textboxes/drawing objects is wrong
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.2 all versions
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.1.0
Keywords: bibisected, bisected, filter:docx, regression
Depends on:
Blocks: DOCX-Textbox DOCX-Objects DOCX-Anchor-and-Text-Wrap
  Show dependency treegraph
 
Reported: 2015-07-09 07:16 UTC by Gerry
Modified: 2021-08-05 11:53 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Letterhead-wrong-import-in-LO.docx (374.33 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2015-07-09 07:16 UTC, Gerry
Details
Letterhead as PDF, exported from MS Word 2010 (464.02 KB, application/pdf)
2015-07-09 07:17 UTC, Gerry
Details
Comparison between Word 2010 and Libreoffice 5.2 (119.37 KB, image/jpeg)
2016-08-11 16:01 UTC, Xisco Faulí
Details
Comparison between Word 2013 and Libreoffice 6.5+ (109.34 KB, image/jpeg)
2020-01-24 09:42 UTC, Timur
Details
Docx source file (32.08 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2021-08-04 16:42 UTC, John
Details
pdf showing correct document layout (as exported from docx) (159.78 KB, application/pdf)
2021-08-04 16:43 UTC, John
Details
Comparison between Word 2016 and Writer 6.0 6.4 7.3+ (315.79 KB, image/png)
2021-08-05 10:19 UTC, Timur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gerry 2015-07-09 07:16:59 UTC
Created attachment 117142 [details]
Letterhead-wrong-import-in-LO.docx

Importing attached DOCX in LibreOffice results in unusable layout. Please see the PDF (generated from MS Word 2010) how the letter looks like in MS Word.


Same bad result in LO 5.0.0.2 rc and Version 4.4.2.2
Comment 1 Gerry 2015-07-09 07:17:56 UTC
Created attachment 117143 [details]
Letterhead as PDF, exported from MS Word 2010
Comment 2 Cor Nouws 2015-07-09 08:36:09 UTC
Hi Gerry,

Thanks for the report and PDF example.
I confirm the problem in 5.0.0.2

The wrapping and such of the textboxes/drawing objects is wrong.
And the height of the picture (blue line) in the footer too low.
Comment 3 Cor Nouws 2015-07-09 08:44:28 UTC Comment hidden (no-value)
Comment 4 Cor Nouws 2015-07-09 08:48:28 UTC Comment hidden (no-value)
Comment 5 Timur 2015-07-09 17:08:32 UTC
Please bear in mind that it's unlikely that bugs reported like this, "multiple problems with file", or "file looks bad", will be fixed.
Please report each issue separately, after a search for already reported bugs.
Having said that, text may be related to Bug 64372 or Bug 85728.
Comment 6 Cor Nouws 2015-07-09 19:21:10 UTC Comment hidden (no-value)
Comment 7 Cor Nouws 2015-07-09 19:21:28 UTC Comment hidden (obsolete, typo)
Comment 8 Gerry 2015-08-02 10:52:02 UTC
@Cor @Timur: Thanks for looking into the .docx import bug. 

Shall I then change the title of the bug from 

"FILEOPEN / IMPORT specific DOCX (letter head) with textbox/drawing objects -> Completely destroyed layout" 

to 

"FILEOPEN / IMPORT DOCX - Wrapping and Size of textboxes/drawing objects is wrong"

?

Is that clearer (and more focused to one problem?
Comment 9 Cor Nouws 2015-08-10 20:45:01 UTC
(In reply to Gerry from comment #8)
> @Cor @Timur: Thanks for looking into the .docx import bug. 
> 
> Shall I then change the title of the bug from 
> ...

Yes please do!
Thanks,
Cor
Comment 10 Xisco Faulí 2016-08-11 16:01:44 UTC
Created attachment 126762 [details]
Comparison between Word 2010 and Libreoffice 5.2

This issue is still reproducible with

Version: 5.2.0.4
Build ID: 066b007f5ebcc236395c7d282ba488bca6720265
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; 
Locale: es-ES (es_ES)
Comment 11 QA Administrators 2017-12-08 08:05:30 UTC Comment hidden (obsolete)
Comment 12 Gerry 2017-12-08 20:35:11 UTC
Issue does still exist.

Version: 5.4.3.2
Build ID: 1:5.4.3~rc2-0ubuntu0.16.04.1~lo1
CPU threads: 4; OS: Linux 4.4; UI render: default; VCL: gtk2; 
Locale: de-DE (de_DE.UTF-8); Calc: single
Comment 13 Gerry 2018-02-11 14:38:12 UTC
Bug still exists in LO 6.0

Version: 6.0.1.1
Build ID: 1:6.0.1~rc1-0ubuntu0.16.04.1~lo1
CPU threads: 4; OS: Linux 4.4; UI render: GL; VCL: gtk2; 
Locale: de-DE (de_DE.UTF-8)
Comment 14 QA Administrators 2019-10-11 02:36:42 UTC Comment hidden (obsolete)
Comment 15 Regina Henschel 2019-10-11 08:31:00 UTC
The problem still exists in Version: 6.4.0.0.alpha0+ (x64)
Build ID: bb6bcabda53dbd64dda43f09fab9f4ad6f34eba6
CPU threads: 8; OS: Windows 10.0; UI render: default; VCL: win; 
Locale: de-DE (en_US); UI-Language: en-US
Calc: CL
Comment 16 Timur 2020-01-24 09:42:27 UTC
Created attachment 157392 [details]
Comparison between Word 2013 and Libreoffice 6.5+

Current LO is different and better. Text box is on the right place.
This docx is compatible mode, but same is if resaved in MSO.

What remains wrong is header, shown on 1st page from 2nd page.
I think we may close this one as WFM, for the original issue of text box.

All was better in LO 4.0, both text box and header, so this is a regression from 4.2.
Reverse bibisect would be useful to see when text box were changed.
Comment 17 Aron Budea 2020-02-10 01:56:14 UTC
(In reply to Timur from comment #16)
> Reverse bibisect would be useful to see when text box were changed.
Seems like the following commit fixed that in 6.1.

https://cgit.freedesktop.org/libreoffice/core/commit/?id=49cf733effc56c09c5e2eb023120c2d3532b5b3d
author		Miklos Vajna <vmiklos@collabora.co.uk>	2018-03-05 22:09:39 +0100
committer	Miklos Vajna <vmiklos@collabora.co.uk>	2018-03-06 09:07:07 +0100

tdf#115861 DOCX import: avoid last-paragraph removal when discarding footer
Comment 18 John 2021-08-04 16:40:48 UTC
This still is not right. Lo writer .docx import still puts boxes etc in the wrong place. In 7.2.0.2 the attached PDF shows the document how it should be, exported from Word 365. It is very different to how Writer opens it.
Comment 19 John 2021-08-04 16:42:45 UTC
Created attachment 174081 [details]
Docx source file
Comment 20 John 2021-08-04 16:43:38 UTC
Created attachment 174082 [details]
pdf showing correct document layout (as exported from docx)
Comment 21 Aron Budea 2021-08-04 17:55:04 UTC
John, please open a separate bug report for what you've encountered instead of reopening an old one.
Comment 22 Timur 2021-08-05 10:19:11 UTC
Created attachment 174100 [details]
Comparison between Word 2016 and Writer 6.0 6.4 7.3+

Original example is quite fine in LO master 7.3+.
Comment 23 Timur 2021-08-05 10:57:51 UTC
Original example attachment 117142 [details] was regression from this, seen in 42max:
 7f38049c78f61f9576f01bae8febd708c59f2129 is the first bad commit
Date:   Sat Sep 5 18:31:10 2015 +0800
    source-hash-782adba4d436c65cdf85d48f28486321873b15ed
    previous source-hash-8c1d1b66904cdd95e8eec746a81cf1c57ad0e85a
    Author:     Adam Co <rattles2013@gmail.com>
    AuthorDate: Wed Jun 12 15:06:42 2013 +0300
    Commit:     Miklos Vajna <vmiklos@suse.cz>
    CommitDate: Wed Jun 19 14:31:38 2013 +0200
        fdo#64238: fix for missing footer bug