Rotation exported from LibreOffice Calc not honored

Bug #1277517 reported by Jens B.
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
Undecided
Unassigned
LibreOffice
Confirmed
Medium

Bug Description

I exported a chart from LibreOffice, however Inkspace dishonors the axis label transformation. I don't know if this is a error in Inkscape or Calc, but seems to me Inkscape relevant.
The XML of the relavant part is:

<text class="TextShape">
  <tspan class="TextParagraph" font-family="Arial" font-size="318px" font-weight="400">
    <tspan class="TextPosition" x="837" y="4893" transform="translate(837,4893) rotate(-90) translate(-837,-4893)">
      <tspan fill="rgb(0,0,0)" stroke="none">RTT in ms</tspan>
    </tspan>
  </tspan>
</text>

If you need more info or an example .svg, feel free to ask. I would love to help.

Revision history for this message
In , Seanmax76 (seanmax76) wrote :

Rotated text appears as non-rotated. Tested in both Drawing and Presentation.

System: LO Version 4.0.0.0.alpha0+ (Build ID: 378e43) @ Linux (Kubuntu 12.10).

OBS: LO Version 3.6.2.2 works fine. The exported svg file has the right rotated text.

How to reproduce (LO 4.0.0.0):
1 - Create a new Drawing or Presentation document.
2 - Insert a new text box (F2) and write something in it.
3 - Select the box and Format->Position and Size (F4).
4 - Select tab "Rotation" and change the rotation angle.
5 - Export do SVG.

Result: non-rotated text in the svg file

Revision history for this message
In , Korrawit Pruegsanusak (detective-conan-1412) wrote :

Confirm on Windows 7 x64 Home Premium, with build from tinderbox Win-x86@6, pull time 2012-11-16 23:06:35, core: 4767bbb00dc9eacce6f6d60fd4c55107333cee2d

Also confirm as regression, because 3.6 beta 1 works fine.

Change platform to All because it is on Linux (comment 0) and Windows (this comment).

Sean, thanks for reporting this bug! :-)

Revision history for this message
In , Libreoffice-bugs (libreoffice-bugs) wrote :

Horacio Fernandes committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b49ea0c9d24aa48d62590cb3443c3ad4143d2e2f

fdo#57215: Fixed wrong text rotation in SVG Export

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.

Revision history for this message
In , Seanmax76 (seanmax76) wrote :

I can confirm the proposed patch fixed the problem. Tested in both Drawing and Presentation.

System: Version 4.0.0.0.alpha1+ (Build ID: affd2b5c4fba727c1b119bdcbdb71325c10ef95) @ Linux (Kubuntu 12.10).

Changing status to "Resolved".

Revision history for this message
In , Jmadero-dev (jmadero-dev) wrote :

Excellent, thanks for marking as FIXED, glad it's solved.

Regards,
Joel

Revision history for this message
In , Korrawit Pruegsanusak (detective-conan-1412) wrote :

Horacio Fernandes,

Thanks for the patch! :-) Unfortunately, I tested with 4.0 beta1 and 4.1.0.0.alpha0+ (Build ID: 8e43393c9514f39e6b43e581503b61177a00bd3) on Windows 7 x64, and it still have this bug. (I opened svg with Google Chrome 23, Firefox Aurora 19, and Internet Explorer 9). REOPENing

I will attach the svg produced in next comment.

Revision history for this message
In , Korrawit Pruegsanusak (detective-conan-1412) wrote :

Created attachment 71132
svg produced -- still have a bug

Revision history for this message
In , Korrawit Pruegsanusak (detective-conan-1412) wrote :

hmm... or all three browsers on my computer can't open this svg correctly?

Revision history for this message
In , Horacio-fernandes (horacio-fernandes) wrote :

It worked on Gimp and I just assumed it was working in the browsers. Already found the problem and I'll have a new patch soon. Thanks for noticing that!

Revision history for this message
In , Michael-meeks-1 (michael-meeks-1) wrote :

Great news Horacio - any progress with the patch ? :-) if it gets in tonight it can be in 4.0 Beta2 - thanks !

Revision history for this message
In , Jmadero-dev (jmadero-dev) wrote :

@Horacio - any update on this one? I can confirm it's still a problem in 4.1 master

Revision history for this message
In , Ruslan (b7-10110111) wrote :

I confirm the bug is present with Version 4.0.0.1+ (Build ID: f3cf01ba35e836ecbef03e8140b8afcbb11fdd4).
BTW, interesting behavior for text in test file and in files I generated:
Not rotated: in Firefox & Inkscape
Rotated: in Geeqie

Revision history for this message
In , Ruslan (b7-10110111) wrote :

More apps:
Rotated: gqview, mirage, gimp, gpicview
Not rotated: opera

Not opened at all (black sheet): LibreOffice... i.e. it doesn't open the file it generated...

Revision history for this message
In , Rb-henschel (rb-henschel) wrote :

The attribute "transform" is in an element "tspan" in the example. But an element "tspan" does not allow an attribute "transform", see list of attributes in http://www.w3.org/TR/SVG/text.html#TSpanElement. It should be on the element "g". The syntax would allow it on the element "text" too, but neither Seamonkey nor Inkscape will rotate the text then.

Revision history for this message
In , Libreoffice-z (libreoffice-z) wrote :

Something went wrong here, this one has nothing to do with Bug 63585

Revision history for this message
In , Thb-b (thb-b) wrote :

Created attachment 78666
Not-quite-perfect patch

Sticking the transform several levels up doesn't cut it either - see attached patch, which works for one paragraph, but messes up with multiple ones, stacked in y-direction. The absolute positioning of both text and paths breaks down badly here, and would need rather more involved changes in svgwriter.cxx

I'd leave it with the current fix for 4.0.x, which at least on FF displays nicely.

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

I experienced this bug in LibreOffice Draw 4.0.3.3 (Ubuntu 13.04 @ 64 bit) while trying to export as svg a chart which has been pasted from Calc: the title of the Y axis lost its rotation.

Revision history for this message
In , Michael-meeks-1 (michael-meeks-1) wrote :

Thorsten - did you mean to close this issue with that patch pushed ? Given that fix - is this still a regression ? fdes - can you file a new bug for your problem, along with a minimal sample document please ?

Thanks !

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

Michael, it seems that only Inkscape shows wrong orientation from such a .svg file, so perhaps it is an Inkscape bug.

However LibreOffice Draw has issues opening its .svg files, so I will file a new bug for this.

Revision history for this message
In , Thb-b (thb-b) wrote :

So, for the while, this seems in limbo - re-assigning to default owner, maybe that gets another volunteer interested. I currently lack the bandwidth to fix it properly, since it would need some rework on how we currently export svg.

Revision history for this message
In , Florianmanschwetus (florianmanschwetus) wrote :

I could confirm still there in 4.1.0.4

Revision history for this message
In , Reuben Thomas (rrt) wrote :

I just came across this bug, which is a particular shame since 4.1 adds hyperlinks to SVG export.

Re. comment 17 "Michael, it seems that only Inkscape shows wrong orientation from such a .svg file, so perhaps it is an Inkscape bug." please let's avoid this mentality. SVG is a standard-defined language, and as pointed out in comment 13, the current output is wrong. Even if all known apps rendered the output correctly, it's a bug and should be fixed (though admittedly in that case the priority would be lower).

Here, Inkscape and current Chrome fail to rotate the text; the fact that Firefox copes is nice for Firefox users, but doesn't make LO's SVG export valid SVG. (Also, the chances are that the problem affects every other WebKit browser too.)

Revision history for this message
In , Momonasmon (momonasmon) wrote :

*** Bug 70723 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Barta-c (barta-c) wrote :

*** Bug 73207 has been marked as a duplicate of this bug. ***

Revision history for this message
Alvin Penner (apenner) wrote :

- could you attach the complete svg file?
- also, which OS, and which version of Inkscape, see Help->About Inkscape

su_v (suv-lp)
tags: added: svg text transformations
Revision history for this message
su_v (suv-lp) wrote :

The SVG 1.1 specification lists 'transform' for <text> but not for <tspan>:

<http://www.w3.org/TR/SVG11/text.html#TextElement>
<http://www.w3.org/TR/SVG11/text.html#TSpanElement>
<http://www.w3.org/TR/SVG11/attindex.html#RegularAttributes>

Possible Inkscape is correct in ignoring the 'transform' attribute of the <tspan> element (Batik 1.7 does, too).

(Needs to be verified)

Revision history for this message
su_v (suv-lp) wrote :

Related bug report for LibreOffice:
<https://bugs.freedesktop.org/show_bug.cgi?id=65788>

«the problem is that the code is "correct", but sadly the translate and rotate is "added" in the wrong object (tspan instead of text)»
<https://bugs.freedesktop.org/show_bug.cgi?id=65788#c3>

Revision history for this message
su_v (suv-lp) wrote :

Proposing to close as 'Invalid' for project 'Inkscape'.

Revision history for this message
Jens B. (jens-bavendiek) wrote :

Thanks for the clarification and quick response!

Changed in inkscape:
status: New → Invalid
Revision history for this message
In , Stéphane Guillou (stephane-guillou) wrote :

Moving to mab4.1 (Bug 60270) because:
- 4.0 reached EOL (End Of Life)
- bug confirmed in later version

Revision history for this message
In , Luiz Angelo Daros de Luca (luizluca) wrote :

Still present in 4.2.1.1. Inkscape and IE shows no rotation. I also tried to open it in LO but it is not able to read its own exported svg file.

Revision history for this message
In , Stéphane Guillou (stephane-guillou) wrote :

*** Bug 75381 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Barta-c (barta-c) wrote :

Created attachment 98959
test .odp file with rotated text

still reproducible under Win7x64 using 4.2.4.2 and 4.3.0.0.alpha1+
Build ID: a1dd961c3093f5f7624e4d1f2240e9120fd13f23
TinderBox: Win-x86@39, Branch:master, Time: 2014-05-06_11:47:48

I attach a minimal test case and move this to mab4.2 list since 4.1.x is END OF LIFE

Revision history for this message
In , Christopher Yeleighton (giecrilj) wrote :

Still in 4.2.5.2 (Linux, x64).

Revision history for this message
In , Guilleron29 (guilleron29) wrote :

*** Bug 82520 has been marked as a duplicate of this bug. ***

Revision history for this message
In , ulrfuc (u-fuchs) wrote :

Bug also in 4.3.2.2 /kubuntu

Revision history for this message
In , Jmadero-dev (jmadero-dev) wrote :

Please don't update version - it's the oldest version that demonstrates the problem, not newest. Thanks

Revision history for this message
In , Takis Issaris (panagiotis-e) wrote :

I'm having the same problem on OS X 10.9.5 with LibreOffice 4.3.2.2.

Changed in df-libreoffice:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
In , Barta-c (barta-c) wrote :

still reproducible under Win8.1 x64 using LO 4.3.4.1 and 4.5.0.0.alpha0+
Build ID: 6b096f273ac9d7bbe93d2cb083958b3a04866d73
TinderBox: Win-x86@42, Branch:master, Time: 2014-12-04_22:57:23

moving this to mab4.3 list since 4.2.x is END OF LIFE.

I set status to NEW since there's no assigned developer to it.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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