Bug 80206 - FILESAVE/LAYOUT ODT->DOC/X: misplaces graphs, even when opened in the same version of LibreOffice
Summary: FILESAVE/LAYOUT ODT->DOC/X: misplaces graphs, even when opened in the same ve...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords: filter:doc
Depends on:
Blocks: DOC
  Show dependency treegraph
 
Reported: 2014-06-19 01:10 UTC by Will Kemp
Modified: 2023-06-09 13:35 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample .doc file with a page of graphs, saved with LibreOffice Writer 4.2.4.2, showing mangled layout. (98.00 KB, application/msword)
2014-06-19 01:10 UTC, Will Kemp
Details
Original .odt file which was saved as the .doc file above (82.17 KB, application/vnd.oasis.opendocument.text)
2014-06-19 01:13 UTC, Will Kemp
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Will Kemp 2014-06-19 01:10:10 UTC
Created attachment 101327 [details]
Sample .doc file with a page of graphs, saved with LibreOffice Writer 4.2.4.2, showing mangled layout.

Problem description:
When I save a document (this particular one has a number of graphs on one page), as a Microsoft Word 97/2000/XP/2003 (.doc) file, then open it again in the same version of LibreOffice that I saved it with, the formatting is scrambled (in this particular doc, the graphs are scattered all over the place). This problem is even worse saving it as later versions of Word files.

Surely LibreOffice should be able to open files that it has saved itself and keep the formatting right?

This issue is just with reopening a file with the software that orginally saved it - I haven't tested opening with Word myself, but it's reported to be just as scrambled. However, I'm not so concerned with that - because Word has a mind of its own - what I am concerned with is that the software that saved it cannot properly display the file it created itself.

Steps to reproduce:
1. Save document as Microsoft Word 97/2000/XP/2003 (.doc)
2. Close window
3. Open previously saved .doc file again

Current behavior: Formatting is mangled

Expected behavior: Formatting should be the same as when it was saved
              
Operating System: Fedora
Version: 4.2.4.2 release
Comment 1 Will Kemp 2014-06-19 01:13:01 UTC
Created attachment 101328 [details]
Original .odt file which was saved as the .doc file above
Comment 2 ign_christian 2014-06-19 03:44:24 UTC
Hi.. I also saw some graphs/charts in page 3 misplaced to page 2 (not exactly same as attached .doc), and the captions' change to top. Saw no other problems.

Tested under 4.0.6.2 - Win7 x86
Comment 3 Cor Nouws 2014-06-19 07:17:01 UTC Comment hidden (obsolete)
Comment 4 Will Kemp 2014-06-19 23:32:58 UTC Comment hidden (obsolete)
Comment 5 penttila 2014-08-03 20:19:09 UTC
I can confirm the bug, some graphs and charts from page 3 are moved to page 2 onto the top of original text. (Maybe also other things are mixed up)

My test system:
LinuxMint 17 Cinnamon
LO 4.2.4.2  Build id.: 420m0(Build:2)

I would change Status to NEW, but I am a newbie so I don't want to do it yet!
Comment 6 Buovjaga 2014-11-26 12:57:16 UTC
Reproduced what comment 5 says -> NEW. Tweaked severity per https://wiki.documentfoundation.org/images/0/06/Prioritizing_Bugs_Flowchart.jpg

Ubuntu 14.10 64-bit Version: 4.5.0.0.alpha0+
Build ID: 6b219f012edbe069c461f4e0746898e33fa1dd49
TinderBox: Linux-rpm_deb-x86_64@46-TDF-dbg, Branch:master, Time: 2014-11-25_21:56:46
Comment 7 Buovjaga 2015-01-10 18:16:11 UTC
Already happens with 3.3.0 (tried saving .odt to .doc).

Ubuntu 14.10 64-bit
LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4
Comment 8 A (Andy) 2015-12-27 19:48:55 UTC
Reproducible with LO 5.1.0.1, Win 8.1
Comment 9 Telesto 2016-12-03 17:47:01 UTC
Reproducible with 
Version: 5.4.0.0.alpha0+
Build ID: 33f5bc54aaa7fe7aa9335726e30f9c349155e04d
CPU Threads: 4; OS Version: Windows 6.2; UI Render: default; 
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2016-12-01_23:21:05
Locale: nl-NL (nl_NL); Calc: CL
Comment 10 QA Administrators 2017-12-10 16:43:11 UTC Comment hidden (obsolete)
Comment 11 Timur 2019-09-10 14:31:24 UTC
Repro 6.4+
Comment 12 Commit Notification 2021-05-07 16:38:31 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/59d96acec8c4d9e472daa3e2c287b3a754e01817

tdf#138518 sw: layout: unbreak fdo80206-1.doc

It will be available in 7.2.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 13 Commit Notification 2021-05-08 18:43:12 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

https://git.libreoffice.org/core/commit/dcea18e66e61c6f411b9bf6498a0ffc374161484

tdf#138518 sw: layout: unbreak fdo80206-1.doc

It will be available in 7.1.4.

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

Affected users are encouraged to test the fix and report feedback.
Comment 14 Justin L 2023-05-25 01:26:35 UTC
repro 7.6+

These are captioned images. The caption frame is anchored to page in ODT, but anchored to character in DOC. (The problem must be in import, because MS Word shows these textboxes as anchored to page.)
Comment 15 Justin L 2023-05-26 13:28:41 UTC
Not sure what can really be done about this. The images are in a paragraph that spans three pages, and they are told to anchor "to page". Well, that gets a bit ambiguous, especially when you change file format, especially when there are no page breaks or anything else to ensure "pageness".
Comment 16 Justin L 2023-06-09 13:35:20 UTC
This is a poster child for layout issues. I assume one big aspect at play here is bug 95623 (dealing with multiple flies affecting layout of a single paragraph).

For DOC, it doesn't seem like a FILESAVE problem. It looks pretty good in MS Word 2010 (other than the caption switched from being at the bottom, to being at the top - also happens in LO).

DOCX is a total disaster from both MSO and LO perspective.

There is not much point in working on this bug report specifically. Too many variables. We can keep it open and celebrate when the pieces get fixed one by one.