Bug 99362 - Frame and image with no wrapping appearing as if they are floating in 2007 DOCX
Summary: Frame and image with no wrapping appearing as if they are floating in 2007 DOCX
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected) release
Hardware: All All
: low normal
Assignee: Not Assigned
Whiteboard: interoperability
Keywords: bibisected, bisected, filter:docx, regression
Depends on:
Blocks: VML-Textbox
  Show dependency treegraph
Reported: 2016-04-17 14:48 UTC by Yousuf Philips (jay) (retired)
Modified: 2020-11-25 13:08 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:

sample (210.64 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2016-04-17 14:48 UTC, Yousuf Philips (jay) (retired)
w/frame (482.76 KB, image/jpeg)
2016-04-17 15:31 UTC, Call_me_Tom
w/o frame (477.32 KB, image/jpeg)
2016-04-17 15:32 UTC, Call_me_Tom

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Philips (jay) (retired) 2016-04-17 14:48:50 UTC
Created attachment 124432 [details]

1) open attached file
2) scroll to page 3 and notice the floating frame around the image
3) select and delete the frame and notice that image is floating
4) select and delete the image
5) undo and notice that the image is now correctly non-wrapped
6) undo and notice that the frame is now correctly non-wrapped

Regression as this doesnt happen in

Build ID: 92d7fef02574051826e46a3a7e3d33a1afa062d7
CPU Threads: 2; OS Version: Linux 4.2; UI Render: default; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2016-04-14_03:19:54
Locale: en-US (en_US.UTF-8)
Comment 1 Call_me_Tom 2016-04-17 15:31:08 UTC
I'm unable to replicate. See attached screens shots and let me know if that is the issue you're experiencing.

Build ID: b87c4d8a7539c6b36250adc5626f13458a4c3016
CPU Threads: 4; OS Version: Mac OS X 10.11.4; UI Render: default; 
TinderBox: MacOSX-x86_64@49-TDF, Branch:master, Time: 2016-04-06_06:14:15
Locale: en-US (en.UTF-8)
Comment 2 Call_me_Tom 2016-04-17 15:31:54 UTC
Created attachment 124433 [details]
Comment 3 Call_me_Tom 2016-04-17 15:32:22 UTC
Created attachment 124434 [details]
w/o frame
Comment 4 V Stuart Foote 2016-04-17 19:29:40 UTC
@Jay, *

On Windows 10 Pro 64-bit en-US with
Version: (x64)
Build ID: d3bf12ecb743fc0d20e0be0c58ca359301eb705f
CPU Threads: 8; OS Version: Windows 6.19; UI Render: default; 
Locale: en-US (en_US)

what I notice is on filter import opening the anchor for the image on page 3 is positioned outside margins and off the canvas! That is not good.

To see, open and before any changes, adjust the zoom. Then scroll to page 3.

Select the image. 

Check its format, it shows as anchored to character--but the anchor is off the canvas. Simply move the anchor for the image, anchor jumps into the margins. Change the anchor to paragraph.

So, suspect an issue with ww8 filter import, or possibly original source of the .docx document.
Comment 5 raal 2016-04-18 15:15:20 UTC
Version:; win7
problem is in anchor, comment 4.
Comment 6 Xisco Faulí 2016-08-31 11:10:40 UTC
Regression introduced in range 2932d2db599c09ecce3faa2d627e9ee4f251183a..393c51cee8bc3de5a2a9f4e04161c59e8712f631
Comment 7 Yousuf Philips (jay) (retired) 2016-08-31 15:47:17 UTC
(In reply to V Stuart Foote from comment #4)
> So, suspect an issue with ww8 filter import, or possibly original source of
> the .docx document.

Checked the file in Word 2010 and both the frame and image were set to 'top and bottom' wrapping. The frame had 0" horizontal absolute position to the right of column and -0.48" vertical absolute position below paragraph.
Comment 8 Xisco Faulí 2016-09-02 10:21:59 UTC
Issue introduced by

commit 049e84125fb76f7a1a051d7cac2e04e37a7cd190
Author:     Sushil Shinde <sushilshinde@libreoffice.org>
AuthorDate: Mon Apr 20 00:45:06 2015 +0530
Commit:     Caolán McNamara <caolanm@redhat.com>
CommitDate: Thu Apr 30 08:32:11 2015 +0000

Adding Sushi and Caolan as CC.
Comment 9 QA Administrators 2017-12-10 16:39:52 UTC Comment hidden (obsolete)
Comment 10 Timur 2018-02-20 11:47:49 UTC
Repro in 6.1+ but only with original 2007 DOCX. Same file saved in MSO 2013 wraps right.
Looks like an issue "position that's relative to column in Word" as in Bug 35334.
Comment 11 QA Administrators 2019-10-11 02:35:52 UTC Comment hidden (obsolete)
Comment 12 NISZ LibreOffice Team 2020-09-08 10:58:56 UTC
These are originally VML text boxes that are imported as frames.

In current 7.1 alpha I see the vertical alignment settings of the shapes are not correctly mapped to frame alignment settings.
This causes the Figure 1 group (not a real group, just two text boxes and an image placed on top of each other) to go from the top of the fourth page to the bottom of the third. 
Also the Table 1 goes for the same reason from the top of the fifth page to the middle of the fourth (and the middle of the numbered list).

The Table 1 also has a bit of conflicting text formatting: there is 10 pt TNR font set with direct formatting in Word, but somehow that becomes 12 pt Cambria in Writer. This setting is coming from the "Rácsos táblázat" table style, which inherited it from its parent "Normál táblázat" style.
This makes the text a little larger, hiding the tables last row and the table caption.

Wrapping was bad until 6.4, but seems to be fixed in 7.0. But let's keep this open for the VML shape conversion & alignment issues.
Comment 13 NISZ LibreOffice Team 2020-09-08 11:20:57 UTC
Wrapping was fixed by:


author	Justin Luth <justin.luth@collabora.com>	2020-02-26 13:15:53 +0300
committer	Miklos Vajna <vmiklos@collabora.com>	2020-03-05 10:01:19 +0100

tdf#119748 sw layout: ConsiderTextWrap on initial positioning