Bug 105642 - svg export of single objects from Impress should provide width and height value
Summary: svg export of single objects from Impress should provide width and height value
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
5.4.0.0.alpha0+
Hardware: x86 (IA32) Windows (All)
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:svg
Depends on:
Blocks: SVG-Save
  Show dependency treegraph
 
Reported: 2017-01-31 14:09 UTC by Regina Henschel
Modified: 2021-06-08 14:03 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2017-01-31 14:09:47 UTC
Take a presentation, select some objects and export them to svg. Make sure "Selection" is checked. You will get a file with a line similar to
<svg version="1.2" viewBox="5061 3947 10042 9212" preserveAspectRatio="xMidYMid" ...

This <svg> element has no width and height attribute. That is very bad, when such image is inserted in a text document. A browser will use the window size as viewport, but LibreOffice does not have this possibility. It imports the image in a huge size, in the example above it has 265,72cm × 243,76cm.

Expected behavior: Width and height are set to the size of the original bounding box.

If you export from Draw, then width and height are set as expected.
Comment 1 Stéphane Guillou (stragu) 2021-06-08 14:03:04 UTC
Reproduced in:

Version: 7.2.0.0.alpha1+ / LibreOffice Community
Build ID: 399a6472f666ae6c3e20b6f8367f9fd089c15605
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2021-06-05_17:38:40
Calc: threaded