Bug 105035 - FILEOPEN DOCX changed framePr: Two frames, anchored to the same paragraph, imported as a single frame (comment 7)
Summary: FILEOPEN DOCX changed framePr: Two frames, anchored to the same paragraph, im...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.6.0
Keywords:
: 127622 (view as bug list)
Depends on:
Blocks: DOCX-Frames 154703
  Show dependency treegraph
 
Reported: 2017-01-01 22:57 UTC by Xisco Faulí
Modified: 2023-04-13 10:54 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of the minimized document in Writer before and after saving (155.44 KB, image/png)
2020-05-18 10:08 UTC, NISZ LibreOffice Team
Details
Minimized document (22.60 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-05-18 10:08 UTC, NISZ LibreOffice Team
Details
TRANS-JOUR_min2.docx: modified example, where the two frames overlap (14.51 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2023-04-05 12:37 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2017-01-01 22:57:03 UTC Comment hidden (obsolete)
Comment 1 Xisco Faulí 2017-01-01 22:58:19 UTC Comment hidden (obsolete)
Comment 2 QA Administrators 2018-05-08 02:32:22 UTC Comment hidden (obsolete)
Comment 3 Timur 2020-02-06 12:30:39 UTC Comment hidden (obsolete)
Comment 4 NISZ LibreOffice Team 2020-05-18 10:08:17 UTC Comment hidden (obsolete)
Comment 5 NISZ LibreOffice Team 2020-05-18 10:08:39 UTC
Created attachment 160973 [details]
Minimized document
Comment 6 NISZ LibreOffice Team 2020-05-18 10:11:13 UTC
Another fun detail (probably for a separate bug): The original document has two frames after each other, anchored to the same paragraph. 
These are imported as a single frame, with the alignment etc settings of the first and combined text of both.
Comment 7 NISZ LibreOffice Team 2020-09-02 13:02:27 UTC
The export wrap of the frame is now fixed with bug #133924

We can keep this one for the part where two frames become one on import.
Comment 8 Timur 2020-09-02 13:18:55 UTC Comment hidden (no-value)
Comment 9 Justin L 2022-02-10 09:20:13 UTC
The bibisect/regression information is now obsolete. I tested the two frames combining into one with LO 3.5 and it was already happening at that time, so likely inherited from OOo.
Comment 10 Justin L 2023-03-15 19:39:49 UTC
*** Bug 127622 has been marked as a duplicate of this bug. ***
Comment 11 Justin L 2023-03-15 19:42:08 UTC
The two frames are different because style Cm has a <w:framePr w:w="9360" while style Authors has a <w:framePr w:w="9072"
Comment 12 Justin L 2023-04-05 12:37:32 UTC
Created attachment 186488 [details]
TRANS-JOUR_min2.docx: modified example, where the two frames overlap

Even though the original file (TRANS-JOUR_min.docx) has two framePr's that have the same vertical distance of 0, they don't overlap. However, in this version2, it does overlap (in MS Word 2010), but only until you look at the properties of the bigger frame and then hit OK. So Word is a bit flaky in how it lays out frames. Great.
Comment 13 Commit Notification 2023-04-12 07:15:34 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

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

tdf#105035 tdf#127622 writerfilter framePr: compare using style info

It will be available in 7.6.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 14 Commit Notification 2023-04-13 06:19:45 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

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

tdf#105035 writerfilter framePr: don't allow overlap in extreme case

It will be available in 7.6.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 15 Justin L 2023-04-13 10:54:46 UTC
I'll mark this as fixed and close it.

There is still a problem - the order of the frames is reversed. But I don't know what could be done about that. After all, the frames really ought to overlap - since they specify the same X,Y coordinates. The only reason one "should" come before the other is because it is defined first.

I assume our layout code just finds the shorter one and the larger one ends up second. In any case, it will be layout/wrap related code.

Better to just have the user move things around and export proper coordinates.