Bug 119372 - DRAW - SVG export inverts percentage transparency of lines (see comment 10)
Summary: DRAW - SVG export inverts percentage transparency of lines (see comment 10)
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
(earliest affected) release
Hardware: All All
: medium normal
Assignee: Not Assigned
Keywords: filter:svg
Depends on:
Blocks: SVG-Save
  Show dependency treegraph
Reported: 2018-08-19 20:47 UTC by Alex
Modified: 2021-06-23 03:48 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:

Exampe ODG with 4 transparency lines (9.22 KB, application/vnd.oasis.opendocument.graphics)
2018-08-25 20:03 UTC, Roman Kuznetsov
Result SVG file (8.10 KB, image/svg+xml)
2018-08-25 20:03 UTC, Roman Kuznetsov
Screeshot with source ODG and result SVG (154.37 KB, image/png)
2018-08-25 20:07 UTC, Roman Kuznetsov
Screenshot - ODG used to export the SVG in various software (196.12 KB, image/png)
2018-08-26 10:03 UTC, Alex

Note You need to log in before you can comment on or make changes to this bug.
Description Alex 2018-08-19 20:47:53 UTC
If you export a canvas as an SVG with horizontal and vertical (but not diagonal or wiggly) lines which have a >0% transparency, they are missing from the exported svg file. But present if raster export is used (e.g. jpg/png).

Steps to Reproduce:
1. Create a new drawing
2. Add a line (or multiple with various orientations)
3. Set the transparency to >0%
4. Export as SVG
5. open svg in browser/LOdraw
6. Any horizontal/vertical lines are missing

Actual Results:
Any horizontal/vertical lines are missing but diagonal lines are missing.

Expected Results:
Exported file looks like draw canvas (i.e. all lines present with correct transparency).

Reproducible: Always

User Profile Reset: No

Additional Info:
Comment 1 Jean-Baptiste Faure 2018-08-21 09:05:56 UTC
Which version of LibreOffice ?

Status set to NEEDINFO, please set it back to UNCONFIRMED once requested
informations are provided.

Best regards. JBF
Comment 2 Alex 2018-08-21 09:11:09 UTC
I found this using Win10 LO but I don't know what the earliest version with the issue is.

Thanks for your help!
Comment 3 Roman Kuznetsov 2018-08-25 20:01:52 UTC
don't repro in

Version: (x64)
Build ID: efb621ed25068d70781dc026f7e9c5187a4decd1
CPU threads: 4; OS: Windows 10.0; UI render: default; 
Locale: ru-RU (ru_RU); Calc: CL

4 lines with transparensy 20% were exported to SVG and in Inkscape this SVG opens with any lines
Comment 4 Roman Kuznetsov 2018-08-25 20:03:06 UTC
Created attachment 144439 [details]
Exampe ODG with 4 transparency lines
Comment 5 Roman Kuznetsov 2018-08-25 20:03:41 UTC
Created attachment 144440 [details]
Result SVG file
Comment 6 Roman Kuznetsov 2018-08-25 20:07:52 UTC
Created attachment 144441 [details]
Screeshot with source ODG and result SVG
Comment 7 Alex 2018-08-26 10:03:06 UTC
I've retested this bug on my Ubuntu machine 18.04 (LO6.0.3.2) and I've attached a screenshot of the results.

If the SVG is repopened into LO draw the lines are all present but with 0% transparency. Opening into Inkscape appears to be correct. Opening into Firefox the vertical and horizontal lines are missing.

I didn't try Inkscape on Windows - just FF and LO.
Comment 8 Alex 2018-08-26 10:03:45 UTC
Created attachment 144446 [details]
Screenshot - ODG used to export the SVG in various software
Comment 9 Buovjaga 2018-09-20 10:37:44 UTC
Same result as Roman.
Have to note that the transparency *is* somehow inverted: it looks like the SVG has 80% transparency instead.
I opened the SVG inside a text editor, but could not figure out how the transparency is defined. There were a bunch of linear gradients?!?

Arch Linux 64-bit
Build ID: 05db125c57ea3c8f04a304561209c32cc5c45a67
CPU threads: 8; OS: Linux 4.18; UI render: default; VCL: gtk3_kde5; 
Locale: fi-FI (fi_FI.UTF-8); Calc: threaded
Built on September 17th 2018
Comment 10 Alex 2018-11-03 22:04:49 UTC
Reviewing this now suggests that the issue might be with Firefox which I was using the view the SVGs. Thus is unconfirmed as relates to Comment 1.

That being said there *is* an issue in that the percentage transparency is flipped when saved as an SVG (i.e. 20% transparent is saved as 80%, 70% as 30% etc) [as Comment 9]. I will ammend the title of the bug.

Thanks for your help.

LO Version:
Build ID: 1:6.1.2-0ubuntu1
CPU threads: 4; OS: Linux 4.18; UI render: default; VCL: gtk3; 
Locale: en-GB (en_GB.UTF-8); Calc: group threaded
Comment 11 Buovjaga 2018-11-04 08:14:49 UTC
Ok, then I will set to NEW.
Comment 12 Alex 2019-06-23 13:17:27 UTC
The reversed transparency bug discussed in Comment 10 is still present in:

Version: (x64)
Build ID: a187af327633f5f00363be5131bd21a13e0f1a7b
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
Locale: en-GB (en_GB); UI-Language: en-GB
Calc: threaded
Comment 13 QA Administrators 2021-06-23 03:48:22 UTC
Dear Alex,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)

If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword

Feel free to come ask questions or to say hello in our QA chat: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa

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

Warm Regards,
QA Team