Bug 116976 - DOCX import: bitmap does not consume its relative size
Summary: DOCX import: bitmap does not consume its relative size
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: target:6.1.0 target:6.0.5 target:5.4....
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-12 16:23 UTC by Miklos Vajna
Modified: 2018-05-07 10:39 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
Reproducer document. (14.63 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-04-12 16:23 UTC, Miklos Vajna
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Miklos Vajna 2018-04-12 16:23:55 UTC
Created attachment 141312 [details]
Reproducer document.

Steps to reproduce:

1) Open the attached document.

2) Observe that it has a large bitmap and a smaller shape in it. The shape should have a relative width of 40% according to the DOCX markup.

Expected result: relative width is imported, e.g. the ThisComponent.DrawPage(0).RelativeWidth macro shows the non-zero value.

Actual result: if the shape with relative size has a problematic bitmap in front of it, then relative size is ignored.

This is especially problematic as sometimes the fallback (absolute) size next to the relative size is bogus, so the layout of the document will be broken.
Comment 1 Commit Notification 2018-04-12 19:58: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=9691b2fc5d77df41f923722fbaaa512d545a98ca

tdf#116976 DOCX import: fix rel size of shape after bitmap

It will be available in 6.1.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 2 Commit Notification 2018-04-25 08:16:30 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-6-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=65f4c7b8725e8fe086889fca8c7c9b7e32fdd4d5&h=libreoffice-6-0

tdf#116976 DOCX import: fix rel size of shape after bitmap

It will be available in 6.0.5.

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 3 Commit Notification 2018-04-30 09:58:49 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-5-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=cba1897f3c063f8a535898bfd16a516c8de9ac21&h=libreoffice-5-4

tdf#116976 DOCX import: fix rel size of shape after bitmap

It will be available in 5.4.8.

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 4 Commit Notification 2018-05-07 10:39:41 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-5-4-7":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=c7b4fb269034ec87700481d389f60ca181060c8c&h=libreoffice-5-4-7

tdf#116976 DOCX import: fix rel size of shape after bitmap

It will be available in 5.4.7.

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.