Bug 45884 - LibreOffice does not understand "scale" value with style:rel-width and style:rel-height
Summary: LibreOffice does not understand "scale" value with style:rel-width and style:...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version: 3.5.0 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
QA Contact:
URL: https://github.com/dagwieers/asciidoc...
Whiteboard: odf
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-10 03:44 UTC by Dag Wieers
Modified: 2013-09-24 09:00 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments
AsciiDoc source for image test file (1.72 KB, text/plain)
2012-12-02 14:15 UTC, Dag Wieers
Details
Flat ODF file showing the reported problem (436.85 KB, application/vnd.oasis.opendocument.text)
2012-12-02 14:16 UTC, Dag Wieers
Details

Description Dag Wieers 2012-02-10 03:44:54 UTC
The current implementation in odt.conf for cover-images adds: 

    style:rel-width="100%" style:rel-height="scale".

For an image with the dimensions 2097x287, this should show the image in LibreOffice with a proportional width and height. However when opened in LibreOffice the width is indeed 100%, but the height seems to be the same as the width. So scale seems to be implementing "height" instead. If you look in the Picture-properties in LibreOffice you can see the following values:

    (x) Keep scale
    ( ) Keep image size

    -- Scale --------------
    Width: 96%
    Height: 2%

    -- Image Size -------
    Width: 170,00mm
    Height: 0,41mm

Modifying this Scale to Width: 100% and Height: 100% does the right thing.

If you save the file again, LibreOffice adds it this to the draw:frame:

    svg:width="177.69mm" svg:height="24.31mm"

Without this working properly, LibreOffice only understands exact dimensions. Which means as producer (ODF backend) you need to get image dimensions and apply that to the page dimensions and all kinds of crazy shit ;-)

I believe this problem has always existed.
Comment 1 Dag Wieers 2012-02-10 07:17:08 UTC
The behavior one would expect is the behavior seen when pushing the "Original Size" button inside the Picture-proprties window.
Comment 2 Dag Wieers 2012-02-10 07:20:45 UTC
AFAICT LibO does not handle "scale", it does seem to handle percentages correctly.
Comment 3 sasha.libreoffice 2012-05-17 05:15:03 UTC
Thanks for bugreport
Please, attach odt file that demonstrates this problem
Comment 4 Dag Wieers 2012-12-02 14:15:53 UTC
Created attachment 70925 [details]
AsciiDoc source for image test file

This is the AsciiDoc source for the generated Flat ODF file showing the described problem.
Comment 5 Dag Wieers 2012-12-02 14:16:33 UTC
Created attachment 70926 [details]
Flat ODF file showing the reported problem

Flat ODF file showing the reported problem
Comment 6 Dag Wieers 2012-12-02 14:17:28 UTC
The attached Flat ODF file shows the (various) problems we see with including images into ODF.
Comment 7 QA Administrators 2013-09-24 01:48:11 UTC
Dear Bug Submitter,

This bug has been in NEEDINFO status with no change for at least 6 months. Please provide the requested information as soon as possible and mark the bug as UNCONFIRMED. Due to regular bug tracker maintenance, if the bug is still in NEEDINFO status with no change in 30 days the QA team will close the bug as INVALID due to lack of needed information.

For more information about our NEEDINFO policy please read the wiki located here: 
https://wiki.documentfoundation.org/QA/FDO/NEEDINFO

If you have already provided the requested information, please mark the bug as UNCONFIRMED so that the QA team knows that the bug is ready to be confirmed.


Thank you for helping us make LibreOffice even better for everyone!


Warm Regards,
QA Team
Comment 8 Dag Wieers 2013-09-24 09:00:56 UTC
Bug was incorrectly set to NEEDINFO :-(


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.