Bug 81943 - FILEOPEN: RTF - Image should be placed behind table (wrap through-in background)
Summary: FILEOPEN: RTF - Image should be placed behind table (wrap through-in background)
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.2.0.4 release
Hardware: Other All
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: target:6.2.0 target:6.1.1
Keywords: bibisected, bisected, filter:rtf, regression
Depends on:
Blocks: RTF-Images
  Show dependency treegraph
 
Reported: 2014-07-31 05:44 UTC by Yousuf Philips (jay) (retired)
Modified: 2022-04-13 07:04 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
LibO 4.3.1 VS Word 2013 (135.76 KB, image/png)
2014-07-31 05:44 UTC, Yousuf Philips (jay) (retired)
Details
word 15.8 vs LO nightly (362.90 KB, image/jpeg)
2015-04-14 08:04 UTC, steve
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Philips (jay) (retired) 2014-07-31 05:44:40 UTC
Created attachment 103719 [details]
LibO 4.3.1 VS Word 2013

I downloaded < http://download.microsoft.com/documents/rus/microsoft4you/How_to_license_the_operating_system_Windows_8_new.docx > and opened it in Word 2013 and saved it as an rtf file. Then when opening the file in LibO 4.3.1 and on the first page, you will find a purple image with the microsoft logo on it above a table. This also effects 4.2.7 and master.

Steps:
1) open RTF attachment 103717 [details]
2) purple image will be above table rather than behind

The image will not appear in LibO version below 4.2, except with 3.3 which has the old RTF importer.
Comment 1 tommy27 2014-08-02 10:28:21 UTC
I confirm issue on 4.2.5.2 under Win7x64. status NEW
Comment 2 steve 2015-04-14 08:04:04 UTC
osx 10.10.3 + LO Version: 4.5.0.0.alpha0+
Build ID: 4e0d2fcdda3f639a05118b25ef99d8a4848302ce
TinderBox: MacOSX-x86_64@49-TDF, Branch:master, Time: 2015-04-13_06:20:15
Locale: de_

reproduced. But, word 15.8 looks more similar now (see screenshot)
Comment 3 steve 2015-04-14 08:04:23 UTC
Created attachment 114775 [details]
word 15.8 vs LO nightly
Comment 4 steve 2015-04-14 09:00:23 UTC
After talking to Jay, this is actually WFM.

This bug is about the purple box being above the headline text. This is no longer the case. While the headline still does not fit in the box (if you compare LO + Word you'll see that in Word the text actually fits in the purple box) the issue this bug is about does no longer exist.

Thus closing. For remaining issues, please open new bugs.
Comment 5 Robinson Tryon (qubit) 2015-12-17 12:39:05 UTC Comment hidden (obsolete)
Comment 6 Yousuf Philips (jay) (retired) 2017-10-22 22:10:51 UTC
Seems it broke in 5.1 and is the same until now.

Version: 5.1.6.2
Build ID: 07ac168c60a517dba0f0d7bc7540f5afa45f0909
CPU Threads: 2; OS Version: Linux 4.4; UI Render: default; 
Locale: en-US (en_US.UTF-8); Calc: group
Comment 7 Buovjaga 2018-07-07 18:38:02 UTC
(In reply to Yousuf Philips (jay) (retired) from comment #6)
> Seems it broke in 5.1 and is the same until now.

I bibisected on Linux with bibisect-linux-64-5.2 and the bad result had the image shrunken to the top left corner. I did, however, resize it and it went over the text.

commit 785f34cdaf56348aa08f8b698e895347fc5b1495 in the repo and source commit:
https://cgit.freedesktop.org/libreoffice/core/commit/?id=015fd55c94b7b650ed8e572cafaf3b0f903b01b9

tdf#96275 RTF import: fix anchor of shapes inside tables
Table text is buffered, so buffer the shape import as well, otherwise
the anchor will precede the buffered text -> incorrect anchor position.

Adding Cc: to Miklos Vajna
Comment 8 Commit Notification 2018-07-17 07:04:55 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=0c91f8f839d36c8b5af272b1d3c835d2f4af6b65

tdf#81943 sw RTF import: fix missing wrap in background for in-table shape

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 9 Xisco Faulí 2018-07-18 15:38:43 UTC
Verified in

Version: 6.2.0.0.alpha0+
Build ID: 4d18cd6aad0daaefaca792e8eac173bea07f3750
CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group threaded

@Miklos, thanks for fixing this!!

OTOH, I see the image makes the height of the first table's row greater. I will report a follow up bug for this...
Comment 10 Commit Notification 2018-07-24 15:26:06 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=7e863504854ae8ab286b32510aba8b363a8e314b&h=libreoffice-6-1

tdf#81943 sw RTF import: fix missing wrap in background for in-table shape

It will be available in 6.1.1.

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.