Bug 100135 - SVG: svgOpen filter looses text and labeling, svgInsert filter not honoring mask or clip-path in rendering a simple plot graphic
Summary: SVG: svgOpen filter looses text and labeling, svgInsert filter not honoring m...
Status: RESOLVED DUPLICATE of bug 97539
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
5.1.3.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:svg
: 109256 (view as bug list)
Depends on:
Blocks: SVG-Import SVG-Open
  Show dependency treegraph
 
Reported: 2016-05-30 09:15 UTC by mail
Modified: 2019-09-19 16:15 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
SVG graphic of a simple plot that is displayed incorrectly in DRAW and IMPRESS (33.13 KB, image/svg+xml)
2016-05-30 09:15 UTC, mail
Details
Correctly rendered graphics (8.56 KB, image/png)
2016-05-30 09:21 UTC, mail
Details
svg - no text (labels) shown on insert image 5.1.4.2 (14.07 KB, image/svg+xml)
2017-02-04 10:51 UTC, sean
Details
svg in LO Draw 6.1 beta 2 (62.12 KB, image/png)
2018-06-18 21:11 UTC, Roman Kuznetsov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mail 2016-05-30 09:15:29 UTC
Created attachment 125387 [details]
SVG graphic of a simple plot that is displayed incorrectly in DRAW and IMPRESS

When importing the attached svg-file (written by python's matplotlib), the file is displayed differently in Impress and in Draw (but both are wrong):

- The clipping of the graph is wrong
- labels seem to be missing (Draw only)

The attached png-file shows how it should look as rendered by matplotlib and firefox.
Comment 1 mail 2016-05-30 09:21:27 UTC
Created attachment 125388 [details]
Correctly rendered graphics
Comment 2 Heiko Tietze 2016-05-30 09:44:36 UTC
Yes, there is a clipping issue, which is known. But what label is missing? It would be helpful if you add your LibO version. And what's wrong with the 'order of layers'?
Comment 3 mail 2016-05-30 12:46:02 UTC
LibO version is (as specified in the version combo box above) 5.1.3.2

The bug bit me under Windows 7 and Linux Mint 17.

When I import the SVG file in DRAW, all labels are gone (i.e. axis labels, title lables, tick labels). When imported into IMPRESS, there is only the clipping issue.

Maybe my bug title is misleading - I assumed the bug had something to do with a wrong order of the SVG layers: The unclipped plot data has to be in the SVG file (otherwise it couldn't be painted by DRAW :-) ). However, clipping works in Firefox, so I thought there might be some masking layer that is not displayed in the correct order.

Of course, it could just be a problem with the <path clip-path= ...> commands ...
Comment 4 V Stuart Foote 2016-05-30 13:54:03 UTC
Depends on if you are inserting or opening the SVG...

Here "import" is a rather imprecise term, and understand there are two completely different filters for handling SVG.  One filter for when you open the SVG into Draw, and another for when you insert an SVG as an image into Draw, Impress or Writer.

When inserted -- the filter fidelity is higher, but to edit the result, you must "break" the resulting image (from image context menu, or the main menu Modify -> Break).

When opened -- the filter process breaks SVG elements into individual Draw element objects, handling of text and labels has poor fidelity. 

Work is ongoing to merge the two--eventually eliminating the separate opening filter. For now its use (e.g. opening into Draw) is not ideal--personally I avoid it.

With this image, when inserted, the needed mask/clip-path handling for the trend line does not occur--but it is simple to break the image and adjust or clip the line ends.
Comment 5 mail 2016-05-30 15:02:07 UTC
Ah, thanks for the explanation - it was not a difference between DRAW and IMPRESS but between opening and inserting.

The attached example has a very reduced complexity; the effort for manually clipping the graphs as a workaround (which I've done in the past) in real world cases is much higher for me.
Comment 6 mail 2016-05-30 15:03:59 UTC
Actually, I've added an opaque layer in most cases to hide data points instead of deleting them.
Comment 7 sean 2017-02-04 10:51:31 UTC
Created attachment 130901 [details]
svg - no text (labels) shown on insert image  5.1.4.2

another example of text not being displayed with insert image svg.
Comment 8 V Stuart Foote 2017-07-21 18:41:37 UTC
*** Bug 109256 has been marked as a duplicate of this bug. ***
Comment 9 V Stuart Foote 2017-07-21 18:47:53 UTC
@Xisco, labeling seems OK now, should this be duped to one of the earlier SVG clip path issues? E.g. bug 97657 or bug 90168
Comment 10 Roman Kuznetsov 2018-06-18 21:11:34 UTC
Created attachment 142890 [details]
svg in LO Draw 6.1 beta 2

looks good, but red line are too long and out of area =(
Comment 11 QA Administrators 2019-06-21 02:53:06 UTC Comment hidden (obsolete)
Comment 12 Xisco Faulí 2019-09-19 11:58:47 UTC
it looks like a duplicate of bug 115017

*** This bug has been marked as a duplicate of bug 115017 ***
Comment 13 Xisco Faulí 2019-09-19 16:15:14 UTC
Reverting 5903235d57acb13d9d5286d23b443a01aeab9a3c would fix this issue. thus, duplicate of bug 97539

*** This bug has been marked as a duplicate of bug 97539 ***