Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LibreOffice bug: style:rel-width and style:rel-height not implemented properly #23

Open
dagwieers opened this issue Feb 10, 2012 · 1 comment
Assignees

Comments

@dagwieers
Copy link
Owner

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 and the image ends up looking square 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 ;-)

@ghost ghost assigned dagwieers Feb 10, 2012
@dagwieers
Copy link
Owner Author

Problem has been reported upstream at: https://bugs.freedesktop.org/show_bug.cgi?id=45884

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant