Bug 117187 - DOCX import -> ODF export moves paragraph
Summary: DOCX import -> ODF export moves paragraph
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.1.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.2.0
Keywords: bibisected, bisected, regression
Depends on:
Blocks: DOCX-Textbox
  Show dependency treegraph
 
Reported: 2018-04-23 16:14 UTC by Patrick Jaap
Modified: 2020-09-29 12:21 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
docx template (116.22 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-04-23 16:15 UTC, Patrick Jaap
Details
odf export (92.81 KB, application/vnd.oasis.opendocument.text)
2018-04-23 16:15 UTC, Patrick Jaap
Details
original rendering of the docx file in LO Writer (71.50 KB, application/pdf)
2018-04-23 16:15 UTC, Patrick Jaap
Details
rendering after opeing the ODF export (71.53 KB, application/pdf)
2018-04-23 16:16 UTC, Patrick Jaap
Details
PDF of odt-document (62.60 KB, application/pdf)
2018-04-24 20:23 UTC, Dieter
Details
another affected document (44.92 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-05-04 17:50 UTC, Xisco Faulí
Details
comparison MSO 2010 and LibreOffice 6.1 (582.81 KB, image/png)
2018-05-04 17:50 UTC, Xisco Faulí
Details
Document from comment #9 in Word and Writer 6.4 (323.45 KB, image/png)
2020-09-23 07:00 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Jaap 2018-04-23 16:14:29 UTC
Description:
The letter template layout changes when imported as .docx and exported as .odf.
After reopening the .odf file, the paragraph with the date is too low.

The issue can be seen as a regression introduced by my commit
 d07fc485d46f431405a3f6a002f951a08c559677

but it can be "fixed" by moving the right textbox a little and hit "undo". So there is an inconsistency between offline and online layout formatting.

  

Steps to Reproduce:
1. open the docx file
2. save as odf
3. close Writer
4. open odf file

Actual Results:  
Date is too low below the textbox and can be pulled back by moving the box and hitting "undo"

Expected Results:
Date is just below the textbox


Reproducible: Always


User Profile Reset: No



Additional Info:
Introduced by commit d07fc485d46f431405a3f6a002f951a08c559677


User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0
Comment 1 Patrick Jaap 2018-04-23 16:15:05 UTC
Created attachment 141568 [details]
docx template
Comment 2 Patrick Jaap 2018-04-23 16:15:25 UTC
Created attachment 141569 [details]
odf export
Comment 3 Patrick Jaap 2018-04-23 16:15:59 UTC
Created attachment 141570 [details]
original rendering of the docx file in LO Writer
Comment 4 Patrick Jaap 2018-04-23 16:16:23 UTC
Created attachment 141571 [details]
rendering after opeing the ODF export
Comment 5 Patrick Jaap 2018-04-23 16:23:50 UTC
The misplaced images are already reported in 
https://bugs.documentfoundation.org/show_bug.cgi?id=115094
Comment 6 Dieter 2018-04-24 20:23:36 UTC
Created attachment 141611 [details]
PDF of odt-document

I can't reproduce it with

Version: 6.1.0.0.alpha0+ (x64)
Build ID: 2325f9ac789cd12e5ecc9d239baf2558e1d678bb
CPU threads: 4; OS: Windows 10.0; UI render: GL; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-04-05_00:37:47
Locale: en-US (de_DE); Calc: CL
Comment 7 Regina Henschel 2018-04-25 20:53:13 UTC
Word has the option "Allow overlap", which is off for the text boxes. Therefore the boxes are effectively not on the position, which its settings say. LibreOffice does not have such options, but shapes can always overlap. So the position has to be recalculated on import to fake the position from Word.
Currently the original position from Word is simply copied.

I see the error in Version: 6.1.0.0.alpha0+ (x64)
Build ID: 8b34efff7a7ed13553dfe87cd2413d01c76dec1d
CPU threads: 8; OS: Windows 10.0; UI render: default; 
Locale: de-DE (de_DE); Calc: CL
Comment 8 Xisco Faulí 2018-04-27 14:15:15 UTC
> The issue can be seen as a regression introduced by my commit
> 
> d07fc485d46f431405a3f6a002f951a08c559677
> 
> but it can be "fixed" by moving the right textbox a little and hit "undo".
> So there is an inconsistency between offline and online layout formatting.
> 

Mark as a regression...
Comment 9 Xisco Faulí 2018-05-04 17:50:06 UTC
Created attachment 141892 [details]
another affected document

The behaviour is reproduced with the following file, where the second heading is in the middle because of the image while it should be aligned to the left.
Comment 10 Xisco Faulí 2018-05-04 17:50:58 UTC
Created attachment 141893 [details]
comparison MSO 2010 and LibreOffice 6.1
Comment 11 Xisco Faulí 2018-05-08 14:04:48 UTC
attachment 98962 [details] from bug 78651 is also affected
Comment 12 Patrick Jaap 2018-05-14 05:40:27 UTC
Hi, thanks for the feedback and other test files!
I will try to figure out why my commit introduces this regression.
Comment 13 Xisco Faulí 2018-08-13 17:56:32 UTC
Dear Patrick Jaap,
This bug has been in ASSIGNED status for more than 3 months without any
activity. Resetting it to NEW.
Please assigned it back to yourself if you're still working on this.
Comment 14 Patrick Jaap 2018-09-05 12:23:19 UTC
Hi Xisco!

I just looked into this bug and I cannot reproduce it any more!
It seems to be fixed in master and in 6.1.1.

Can you find out which commit resolved this issue? I want to know who I have to thank for it!
Comment 15 Patrick Jaap 2018-09-06 13:40:58 UTC
Clarification: The Bug is fixed for my original attachment #1. The other document (attachment #6) seems unchanged. Nevertheless, I will create a unit test for my document.
Comment 16 Commit Notification 2018-09-14 15:43:56 UTC
Patrick Jaap committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=4ac31078b9c46231f8ecf0409a1724749ac8c5a4

tdf#117187 unit test

It will be available in 6.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 17 Xisco Faulí 2018-10-15 08:22:30 UTC
(In reply to Patrick Jaap from comment #14)
> Hi Xisco!
> 
> I just looked into this bug and I cannot reproduce it any more!
> It seems to be fixed in master and in 6.1.1.
> 
> Can you find out which commit resolved this issue? I want to know who I have
> to thank for it!

Hi Patrick,
I missed your comment.

The issue got fixed by https://cgit.freedesktop.org/libreoffice/core/commit/?id=59f5f666a5085ae58a8dd164636a6bea47e6bddc
Comment 18 Xisco Faulí 2018-10-15 08:29:39 UTC
Hi Miklos,
Since your commit https://cgit.freedesktop.org/libreoffice/core/commit/?id=59f5f666a5085ae58a8dd164636a6bea47e6bddc fixed attachment #1, I thought you could be interested in attachment #6...
Comment 19 NISZ LibreOffice Team 2020-09-23 07:00:16 UTC
Created attachment 165784 [details]
Document from comment #9 in Word and Writer 6.4

The problem indicated in comment #9 is fixed in 6.4 since:

https://git.libreoffice.org/core/+/acfb28d572201396bbe60e3824ccab28567d6a74

author
Miklos Vajna <vmiklos@collabora.com> Tue Sep 24 10:06:49 2019 +0200 
committer
Miklos Vajna <vmiklos@collabora.com> Tue Sep 24 10:56:28 2019 +0200 

tdf#124600 sw AddVerticalFrameOffsets: fix bad wrap of half-intersecting frame
Comment 20 NISZ LibreOffice Team 2020-09-23 07:08:21 UTC
Let's close this one. The original problem was solved per comment #17 and side effects indicated in comment #9 and comment #11 (not pictured but I checked it - looks goog) are also gone.
Comment 21 Xisco Faulí 2020-09-29 12:21:10 UTC
(In reply to NISZ LibreOffice Team from comment #20)
> Let's close this one. The original problem was solved per comment #17 and
> side effects indicated in comment #9 and comment #11 (not pictured but I
> checked it - looks goog) are also gone.

Indeed, Verified in

Version: 7.1.0.0.alpha0+
Build ID: cd85546a2fbdade42f80fd3b6bd650791db9f32d
CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: x11
Locale: tr-TR (en_US.UTF-8); UI: en-US
Calc: threaded