Bug 150124 - LibreOffice prints SVG elements that it should not
Summary: LibreOffice prints SVG elements that it should not
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
7.3.5.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Xisco Faulí
URL:
Whiteboard: target:24.2.0 target:7.6.0.0.beta2
Keywords:
Depends on:
Blocks: SVG-Import
  Show dependency treegraph
 
Reported: 2022-07-24 12:11 UTC by Olivier
Modified: 2023-07-03 18:52 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
SVG image (7.35 KB, image/svg+xml)
2022-07-24 12:12 UTC, Olivier
Details
Pdf showing the issue - second image on top-left (43.01 KB, application/pdf)
2022-07-24 14:33 UTC, m_a_riosv
Details
Writer file sample (30.94 KB, application/vnd.oasis.opendocument.text)
2022-07-24 14:34 UTC, m_a_riosv
Details
sample file without cdml container (536 bytes, image/svg+xml)
2022-09-13 18:57 UTC, Xisco Faulí
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier 2022-07-24 12:11:10 UTC
Description:
LibreOffice prints SVG elements from <cdml> container, but it should not.


Steps to Reproduce:
1. Insert figure "IPDI.svg" in a Writer document.
2. Observe the strange character on the top left.
3. Print a PDF and observe the unwanted characters also appearing in the PDF.

Actual Results:
Is seems that LibreOffice prints SVG elements from the <cdml> container.

Expected Results:
LibreOffice should leave away elements form unknown containers like <cdml>.
https://commons.wikimedia.org/wiki/Help:SVG




Reproducible: Always


User Profile Reset: No



Additional Info:
Every time I use LibreOffice, I find a bug.
That is why I use it as few as possible.
Comment 1 Olivier 2022-07-24 12:12:59 UTC
Created attachment 181389 [details]
SVG image

Note that this image is correctly rendered with `display` (from ImageMagick) or with Inkscape.
Comment 2 m_a_riosv 2022-07-24 14:33:19 UTC
Created attachment 181391 [details]
Pdf showing the issue - second image on top-left

Confirmed.
Version: 7.5.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: eea7038c182cc1f6cd792359053ea2561a200026
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Vulkan; VCL: win
Locale: es-ES (es_ES); UI: en-US Calc: CL
Comment 3 m_a_riosv 2022-07-24 14:34:08 UTC
Created attachment 181392 [details]
Writer file sample
Comment 4 Xisco Faulí 2022-09-13 10:46:31 UTC
The problem is that LibreOffice draws something like 

    <text x="280.00" y="108.23" font-family="helvetica" font-size="12pt" fill="#000000" textLength="31"><xxx>IPDI</xxx></text>

where <xxx> is an incorrect text token
Comment 5 Olivier 2022-09-13 15:56:15 UTC
No, the problem is that LibreOffice draws something when it should not draw anything. It should ignore the <cdml> container.
Comment 6 Xisco Faulí 2022-09-13 18:56:09 UTC
(In reply to Olivier from comment #5)
> No, the problem is that LibreOffice draws something when it should not draw
> anything. It should ignore the <cdml> container.

it fails without the cdml container too. See attachment
Comment 7 Xisco Faulí 2022-09-13 18:57:21 UTC
Created attachment 182421 [details]
sample file without cdml container
Comment 8 Xisco Faulí 2022-09-13 18:58:32 UTC
(In reply to Xisco Faulí from comment #6)
> (In reply to Olivier from comment #5)
> > No, the problem is that LibreOffice draws something when it should not draw
> > anything. It should ignore the <cdml> container.
> 
> it fails without the cdml container too. See attachment

it fails because the text node is inside cdml, so the root cause is the unknown node of text. it should not display it if unknown, but LibreOffice displays it anyway
Comment 9 Commit Notification 2023-07-03 14:15:38 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/13a41e7a12598c7896d6dc8d34aba6af5b80b83c

tdf#150124: do nothing when parent is of unkown type

It will be available in 24.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 10 Commit Notification 2023-07-03 18:52:07 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

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

tdf#150124: do nothing when parent is of unkown type

It will be available in 7.6.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.