Bug 161985 - LibreOffice: Transparent objects in SVG being rendered in Writer when imported
Summary: LibreOffice: Transparent objects in SVG being rendered in Writer when imported
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
7.6.0.1 rc
Hardware: All All
: medium normal
Assignee: Xisco Faulí
URL:
Whiteboard: target:25.2.0 target:24.8.0.2 target:...
Keywords: bibisected, filter:svg, regression
Depends on:
Blocks: SVG-Import
  Show dependency treegraph
 
Reported: 2024-07-10 17:39 UTC by Jazevedo
Modified: 2024-08-05 11:17 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
test file to reproduce the issue (10.01 KB, image/svg+xml)
2024-07-10 17:41 UTC, Jazevedo
Details
simplified sample (707 bytes, image/svg+xml)
2024-07-11 11:01 UTC, Xisco Faulí
Details
MSO 365 Word 2406 rendering PDF (319.44 KB, application/pdf)
2024-08-05 10:39 UTC, Piotr Osada
Details
LO24.8.0.1 Writer rendering PDF (623.45 KB, application/pdf)
2024-08-05 10:40 UTC, Piotr Osada
Details
LO24.8.0.2 Writer rendering PDF -- fixed bug (623.76 KB, application/pdf)
2024-08-05 11:06 UTC, Piotr Osada
Details
Bug-Fix comparison PNG (57.84 KB, image/png)
2024-08-05 11:13 UTC, Piotr Osada
Details
Test ODT (252.99 KB, application/vnd.oasis.opendocument.text)
2024-08-05 11:17 UTC, Piotr Osada
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jazevedo 2024-07-10 17:39:38 UTC
Description: 

When importing to a writer document an SVG image with an transparent object that is marked as visible, the object is rendered. 
This did not happened with LibreOffice 7.5.9 and previous versions. 

But it is now affects in 7.6.1+ and 24.2 releases.

Steps to Reproduce:

1. Open a new document in Writer (any release from 7.6.2 onward)
2. Select; insert > Image
3. Select the file attached to this bug report. (test-file-01.svg)
4. Open the same test file (test-file-01.svg) in inkscape to compare the difference 
 

Reproducible: Always

User Profile Reset: No

A bibisect of linux-64-7.6 traces this this commit: 

commit 7ddad90c14d9a7422b479547e2eb15e79eef93af
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Mon Oct 30 17:27:18 2023 +0100

    source f59804171e2ecb92d9ea554812f847000c17bceb
    
    source f59804171e2ecb92d9ea554812f847000c17bceb

 instdir/program/libsvgiolo.so | Bin 534864 -> 534864 bytes
 instdir/program/setuprc       |   2 +-
 instdir/program/versionrc     |   2 +-
 3 files changed, 2 insertions(+), 2 deletions(-)

Which corresponds to this change: 

https://gerrit.libreoffice.org/c/core/+/154274

The commit hash for same patch in the master branch ( 24.2) is 56039daae4a436d7ea1b093a02cf0e8ad3bda4a9


The commit message of: https://gerrit.libreoffice.org/c/core/+/154274
mentions another change:

Partially reverts 3e0e67a152e9631574e28dacb6e06a96f03ebca2

And 3e0e67a152e9631574e28dacb6e06a96f03ebca2 commit message mentions yet another change: Partially revert d47b37eea9779e3c354e6c19a7211a306965b7ef

Those two commits where checked by Aron Budea, and the bug was not present before, so this is not a reemerging issue. It's a new issue.
Comment 1 Jazevedo 2024-07-10 17:41:34 UTC
Created attachment 195211 [details]
test file to reproduce the issue
Comment 2 raal 2024-07-10 17:50:59 UTC
Confirm with Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 2afdc61dd3138b383fb73dae2242ba1a9c8de901
CPU threads: 4; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded
Comment 3 Xisco Faulí 2024-07-11 11:01:42 UTC
Created attachment 195231 [details]
simplified sample
Comment 4 Xisco Faulí 2024-07-11 11:27:40 UTC
if 'opacity' is changed by 'fill-opacity' then it works...
Comment 5 Commit Notification 2024-07-11 15:10:44 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/8c5f93ee35f0d9ecaa01e3243ae6bfa1bc148df9

tdf#161985: getOpacity is also called from other places

It will be available in 25.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Jazevedo 2024-07-11 20:14:50 UTC
Tested this fix on a build of master and it solved the issue. 

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 626357f53c934e7f57dc80c3c83ad080767961f3
CPU threads: 20; OS: Linux 6.1; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 7 Jazevedo 2024-07-12 07:31:41 UTC
Just a question, will this fix be backported to LibreOffice 24 and 7.6?
Comment 8 Aron Budea 2024-07-12 07:54:29 UTC
(In reply to Jazevedo from comment #7)
> Just a question, will this fix be backported to LibreOffice 24 and 7.6?
The gerrit patch for the fix shows cherry-picks to 24.8 and 24.2 that are still open, but will likely get merged shortly. 7.6 has reached EOL.

Thanks for the fix, Xisco!
Comment 9 Jazevedo 2024-07-12 08:05:18 UTC
> Thanks for the fix, Xisco!

Yes, thanks for the fix!
Comment 10 Xisco Faulí 2024-07-12 09:21:08 UTC
(In reply to Jazevedo from comment #9)
> > Thanks for the fix, Xisco!
> 
> Yes, thanks for the fix!

Yes, see https://gerrit.libreoffice.org/c/core/+/170350 and https://gerrit.libreoffice.org/c/core/+/170351. They are waiting for a reviewer. Aron ?
Comment 11 Commit Notification 2024-07-12 14:51:18 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "libreoffice-24-8":

https://git.libreoffice.org/core/commit/f568b2346c06a82768452fdfb0b3fe9597f8151a

tdf#161985: getOpacity is also called from other places

It will be available in 24.8.0.2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 12 Commit Notification 2024-07-12 14:52:22 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

https://git.libreoffice.org/core/commit/d023ef070990e242df62d6c1951cc953fd60e7db

tdf#161985: getOpacity is also called from other places

It will be available in 24.2.6.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 13 Jazevedo 2024-07-15 07:08:51 UTC
Tested the patches with the latest daily builds of 24.8.0.2 and 24.2.6 and it worked.
Comment 14 Piotr Osada 2024-08-05 10:39:48 UTC
Created attachment 195707 [details]
MSO 365 Word 2406 rendering PDF
Comment 15 Piotr Osada 2024-08-05 10:40:31 UTC
Created attachment 195708 [details]
LO24.8.0.1 Writer rendering PDF
Comment 16 Piotr Osada 2024-08-05 11:06:20 UTC
Created attachment 195709 [details]
LO24.8.0.2 Writer rendering PDF -- fixed bug
Comment 17 Piotr Osada 2024-08-05 11:13:27 UTC
Created attachment 195710 [details]
Bug-Fix comparison PNG

Screenshot for quick description.
Comment 18 Piotr Osada 2024-08-05 11:17:40 UTC
Created attachment 195711 [details]
Test ODT

It works with:

Version: 24.8.0.2 (X86_64) / LibreOffice Community
Build ID: 57ceca7d2eefdf83e7c9b4135a017f3361a8133f
CPU threads: 8; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Raster; VCL: win
Locale: pl-PL (pl_PL); UI: en-US
Calc: CL threaded