Bug 167147 - SVG: rect with stroke/fill rendered wrongly for value "transparent"
Summary: SVG: rect with stroke/fill rendered wrongly for value "transparent"
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
7.0 all versions
Hardware: All All
: medium normal
Assignee: Xisco Faulí
URL:
Whiteboard: target:26.2.0 target:25.8.0.0.beta2 t...
Keywords: filter:svg
Depends on:
Blocks: SVG-Import
  Show dependency treegraph
 
Reported: 2025-06-21 11:37 UTC by Dieter
Modified: 2025-06-25 07:02 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
sample file (671 bytes, image/svg+xml)
2025-06-21 12:46 UTC, Xisco Faulí
Details
Comparison LibreOffice 25.8 vs Chrome (8.59 KB, image/png)
2025-06-21 12:47 UTC, Xisco Faulí
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dieter 2025-06-21 11:37:03 UTC
Description:
I want to import a svg into impress. The rect-object with fill="transparent" will be shown with a black color. The css-style fill/stroke should override the current fill/stroke-attribute.

is: 
1,2,3,4: rect have blue border
1+3 rect: black, 2. rect: white 4.rect: red



Steps to Reproduce:
1.import the following svg in a page in impress

uses this SVG:
<svg id="mytest" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 768 256 " >
    <g fill="gold">
        <rect x="0" y="0" width="800" height="300" fill="gold" />
        <rect fill="transparent" x="10" y="1" width="120" height="255" stroke="blue" stroke-width="5" />
        <rect x="170" y="1" fill="red" stroke="blue" width="120" height="255" style="fill:#fff; stroke:transparent;" stroke-width="5"/>
        <rect x="330" y="1" stroke="blue" width="120" height="255" style="fill:transparent;" stroke-width="5"/>
        <rect fill="red" stroke="green" x="490" y="1"  width="120" height="255" style="fill:transparent; stroke:blue;" stroke-width="5" />
    </g>
</svg>


Actual Results:
   
is: 
1,2,3,4: rect: blue border
1 rect: black, 2. rect: white, 3 rect: black, 4.rect: red


Expected Results:
should 
1+3+4 rect: blue border. 2. rect: transparent border
1 rect: transparent. 2 rect: white, 3 rect: transparent, 4 rect: transparent


Reproducible: Always


User Profile Reset: No

Additional Info:
[Information automatically included from LibreOffice]
Locale: de
Module: PresentationDocument
[Information guessed from browser]
OS: Windows (All)
OS is 64bit: no
Comment 1 Xisco Faulí 2025-06-21 12:46:21 UTC
Reproduced in

Version: 25.8.0.0.beta1+ (X86_64) / LibreOffice Community
Build ID: 211c193b1c7391b4f1c1172214a90899de19b06a
CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: gtk3
Locale: es-ES (es_ES.UTF-8); UI: en-US
Calc: threaded
Comment 2 Xisco Faulí 2025-06-21 12:46:32 UTC
Created attachment 201401 [details]
sample file
Comment 3 Xisco Faulí 2025-06-21 12:47:16 UTC
Created attachment 201402 [details]
Comparison LibreOffice 25.8 vs Chrome
Comment 4 Xisco Faulí 2025-06-21 12:48:48 UTC
Also reproduced in

Version: 6.4.0.0.alpha1+
Build ID: 9bc848cf0d301aa57eabcffa101a1cf87bad6470
CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: gtk3; 
Locale: en-US (es_ES.UTF-8); UI-Language: en-US
Calc: threaded
Comment 5 Commit Notification 2025-06-21 14:18:16 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/42e566654aa926caf51457b78a3b0dbb81b2f6a2

tdf#167147: Support transparent fill color

It will be available in 26.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 Commit Notification 2025-06-21 16:15:35 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "libreoffice-25-8":

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

tdf#167147: Support transparent fill color

It will be available in 25.8.0.0.beta2.

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 7 Commit Notification 2025-06-25 07:02:41 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "libreoffice-25-2":

https://git.libreoffice.org/core/commit/6f71c77d1d5e1b5760915ce94e252b250da835d3

tdf#167147: Support transparent fill color

It will be available in 25.2.5.

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.