Bug 146682 - Error when importing svg files into Writer
Summary: Error when importing svg files into Writer
Status: RESOLVED DUPLICATE of bug 103888
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.1 all versions
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:svg
Depends on:
Blocks: SVG-Import
  Show dependency treegraph
 
Reported: 2022-01-10 13:20 UTC by Jörn Schwarz
Modified: 2023-07-13 23:19 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
writer file with imported svg file (46.34 KB, application/vnd.oasis.opendocument.text)
2022-01-10 13:23 UTC, Jörn Schwarz
Details
CircuitDiagram.odg (28.39 KB, application/vnd.oasis.opendocument.graphics)
2022-01-10 16:28 UTC, Hans-Werner
Details
CircuitDiagram.svg (177.34 KB, image/svg+xml)
2022-01-10 16:29 UTC, Hans-Werner
Details
CircuitDiagramNEW.odg (28.48 KB, application/vnd.oasis.opendocument.graphics)
2022-01-10 19:55 UTC, Hans-Werner
Details
CircuitDiagramNEW.svg (186.79 KB, image/svg+xml)
2022-01-10 19:56 UTC, Hans-Werner
Details
Minimal svg for the first example (510 bytes, image/svg+xml)
2022-01-11 00:53 UTC, Hossein
Details
CircuitDiagram.odg (28.50 KB, application/vnd.oasis.opendocument.graphics)
2022-01-11 10:52 UTC, Hans-Werner
Details
CircuitDiagram.svg (186.79 KB, image/svg+xml)
2022-01-11 10:53 UTC, Hans-Werner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jörn Schwarz 2022-01-10 13:20:03 UTC
Description:
When importing svg files into Writer or Impress, spacing between letters is added when font attributes within a line or word have been changed.

Steps to Reproduce:
1.create a svg file with some words
2. change the character attribute of some letters within a word, e.g. italics
3. import the svg file into Writer

Actual Results:
spaces appear in front of and behind the letters with the changed character attributes in the Writer file

Expected Results:
no spaces


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
display of the text as in the svg file: without spaces
Comment 1 Jörn Schwarz 2022-01-10 13:23:58 UTC
Created attachment 177430 [details]
writer file with imported svg file
Comment 2 Hans-Werner 2022-01-10 16:28:08 UTC
I can confirm this.

Additional:

Same problems with ODG exported to SVG.

Please compare added "CircuitDiagram.odg" with added "CircuitDiagram.svg". In "CircuitDiagram.odg" error areas (of "CircuitDiagram.svg") are marked with blue circles.
Comment 3 Hans-Werner 2022-01-10 16:28:51 UTC
Created attachment 177435 [details]
CircuitDiagram.odg
Comment 4 Hans-Werner 2022-01-10 16:29:25 UTC
Created attachment 177436 [details]
CircuitDiagram.svg
Comment 5 Xisco Faulí 2022-01-10 19:37:08 UTC
Reproduced in

Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: bf883027ee62ece0844730572305094f53daa521
CPU threads: 4; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

Version: 6.1.0.0.alpha1+
Build ID: 3a801799536e6870f2fb111b1cc00b9575a35a39
CPU threads: 4; OS: Linux 5.10; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); Calc: group

Version: 5.2.0.0.alpha1+
Build ID: 5b168b3fa568e48e795234dc5fa454bf24c9805e
CPU Threads: 4; OS Version: Linux 5.10; UI Render: default; 
Locale: en-US (en_US.UTF-8)

and

Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)

maybe it's already reported in another issue
Comment 6 Xisco Faulí 2022-01-10 19:37:40 UTC
@Hossein, I thought you might be interested in this issue
Comment 7 Hans-Werner 2022-01-10 19:54:02 UTC
It seems to be that there are 2 problems.

Please take a look at the updated files "CircuitDiagram.odg" and "CircuitDiagram.svg":

[1] Blue circles = IMPORT problem
NOT to be seen when using "Inkscape" "GIMP" "Firefox" "MicrosoftEdge".

[2] Violett circles = EXPORT problem
To be seen when using "Inkscape" "GIMP" "Firefox" "MicrosoftEdge".
Comment 8 Hans-Werner 2022-01-10 19:55:22 UTC
Created attachment 177442 [details]
CircuitDiagramNEW.odg
Comment 9 Hans-Werner 2022-01-10 19:56:20 UTC
Created attachment 177443 [details]
CircuitDiagramNEW.svg
Comment 10 Hossein 2022-01-11 00:53:39 UTC
Created attachment 177451 [details]
Minimal svg for the first example

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
   xmlns:svg="http://www.w3.org/2000/svg"
   xmlns="http://www.w3.org/2000/svg"
   width="10cm"
   height="6cm"
   version="1.1">

  <style>
    text  {font-weight: bold;}
    .red  {fill:red;}
    .blue {font-style: italic; fill:blue; font-weight: normal;}
  </style>

  <text x="1cm" y="1cm">
    <tspan>Wenn Unter</tspan><tspan class="red">nehm</tspan><tspan>en sich über</tspan><tspan class="blue">nehm</tspan><tspan>en</tspan>
  </text>
</svg>
Comment 11 Hans-Werner 2022-01-11 10:52:38 UTC
Created attachment 177454 [details]
CircuitDiagram.odg
Comment 12 Hans-Werner 2022-01-11 10:53:27 UTC
Created attachment 177455 [details]
CircuitDiagram.svg
Comment 13 Hans-Werner 2022-01-11 11:01:55 UTC
CircuitDiagram.svg

[1] svg IMPORT problem -> BLUE circles
+ additional blanks
+ caused by LibreOffice WRITER CALC IMPRESS DRAW

[2] svg EXPORT problem -> VIOLET circles
+ destroyed text areas
+ caused by LibreOffice DRAW
Comment 14 Xisco Faulí 2023-07-13 23:19:24 UTC
It looks like a duplicate of bug 103888

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