Created attachment 80869 [details] 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)
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.
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
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 "outstanding defects"</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 "outstanding defects"</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)
@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. ;-)
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ž
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.
(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.
Chr. Rossmanith committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=cacc3a0e7f7b04240daf63b45e457428388f4929 tdf#65788: svg export - put transform attribute into text element It will be available in 4.5.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
The -90 text rotation is now correctly rendered during SVG export. XML of the SVG has rotation in TextShape, rather than TextParagraph within tspan.
Chr. Rossmanith committed a patch related to this issue. It has been pushed to "libreoffice-4-4": http://cgit.freedesktop.org/libreoffice/core/commit/?id=cefea9d05085bfc0e485fae5d927544a9e07739c&h=libreoffice-4-4 tdf#65788: svg export - put transform attribute into text element It will be available in 4.4.5. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.