wrong text orientation in svg files exported by LibreOffice Draw from pasted charts

Bug #1191302 reported by Fiorenzo De Santis
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
Undecided
Unassigned
LibreOffice
Confirmed
High
inkscape (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

when I paste a Calc chart into a .odg document then I export this document as .svg file, if I open it with Inkscape, Inkscape shows the title of the Y axis in a wrong orientation

I'm using LibreOffice 4.0.3.3

I've filed also a LibreOffice bug

https://bugs.freedesktop.org/show_bug.cgi?id=65788

ProblemType: Bug
DistroRelease: Ubuntu 13.04
Package: inkscape 0.48.4-0.1ubuntu2
ProcVersionSignature: Ubuntu 3.8.0-25.37-generic 3.8.13
Uname: Linux 3.8.0-25-generic x86_64
ApportVersion: 2.9.2-0ubuntu8.1
Architecture: amd64
Date: Sat Jun 15 15:55:50 2013
InstallationDate: Installed on 2013-03-16 (91 days ago)
InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Alpha amd64 (20130315)
MarkForUpload: True
SourcePackage: inkscape
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
In , Fdes (fdes) wrote :

Created attachment 80869
a sample zipped file with ods, odg and svg

when I export as svg a chart which has been pasted from Calc the resulting svg has two major problems:

1) if I open it with Inkscape the title of the Y axis loses its orientation, but this could be an Inkscape bug

2) if I open it with LibreOffice Draw the result is really weird

I have attached a zip file with 4 files: a calc sheet with a chart (01.ods), the pasted chart as odg (02.odg), the exported svg (03.svg) and finally the odg produced by opening the svg again with LibreOffice Draw (04.odg)

Revision history for this message
Fiorenzo De Santis (fiod3s) wrote :
Revision history for this message
In , Pje335-lo (pje335-lo) wrote :

Thank you for your bug report, I can reproduce this bug running LibreOffice Version: 4.1.0.1
Build ID: 1b3956717a60d6ac35b133d7b0a0f5eb55e9155 on Mac osx 10.8.4.

the y-axis is also lost wen I open it with Safari.

Revision history for this message
In , Dennisroczek (dennisroczek) wrote :

SVG and PNG exported with 4.1.3.2

https://wiki.documentfoundation.org/images/b/ba/Coverity_scan_analysis_results_bar.svg

and

https://wiki.documentfoundation.org/images/3/31/Coverity_scan_analysis_results_bar.png

As you can see (also not in the source code) the description of the bars aren't included.

Moreover stylesheets should be used as many code is multiple times included.

Example ODS can be found here https://wiki.documentfoundation.org/File:Coverity_scan_analysis_results.ods

Revision history for this message
In , Dennisroczek (dennisroczek) wrote :

OK: the source code solution for the axis was found:

original (in my coverity example)

 <text class="TextShape"><tspan class="TextParagraph" font-family="Arial" font-size="318px" font-weight="400" transform="translate(1330,10312) rotate(-90) translate(-1330,-10312)"><tspan class="TextPosition" x="1330" y="10312"><tspan fill="rgb(0,0,0)" stroke="none"># of &quot;outstanding defects&quot;</tspan></tspan></tspan></text>

and the solution
 <text class="TextShape" transform="translate(1330,10312) rotate(-90) translate(-1330,-10312)"><tspan class="TextParagraph" font-family="Arial" font-size="318px" font-weight="400"><tspan class="TextPosition" x="1330" y="10312"><tspan fill="rgb(0,0,0)" stroke="none"># of &quot;outstanding defects&quot;</tspan></tspan></tspan></text>

the problem is that the code is "correct", but sadly the translate and rotate is "added" in the wrong object (tspan instead of text)

This is actually an EasyHack now (at least that part)

Revision history for this message
In , Dennisroczek (dennisroczek) wrote :

@Tomaz Vajngerl I put you as assigned, please correct if wrong; I saw your contributions at bug #60137

I believe the problem is in line 1425
http://cgit.freedesktop.org/libreoffice/core/tree/filter/source/svg/svgwriter.cxx?id=9bc0ca091b7037f7c8f4782103a81b7287bc1de3#n1425

or better saying in line 1374 as this is the function opening the tspan element.
http://cgit.freedesktop.org/libreoffice/core/tree/filter/source/svg/svgwriter.cxx?id=9bc0ca091b7037f7c8f4782103a81b7287bc1de3#n1374

So I hope that codepointers help everybody. ;-)

Revision history for this message
In , Quikee (quikee) wrote :

Hi,

Actually I never worked on SVG export - only on the export functionality (which is independent of the actual export format) so I don't know if I am the right man for this job.

Regards, Tomaž

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in inkscape (Ubuntu):
status: New → Confirmed
no longer affects: inkscape
Revision history for this message
Keeganza (kevin-liam-keegan) wrote :

The same issue is apparent when I try to export charts to SVG files using LibreOffice Calc (version 4.1.3.2). It doesn't seem to matter which program I use to view the SVG -- the misaligned text persists.

Revision history for this message
In , Anonymous-dodgeit (anonymous-dodgeit) wrote :

For now it seems that putting the transform element into the right object per hand does the job.
Unfortunately nobody seems to be working on this.

thb, you said in bug 57215 you had currently no bandwidth to fix it properly, but it seems there are not so many people able to fix it at all. Just as a reminder, if you have some more bandwidth :)
Thanks so far everyone.

Revision history for this message
jazzynico (jazzynico) wrote :

Marking "Invalid" for Inkscape.

The bug can be reproduced by exporting a chart to SVG directly from Calc, and then opening the exported chart with Firefox (tested with LO 4.2.3.3 and FF 30.0).

Changed in inkscape:
status: New → Invalid
Changed in inkscape (Ubuntu):
status: Confirmed → Invalid
Changed in df-libreoffice:
importance: Unknown → High
status: Unknown → Confirmed
Revision history for this message
In , Owen-genat (owen-genat) wrote :

(In reply to comment #0)
> 2) if I open it with LibreOffice Draw the result is really weird

Just for clarity, the black background of the exported SVG (when again opened in Draw) is reported separately in bug 48632.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.