Bug 127806 - FILEOPEN RTF: image display position is wrong and very large
Summary: FILEOPEN RTF: image display position is wrong and very large
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.4 all versions
Hardware: All All
: medium normal
Assignee: Vasily Melenchuk (CIB)
URL:
Whiteboard: target:7.5.0 target:7.4.2
Keywords: bibisected, bisected, regression
: 148558 (view as bug list)
Depends on:
Blocks: RTF-Images
  Show dependency treegraph
 
Reported: 2019-09-27 06:33 UTC by Jinpo
Modified: 2023-12-12 21:31 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Normal display (163.18 KB, image/png)
2019-09-27 06:49 UTC, Jinpo
Details
Libreoffice display (166.19 KB, image/png)
2019-09-27 06:50 UTC, Jinpo
Details
RTF document (4.54 MB, application/rtf)
2019-09-27 07:02 UTC, Jinpo
Details
Normal display (166.54 KB, image/png)
2019-09-27 07:04 UTC, Jinpo
Details
Libreoffice display (173.26 KB, image/png)
2019-09-27 07:04 UTC, Jinpo
Details
The example file in current nightly and Word 2016 (507.57 KB, image/png)
2022-09-05 10:53 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jinpo 2019-09-27 06:33:59 UTC
Description:
Open 0036937.rtf with libreoffice, and some image objects display positional errors and very large.

Steps to Reproduce:
1.Open 0036937.rtf use LibreOffice.
2.Displays as 0036937_Libreoffice_display.png

Actual Results:
image display position is wrong and very large, such as 0036937_Libreoffice_display.png

Expected Results:
display the document normally, such as 0036937_Normal_display.png


Reproducible: Always


User Profile Reset: No



Additional Info:
版本: 6.3.1.2 (x64)
Build ID: b79626edf0065ac373bd1df5c28bd630b4424273
CPU 线程: 4; 操作系统: Windows 10.0; UI 渲染: 默认; VCL: win; 
区域语言: zh-CN (zh_CN); UI 语言: zh-CN
Calc: threaded
Comment 1 Jinpo 2019-09-27 06:49:24 UTC Comment hidden (obsolete)
Comment 2 Jinpo 2019-09-27 06:50:27 UTC Comment hidden (obsolete)
Comment 3 Jinpo 2019-09-27 07:02:30 UTC
Created attachment 154572 [details]
RTF document
Comment 4 Jinpo 2019-09-27 07:04:24 UTC
Created attachment 154573 [details]
Normal display
Comment 5 Jinpo 2019-09-27 07:04:53 UTC
Created attachment 154574 [details]
Libreoffice display
Comment 6 Dieter 2019-09-29 20:20:45 UTC
I confirm it with

Version: 6.3.2.2 (x64)
Build ID: 98b30e735bda24bc04ab42594c85f7fd8be07b9c
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
Locale: de-DE (de_DE); UI-Language: en-GB
Calc: threaded

Image 2 and 3 cause the problem
Comment 7 Xisco Faulí 2019-09-30 11:57:38 UTC
Not reproducible in

Version: 4.3.0.0.alpha1+
Build ID: c15927f20d4727c3b8de68497b6949e72f9e6e9e
Comment 8 Xisco Faulí 2019-09-30 14:29:36 UTC
Regression introduced by:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=2c411e4487f24968d6a62958fec85e4e3e1fda93

author	Vasily Melenchuk <vasily.melenchuk@cib.de>	2015-02-02 09:43:51 +0000
committer	Miklos Vajna <vmiklos@collabora.co.uk>	2015-02-13 18:23:15 +0100
commit 2c411e4487f24968d6a62958fec85e4e3e1fda93 (patch)
tree 89774ed068920e8e8947e0447c668d0bbc643a26
parent d1f38b47c29ef5e2db2cabeb657668637d97e13d (diff)
tdf#49893 partial fix for blank rentangle problem in RTF

Bisected with: bibisect-50max

Adding Cc: to Vasily Melenchuk
Comment 9 Dieter 2021-08-14 04:37:37 UTC
Still present in

Version: 7.2.0.3 (x64) / LibreOffice Community
Build ID: 2a7ea282da28d665a7dc086360567b4aea27bf08
CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL
Comment 10 Justin L 2022-03-05 14:38:22 UTC
repro 7.4+

This document couldn't be opened at all until LO 4.3's
    commit 6e61ecd09679a66060f932835622821d39e92f01
    Author:     Armin Le Grand 
    Commit:     Miklos Vajna <vmiklos@collabora.co.uk>
    CommitDate: Fri Mar 28 14:31:08 2014 +0100
        Merge back branch alg_writerframes to trunk

I don't think comment 8 has identified the right commit.
In LO 4.4 things looked pretty good. Then there was a span of crashes when opening the file, and afterwards the image in the header was missing completely until 5.0.

So the likely regression commit is somewhere in https://cgit.freedesktop.org/libreoffice/core/log/?id=ed1605c1ea01c8b8d7809e3682d5c2104c16fa41&qt=range&q=008b98f928a04d862a6320b51b367d1b913b55c6..2b9e782497cb962d9ca74a851a1389b0e29df49c&ofs=50

My guess is https://cgit.freedesktop.org/libreoffice/core/commit/?id=2b9e782497cb962d9ca74a851a1389b0e29df49c

Added CC to Michael Stahl
Comment 11 Commit Notification 2022-09-01 18:35:47 UTC
Vasily Melenchuk committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/57d9cc81b058757421cd082e5dbe32a919716807

tdf#127806: RTF import: use shape dimensions for pib picture

It will be available in 7.5.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 12 Gabor Kelemen (allotropia) 2022-09-02 07:30:34 UTC
*** Bug 148558 has been marked as a duplicate of this bug. ***
Comment 13 Gabor Kelemen (allotropia) 2022-09-05 10:53:00 UTC
Created attachment 182223 [details]
The example file in current nightly and Word 2016

Verified in current nightly, the image sizing problem is solved in

Version: 7.5.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: dc92a4d973086ce8a6a5f75ba0f4d4c9ca05537a
CPU threads: 14; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: en-US (hu_HU); UI: en-US
Calc: threaded

But these are grouped images, and they are incorrectly positioned:
- the Foxit logo
- the small color gradient image from the bottom line of grey-orange shapes
The positioning of these is worth a separate report.
Comment 14 Commit Notification 2022-09-05 13:06:09 UTC
Vasily Melenchuk committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/8a3c37ad5d39fb48e259edb13dc2934d5ae4986c

tdf#127806: RTF import: use shape dimensions for pib picture

It will be available in 7.4.2.

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.