Bug 115262 - Image object cumulative placement error affecting Print Preview and PDF export in .ods with irregular row height
Summary: Image object cumulative placement error affecting Print Preview and PDF expor...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.1.0.3 release
Hardware: All All
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: target:6.2.0 target:6.1.3
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2018-01-27 22:47 UTC by R. Bingham
Modified: 2018-10-09 12:04 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
2018-01 bug 115262 test ODS for Print Preview image misplacement (26.99 KB, application/vnd.oasis.opendocument.spreadsheet)
2018-01-27 22:57 UTC, R. Bingham
Details
Bibisect log (2.60 KB, text/plain)
2018-01-28 14:05 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description R. Bingham 2018-01-27 22:47:32 UTC
Follow-on to bug 104901 complaining of image object cumulative placement error in a .ods standard edit mode window then also flowing downstream to Print Preview view and PDF output files. Bug 104901 now RESOLVED/WORKSFORME in LO v6.1 for edit mode window, however, misplacement now continues as a distinct issue in downstream Print Preview and PDF exports.

Comparison screenshot PNG showing edit window along with Print Preview window is here:
https://bug-attachments.documentfoundation.org/attachment.cgi?id=139351

Test ODS to follow.

Tested with:
Version: 5.4.4.2 (x64)
Build ID: 2524958677847fb3bb44820e40380acbe820f960
CPU threads: 8; OS: Windows 6.19; UI render: default; 
Locale: en-US (en_US); Calc: group
Windows 10 x64 v1709 on native Intel-driven display

and

Version: 6.1.0.0.alpha0+ (x64)
Build ID: 8a73799d12f0d2dc04890b96bd0adf0ffcf50d17
CPU threads: 8; OS: Windows 10.0; UI render: GL; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-01-25_23:42:12
Locale: en-US (en_US); Calc: CL
Windows 10 x64 v1709 on native Intel-driven display
Comment 1 R. Bingham 2018-01-27 22:57:13 UTC
Created attachment 139398 [details]
2018-01 bug 115262 test ODS for Print Preview image misplacement

Test ODS with LO logo images in rows 3, 100, 200, 300, 400, 500 (yellow bckgrnd). Each row has 2 images, one using LO image object border function the other not. Slightly different misplacement behavior has been observed between the two.
Comment 2 Telesto 2018-01-28 13:54:43 UTC
Repro with
Version: 6.1.0.0.alpha0+
Build ID: ea89dabf8b6363972190a6b50c527c418d51c2c7
CPU threads: 4; OS: Windows 6.3; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2018-01-27_22:55:15
Locale: nl-NL (nl_NL); Calc: CL

and with
Version: 5.1.0.3
Build ID: 5e3e00a007d9b3b6efb6797a8b8e57b51ab1f737
CPU Threads: 4; OS Version: Windows 6.2; UI Render: default; 
Locale: en-US (nl_NL)

but not with:
Version: 5.0.6.3
Build ID: 490fc03b25318460cfc54456516ea2519c11d1aa
Locale: en-US (nl_NL)
Comment 3 Telesto 2018-01-28 14:05:27 UTC
Created attachment 139407 [details]
Bibisect log

Regression introduced by:

author	Miklos Vajna <vmiklos@collabora.co.uk>	2015-11-02 10:56:43 +0100
committer	Miklos Vajna <vmiklos@collabora.co.uk>	2015-11-02 10:57:44 +0100
commit	708d1c5ab242b545ced598879233fc662d7e6cc0 (patch)
tree	518fe8cf520cf82dfc89e1e1f967423749f2f926
parent	f570f837d65c9ee79a10be823c3dc28febdebfc8 (diff)
sc lok: emit RowColumnHeader info in twips
As that's the unit we use everywhere else in the LOK API. Also, make the
ScGlobal::nScreenPPTX/Y calculation more precise, otherwise rounding
errors occur during the pixel -> twip conversion.

Example with the old precision: col height is 103 px, nScreenPPTY is
0.067, twips is 1537.3134328358208, convering it back is 102.487562189
px.

Example with the new precision: col height is 103 px, nScreenPPTY is
0.0667, twips is 1544.2278860569716, convering it back is 102.948525737
px.
Comment 4 Telesto 2018-01-28 14:06:33 UTC Comment hidden (obsolete)
Comment 5 Xisco Faulí 2018-06-05 21:10:26 UTC Comment hidden (obsolete)
Comment 6 Xisco Faulí 2018-06-05 21:11:31 UTC
Adding Cc: to Miklos Vajna
Comment 7 Commit Notification 2018-10-02 07:04:14 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=616fd241838069e18c59064e33c4b24f5ae112c6

tdf#115262 sc: fix cumulative placement error of images

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 8 Xisco Faulí 2018-10-03 14:40:06 UTC
Verified in

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

@Miklos, thanks for fixing this!!
Comment 9 Xisco Faulí 2018-10-03 14:41:16 UTC
Cherry-picked to 6-1 -> https://gerrit.libreoffice.org/#/c/61312/
Comment 10 Commit Notification 2018-10-09 12:04:13 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=60011cefbccd91065dadf66896a688b807e76964&h=libreoffice-6-1

tdf#115262 sc: fix cumulative placement error of images

It will be available in 6.1.3.

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.