Bug 123396 - LO Writer automatically replaces SVGs embedded in (F)ODT files with an embedded low-resolution PNGs and drops the SVGs from the documents
Summary: LO Writer automatically replaces SVGs embedded in (F)ODT files with an embedd...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.1.3.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:svg, possibleRegression
Depends on:
Blocks: Writer-Images
  Show dependency treegraph
 
Reported: 2019-02-12 08:47 UTC by Sebastian Ernst
Modified: 2019-06-21 15:03 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
demo 01 (127.72 KB, application/vnd.oasis.opendocument.text)
2019-02-12 08:49 UTC, Sebastian Ernst
Details
demo 02 (109.03 KB, application/vnd.oasis.opendocument.text)
2019-02-12 08:50 UTC, Sebastian Ernst
Details
demo 03 (126.97 KB, application/vnd.oasis.opendocument.text)
2019-02-12 08:51 UTC, Sebastian Ernst
Details
demo 04 (107.33 KB, application/vnd.oasis.opendocument.text)
2019-02-12 08:52 UTC, Sebastian Ernst
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian Ernst 2019-02-12 08:47:56 UTC
Description:
LO Writer automatically replaces SVGs embedded in (F)ODT files with an embedded low-resolution PNGs and drops the SVGs from the documents. This bug is consistently present in various documents and always reproducible. The "replacement PNGs" are of very low quality / resolution, which can apparently not be adjusted - rendering certain types of documents unusable.

Steps to Reproduce:
(See attached documents.)

Let's say there is an "original", previously known to work text document: 
demo_01_svg-plus-png_png-shown.fodt

It has an SVG in a frame in the top right corner of the page. Looking at the plain XML, one can see an SVG and a PNG inside the frame ("stacked").

Open the document. Change it (a single space is enough) and save it once. Keep it open or re-open it, edit it AGAIN for a second time (yet another space for instance) and save again. Before, in-between and after, export to PDF and check the results.

Actual Results:
If the original document, demo_01_svg-plus-png_png-shown.fodt, is opened with LO Writer 6.1, only the PNG is shown and used for PDF export.

Because this was really annoying (and I needed the document to work), I looked into the XML and removed the PNG, leaving ONLY the SVG. An example is given in demo_02_svg-only_svg-shown.fodt. If opened with LO Writer 6.1, the SVG is shown properly and the PDF export also uses the SVG.

If the new document is saved ONCE, the PNG is added "underneath" the SVG like before, restoring (more or less) the "original" state of the document, see demo_03_saved-once_svg-and-png_png-shown.fodt. If re-opened, only the PNG is shown.

If the new document is saved TWICE (or more) - even without any actual edits - the SVG is DROPPED from the document, leaving ONLY the PNG inside, see demo_04_saved-twice_svg-dropped_png-shown.fodt.

Expected Results:
LO Writer shoud (a) display the SVG and (b) use it when exporting the document to PDF. LO Writer should NOT alter the SVG or replace it when (unrelated) edits are made to the document.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Linux: openSUSE Leap 42.3 x86_64, unmodified official distribution packages

Last LO version likely not affected: 6.0
LO version bug was likely introduced with: 6.1
Comment 1 Sebastian Ernst 2019-02-12 08:49:27 UTC
Created attachment 149206 [details]
demo 01

"original" document
Comment 2 Sebastian Ernst 2019-02-12 08:50:45 UTC
Created attachment 149207 [details]
demo 02

"edited" FODT ("workaround")
Comment 3 Sebastian Ernst 2019-02-12 08:51:48 UTC
Created attachment 149208 [details]
demo 03

saved once (SVG and PNG, PNG shown)
Comment 4 Sebastian Ernst 2019-02-12 08:52:34 UTC
Created attachment 149209 [details]
demo 04

saved twice (SVG dropped, PNG shown)
Comment 5 Regina Henschel 2019-02-13 00:00:55 UTC
As described: A file with only svg image saved results in file with svg image and png image. That file saved results in a file with only png image.

I see the error in Version: 6.3.0.0.alpha0+ (x64)
Build ID: 7c304fa6a99d1c30cf1bc6774612d96b382041d8
CPU threads: 8; OS: Windows 10.0; UI render: default; VCL: win; 
Locale: de-DE (en_US); UI-Language: en-US
Calc: threaded

and in Version: 6.1.4.2 (x64)
Build ID: 9d0f32d1f0b509096fd65e0d4bec26ddd1938fd3
CPU threads: 8; OS: Windows 10.0; UI render: default; 
Locale: de-DE (en_US); Calc: CL

I do not see the error in Version: 5.4.7.2 (x64)
Build ID: c838ef25c16710f8838b1faec480ebba495259d0
CPU threads: 8; OS: Windows 6.19; UI render: default; 
Locale: de-DE (en_US); Calc: CL
That versions has always only the svg image, if I start with a file with only a svg image.
Comment 6 Dieter Praas 2019-06-21 15:03:10 UTC
(In reply to Regina Henschel from comment #5)
> I do not see the error in Version: 5.4.7.2 (x64)

=> possibleRegression?