Issue 124452 - Horizontal text in Libre Office turns into vertical text in OpenOffice - using shapes with "word wrap text in shape"
Summary: Horizontal text in Libre Office turns into vertical text in OpenOffice - usin...
Status: CLOSED FIXED
Alias: None
Product: Impress
Classification: Application
Component: open-import (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: PC Windows 7
: P3 Normal (vote)
Target Milestone: 4.2.0
Assignee: Armin Le Grand
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-18 13:15 UTC by bugzillaopenfmm
Modified: 2017-05-20 10:35 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: 4.1.0-beta
Developer Difficulty: ---


Attachments
sample-odp (13.37 KB, application/vnd.oasis.opendocument.presentation)
2014-03-18 13:16 UTC, bugzillaopenfmm
no flags Details
How the document looks like in LO (152.34 KB, image/png)
2014-03-18 13:32 UTC, Ariel Constenla-Haile
no flags Details
How the document looks like in AOO trunk (103.33 KB, image/png)
2014-03-18 13:33 UTC, Ariel Constenla-Haile
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description bugzillaopenfmm 2014-03-18 13:15:20 UTC
My sister recently tried to open a presentation she edited with LibreOffice 3.5 in her school, where they have Apache OpenOffice 4.0.1 [at least I suppose/hope they still update it, since they sort of got bought out by MS last year :( (before they had an oldschool X-thinclient setup using 100Mbit Ethernet - then wondered why video was slow)]. There it turned out, that all text which just displayed fine horizontally on her machine at home, was displayed vertically (one column).
The problematic area are "Shape"-objects, which were created by re-editing an existing pptx (she liked the "styling", but because import of the background didn't work nothing is left over from it anymore) and which have the  "word wrap text in shape" option enabled.
Unfortunately I'm not able to reproduce the bug from scratch, but I attached a sample file (interesting enough only one shape there has the word-wrap option set) and two screenshots (only one attachment allowed so: http://imgur.com/G5otigj,ZTl0fkC) showing AOO 4.0.1 and LO 4.2 on Windows 7 displaying it (tested also OO 3.2, 4.1beta and LO 3.5 (latter on Linux)).
Comment 1 bugzillaopenfmm 2014-03-18 13:16:39 UTC
Created attachment 82887 [details]
sample-odp
Comment 2 bugzillaopenfmm 2014-03-18 13:18:47 UTC
might relate to: #25278, #102965, #8624 and # 116798
Comment 3 Ariel Constenla-Haile 2014-03-18 13:32:37 UTC
Created attachment 82888 [details]
How the document looks like in LO
Comment 4 Ariel Constenla-Haile 2014-03-18 13:33:12 UTC
Created attachment 82889 [details]
How the document looks like in AOO trunk
Comment 5 Ariel Constenla-Haile 2014-03-18 13:35:15 UTC
Reproduced in trunk and with 3.3.0 (OOO330 m20 Build 9567)
Comment 6 Ariel Constenla-Haile 2014-03-18 13:37:20 UTC
(In reply to bugzillaopenfmm from comment #0)
> only one attachment allowed so
you can always add further attachments after creating the issue
Comment 7 Ariel Constenla-Haile 2014-03-18 13:39:38 UTC
(In reply to bugzillaopenfmm from comment #2)
> might relate to: #25278, #102965, #8624 and # 116798

Recall that if you write bug N bugzilla will replace the text with a link to the bug (making it easier to navigate to the bug ;) ):

bug 25278 
bug 102965
bug 8624
bug 116798
Comment 8 Ariel Constenla-Haile 2014-03-18 13:42:49 UTC
(In reply to Ariel Constenla-Haile from comment #7)
> Recall that if you write bug N bugzilla will replace the text with a link to
> the bug (making it easier to navigate to the bug ;) ):
> 
> bug 25278 
> bug 102965
> bug 8624
> bug 116798

mmm looks like INFRA-7463 broke this. Let's see with issue:

issue 25278
Bug 25278
Comment 9 Oliver-Rainer Wittmann 2014-03-18 14:07:09 UTC
As Regina is one of the custom shape experts and the two objects on the presentation slides are custom shape I am putting her on CC.

Regina, could you please have a look. Thx in advance.
Comment 10 Regina Henschel 2014-03-18 18:59:06 UTC
The error is in the file. The enhanced geometry uses the attribute values "logwidth" and logheight" in the formulas. These are specified to "The width of the svg:viewBox attribute in 1/100th mm is used." and "The height of the svg:viewBox attribute in 1/100th mm is used." [table 11 in section 19.171 draw:formula in ODF1.2 part 1]

But the shapes have svg:viewBox="0 0 0 0". This results in logwidth=0mm and logheight=0mm. If the wrong value of the svg:viewBox is replaced by a suitable value derived from the svg:width and svg:height attribute, then the shapes are rendered as in LO.

In SVG graphic context zero width and zero height in the svg:viewBox value would disable rendering of the element.

For me the error is in LO, which seems to write such svg:viewBox="0 0 0 0" attribute and seems to calculate logwidth and logheight not from the svg:viewBox attribute but from the svg:width and svg:height.

Perhaps we can make AOO more fault tolerant and write some meaningful values, when reading such faulty svg:viewBox value? Perhaps convert svg:width to 1/100th mm and take that value for the third svg:viewBox parameter, same for height for the forth parameter?
Comment 11 Armin Le Grand 2014-03-19 11:30:39 UTC
I agree with Regina, we should just silently correct this on load. Maybe Regina could tell LO to also fix that error in the meantime...?
Comment 12 Regina Henschel 2014-03-19 12:39:03 UTC
Told LO in https://bugs.freedesktop.org/show_bug.cgi?id=76334
Comment 13 Armin Le Grand 2014-03-19 14:51:37 UTC
Adding code to correct at load time...
Comment 14 Armin Le Grand 2014-03-19 14:52:23 UTC
Okay, done.
Comment 15 SVN Robot 2014-03-19 14:54:04 UTC
"alg" committed SVN revision 1579246 into trunk:
i124452 correct svg:viewBox for EnhancedCustomShape geometry import when no w...
Comment 16 hdu@apache.org 2014-03-20 08:10:25 UTC
(In reply to SVN Robot from comment #15)
> "alg" committed SVN revision 1579246 into trunk:
> i124452 correct svg:viewBox for EnhancedCustomShape geometry import when no...

This commit has a problem. The buildbots reported "xmloff/source/draw/ximpcustomshape.cxx:877: error: 'aTransformMatrix' was not declared in this scope"
Comment 17 SVN Robot 2014-03-20 10:05:12 UTC
"alg" committed SVN revision 1579578 into trunk:
i124452 correct empty svg:viweBox, added missing include
Comment 18 bugzillaopenfmm 2014-03-20 13:30:44 UTC
Since the cause of the bug is fixed now, I just wanted to thank you all for your quick response, that's basically excellent customer service and now I not only can tell people saying "such things won't happen with commercial software": "Yes they'll happen too" but even "tell me, how long does bug acknowledgment take with your vendor?"
Comment 19 Armin Le Grand 2014-03-21 09:35:14 UTC
Hi bugzillaopenfmm, tanks for the comment. I have to response, since the #cause# of the bug is not fixed AFAIK and is an error in LO, the error importing a wrong ODF statement is fixed/corrected in AOO. It is sad that besides fixing importing stuff for completely other office packages (which is needed) the same starts now for the OO family, too. This seems extra work and avoidable, sigh, and is not really the OpenSource idea IMHO. Just my 2 ct..