Bug 138953 - Position and size of rotated and cropped image off after DOCX export
Summary: Position and size of rotated and cropped image off after DOCX export
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.3 all versions
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:7.2.0 target:7.0.5 target:7.1.0.2
Keywords: bibisected, bisected, regression
: 135619 139078 (view as bug list)
Depends on:
Blocks: DOCX-Images
  Show dependency treegraph
 
Reported: 2020-12-15 18:52 UTC by Telesto
Modified: 2021-08-11 07:52 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (663.22 KB, application/vnd.oasis.opendocument.text)
2020-12-15 18:52 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2020-12-15 18:52:33 UTC
Description:
Position and size of rotated and cropped image off after DOCX export

Steps to Reproduce:
1. open the attached file
2. Save as DOCX
3. file reload

Actual Results:
Placed in the right corner, oversized image.. 

Expected Results:
Image size and position where correct with 6.2.9 (rotation different from odt though, but that's likely something else)


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.2.0.0.alpha0+ (x64)
Build ID: 35e471bb4d1388cf5afcdcee214cf5111edf44e3
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL
Comment 1 Telesto 2020-12-15 18:52:47 UTC
Created attachment 168202 [details]
Example file
Comment 2 Telesto 2020-12-15 18:55:00 UTC
FWIW: the image is lacking internal dimensions (not DPI set/ copy/paste image) so might be of influence here for results depending on default screen resolution. (but crop and DPI another topic)
Comment 3 Xisco Faulí 2020-12-17 16:00:07 UTC
Regression introduced by:

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

author	Mike Kaganski <mike.kaganski@collabora.com>	2019-01-26 17:13:28 +0300
committer	Mike Kaganski <mike.kaganski@collabora.com>	2019-01-26 17:01:52 +0100
commit	b226383a83e41bbced9fc2a02dc09a449401ec97 (patch)
tree	721a7715e29e7713b510fc5c15abde5fcb2123f6
parent	916cfdd0110856768e69d84b97f8dee1f60d401e (diff)
tdf#116371: export rotation of SwGrfNode

Bisected with: bibisect-linux64-6.3

Adding Cc: to Mike Kaganski
Comment 4 Mike Kaganski 2020-12-18 09:07:35 UTC
I will fix the size regression. But I can't confirm this from comment 0:

> ... *position* where correct with 6.2.9

although I only test using 6.2.0.3. When saving ad DOCX and reloading, the image is shifter a bit to right and upwards.
Comment 5 Commit Notification 2020-12-18 20:48:15 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/3dc2e629b247873bfbd3190c11152d8d2bab1a03

tdf#138953: use original (cropped, but unrotated) object size in spPr

It will be available in 7.2.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 6 Telesto 2020-12-19 20:30:22 UTC
Working perfectly!
Version: 7.2.0.0.alpha0+ (x64)
Build ID: 315c7570c4a72f4c834086082825533b1e50d1bf
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL

Thanks Mike. I opened a new bug for the small position change
Comment 7 Xisco Faulí 2020-12-21 12:24:52 UTC
Verified in

Version: 7.2.0.0.alpha0+
Build ID: ad8485ebe11396aaac68095ef9eec819de6af26c
CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 8 Commit Notification 2020-12-21 13:22:15 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/a9ec5c6e7b542e3c7788cdfe0aff4512e36491c6

tdf#138953: use original (cropped, but unrotated) object size in spPr

It will be available in 7.0.5.

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 9 Commit Notification 2020-12-22 05:38:30 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

https://git.libreoffice.org/core/commit/3d7c90b45c607fe560bacd8f57de0966a93edb4d

tdf#138953: use original (cropped, but unrotated) object size in spPr

It will be available in 7.1.0.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.
Comment 10 NISZ LibreOffice Team 2021-08-11 07:30:52 UTC
*** Bug 135619 has been marked as a duplicate of this bug. ***
Comment 11 NISZ LibreOffice Team 2021-08-11 07:31:33 UTC
*** Bug 139078 has been marked as a duplicate of this bug. ***