Bug 104287 - FILEOPEN RTF: Image in table missing (ROUNDTRIP)
Summary: FILEOPEN RTF: Image in table missing (ROUNDTRIP)
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.2.2.2 release
Hardware: All All
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: target:5.4.0 target:5.3.2
Keywords: bibisected, bisected, filter:rtf, regression
Depends on:
Blocks: RTF-Opening
  Show dependency treegraph
 
Reported: 2016-11-30 18:41 UTC by Telesto
Modified: 2018-07-18 15:53 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Example RTF (10.52 KB, text/rtf)
2016-11-30 18:42 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2016-11-30 18:41:08 UTC
Description:
When a table containing an image created with LO and saved as RTF, the image will be 'lost' at reopening. Word viewer does open the file correctly. 

Steps to Reproduce:
1.Open Writer
2.Create a table (for example 1x1)
3.Insert an image into the table (jpg, gif, png)
4.Save File as RTF
5.Reopen File

Actual Results:  
Image is missing

Expected Results:
An image is shown


Reproducible: Always

User Profile Reset: YES

Additional Info:
Tested with:
Version: 5.4.0.0.alpha0+
Build ID: 4130c8def811d1dcc87eacaa8ae48ba02738a790
CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2016-11-29_01:03:18
Locale: nl-NL (nl_NL); Calc: CL

and with:
Versie: 4.4.6.3 
Build ID: e8938fd3328e95dcf59dd64e7facd2c7d67c704d
Locale: nl_NL


User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0
Comment 1 Telesto 2016-11-30 18:42:16 UTC
Created attachment 129154 [details]
Example RTF
Comment 2 Xisco Faulí 2016-12-01 09:11:33 UTC
Confirmed in

Version: 5.4.0.0.alpha0+
Build ID: ef0e1c05c32a5a69502e0f0d1d97789c125345a2
CPU Threads: 4; OS Version: Linux 4.8; UI Render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

but not in

Version: 4.5.0.0.alpha0+
Build ID: 2851ce5afd0f37764cbbc2c2a9a63c7adc844311
Locale: ca_ES

thus, this is a regression
Comment 3 Xisco Faulí 2016-12-01 09:14:33 UTC
It also works ok in

Version: 5.0.0.0.alpha1+
Build ID: 0db96caf0fcce09b87621c11b584a6d81cc7df86
Locale: ca-ES (ca_ES.UTF-8)
Comment 4 Xisco Faulí 2016-12-01 09:16:30 UTC
it's also ok in

Version: 5.2.2.2
Build ID: 1:5.2.2-0ubuntu2
CPU Threads: 4; OS Version: Linux 4.8; UI Render: default; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group
Comment 5 Xisco Faulí 2016-12-01 09:26:12 UTC
Sorry, it's reproducible in

Version: 5.2.2.2
Build ID: 1:5.2.2-0ubuntu2
CPU Threads: 4; OS Version: Linux 4.8; UI Render: default; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

Updating version as it's ok in 5.0.0.0.alpha1+ but not in 5.2.2.2
Comment 6 raal 2016-12-04 15:23:20 UTC
This seems to have begun at the below commit.
Adding Cc: to Miklos Vajna; Could you possibly take a look at this one? Thanks

Bisected reading of attached file.

author	Miklos Vajna <vmiklos@collabora.co.uk>	2016-05-10 07:16:17 (GMT)
committer	Miklos Vajna <vmiklos@collabora.co.uk>	2016-05-10 10:33:41 (GMT)
commit 015fd55c94b7b650ed8e572cafaf3b0f903b01b9 (patch)
tree eee92115bd9040e1916a27f6e16aaf43c745e731
parent f6fb8a152797de4c5339b2fa5a3adf0e2ee0c349 (diff)
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.
 c6ef653722ed09e0ff8a6879c95a9f4dec5d2c90 is the first bad commit
commit c6ef653722ed09e0ff8a6879c95a9f4dec5d2c90
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Sat May 14 19:52:51 2016 -0700

    source 015fd55c94b7b650ed8e572cafaf3b0f903b01b9
 git bisect log
# bad: [6380ca07b05f68dedcaa379302cfe1fa478571c4] source 60b74fe1775e647545d2da1fcc58a4c63ec18aa5
# good: [1f670510f08cb800cbae2a1dd6ea70d3542e4721] source 49c2b9808df8a6b197dec666dfc0cda6321a4306
git bisect start 'origin/master' 'oldest'
# good: [38f37b8ec1a2d199bb957cfd2581df7d1b273b74] source c0da1080b61a1d51654fc34fdaeba373226065ff
git bisect good 38f37b8ec1a2d199bb957cfd2581df7d1b273b74
# good: [11ae494d8c566f23e0ef84ba0cc25fb1388b67f7] source 470cfa9860232ab70e017e6084d80f80d469555c
git bisect good 11ae494d8c566f23e0ef84ba0cc25fb1388b67f7
# bad: [ee4cfd75d2452b8c416b4ec27358f7a905d6f5cf] source aa544a002e534a313ad9dd365e80f052789d9963
git bisect bad ee4cfd75d2452b8c416b4ec27358f7a905d6f5cf
# good: [c59865b07f405048acae57452454009f8bc50235] source b477a9e0b620a5e1c709e404c5a4e816ef5794f1
git bisect good c59865b07f405048acae57452454009f8bc50235
# good: [befaec7d753cb75fe41701c3c23539b017624693] source b876bbe2cacce8af379b10d82da6c7e7d229b361
git bisect good befaec7d753cb75fe41701c3c23539b017624693
# good: [5c0e59943c006c034217f7d68d719d763129a6a3] source 19dde56de6f4d8613f156148f1e60256a8f5172a
git bisect good 5c0e59943c006c034217f7d68d719d763129a6a3
# good: [2568d72b38f532971c9afb4e593e45a13a964527] source a5fee58c72c80f6592d9d11f7b5156da275fbc2c
git bisect good 2568d72b38f532971c9afb4e593e45a13a964527
# good: [b4eb57bd014ce6b487911a90319f47eba4e4481a] source 70e8e788beb122b5779693ecece8f65e27192256
git bisect good b4eb57bd014ce6b487911a90319f47eba4e4481a
# good: [c629c29d9a06188a007288496490b7ec7917b332] source 02dac9f7c956f6073d810f4a0c80c733f40aea6d
git bisect good c629c29d9a06188a007288496490b7ec7917b332
# good: [7265990fb35247a479118fc3a707202913e52942] source f6fb8a152797de4c5339b2fa5a3adf0e2ee0c349
git bisect good 7265990fb35247a479118fc3a707202913e52942
# bad: [3e0b703e477865c83030169f1997b56076af6f35] source 0214aa8ce427905477602dbf1d55278c4959fcac
git bisect bad 3e0b703e477865c83030169f1997b56076af6f35
# bad: [5c29b4078b54454a361e5c6e8eb73ae0b033aa9a] source f5afe70cf8b83708d27e15682725c01ce347a6a7
git bisect bad 5c29b4078b54454a361e5c6e8eb73ae0b033aa9a
# bad: [c6ef653722ed09e0ff8a6879c95a9f4dec5d2c90] source 015fd55c94b7b650ed8e572cafaf3b0f903b01b9
git bisect bad c6ef653722ed09e0ff8a6879c95a9f4dec5d2c90
# first bad commit: [c6ef653722ed09e0ff8a6879c95a9f4dec5d2c90] source 015fd55c94b7b650ed8e572cafaf3b0f903b01b9
Comment 7 Commit Notification 2017-03-07 10:59:17 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=8240be9170cc473506531dad2fda82469ae84443

tdf#104287 RTF import: handle bitmap shapes inside tables

It will be available in 5.4.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 8 Commit Notification 2017-03-08 20:23:01 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=9a899023db876630b74493da588b4a5490f90894&h=libreoffice-5-3

tdf#104287 RTF import: handle bitmap shapes inside tables

It will be available in 5.3.2.

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.