Bug 125547 - Arc is displayed as a straight line
Summary: Arc is displayed as a straight line
Status: RESOLVED WONTFIX
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
6.3.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected
Depends on:
Blocks:
 
Reported: 2019-05-28 11:05 UTC by Xisco Faulí
Modified: 2019-05-29 08:28 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
sample file (18.50 KB, application/vnd.ms-powerpoint)
2019-05-28 11:05 UTC, Xisco Faulí
Details
comparison MSO 2010 and LibreOffice 6.3 Master (19.78 KB, image/png)
2019-05-28 11:06 UTC, Xisco Faulí
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2019-05-28 11:05:42 UTC
Created attachment 151734 [details]
sample file

Steps to reproduce:
1. Open attached file and go to slide 5

-> The green arch is displayed as a straight line

Reproduced in

Version: 6.3.0.0.alpha1+
Build ID: 69b62cfcbd364d7f62142149c2f690104b217ca1
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

[Bug found by office-interoperability-tools]
Comment 1 Xisco Faulí 2019-05-28 11:06:06 UTC
Created attachment 151735 [details]
comparison MSO 2010 and LibreOffice 6.3 Master
Comment 2 Xisco Faulí 2019-05-28 11:07:30 UTC
This is not a regression but the arch became a straight line in

author	Regina Henschel <rb.henschel@t-online.de>	2019-03-27 14:24:49 +0100
committer	Thorsten Behrens <Thorsten.Behrens@CIB.de>	2019-04-01 11:51:45 +0200
commit 5c725eb7dee248c6d1792a9b9b9a9c813ca627e6 (patch)
tree 9691ff1b3f97f3230e7442b5efba50200920e2df
parent 80152c8c5e3482c1dc29ef1a8fbb1aea4399c39e (diff)
tdf#124029 Force correct import pos&size of mso_sptArc shape

Before, it it was an arch but the coordinates were wrong.

@Regina I thought you might be interested in this issue...
Comment 3 Regina Henschel 2019-05-28 12:17:58 UTC
There is something wrong with the shape (on slide 5). If I open the file in PowerPoint97, I see the start handle at the top of the shape, although the arc starts at the right edge. If I drag the handle a little bit, then the large arc vanishes and I get a short arc from the top left handle to the top right handle. 

You have used MSO 2010 for the screen shot. Can you please check the handles there? My PP 365 does not import handles from arc in binary format at all.

How was this shape generated?
Comment 4 Xisco Faulí 2019-05-28 12:28:10 UTC
(In reply to Regina Henschel from comment #3)
> There is something wrong with the shape (on slide 5). If I open the file in
> PowerPoint97, I see the start handle at the top of the shape, although the
> arc starts at the right edge. If I drag the handle a little bit, then the
> large arc vanishes and I get a short arc from the top left handle to the top
> right handle. 
> 
> You have used MSO 2010 for the screen shot. Can you please check the handles
> there? My PP 365 does not import handles from arc in binary format at all.
> 
> How was this shape generated?

I got this file from https://bz.apache.org/ooo/show_bug.cgi?id=119480
How can I check the handles in MSO2010 ?
Comment 5 Regina Henschel 2019-05-28 13:05:05 UTC
(In reply to Xisco Faulí from comment #4)
> How can I check the handles in MSO2010 ?

If you click on the arc it should switch to edit mode. Then you should see two yellow diamonds, which you can drag to alter the angle of the arc. First try with one of the arcs on the other slides to see how it works.
Comment 6 Regina Henschel 2019-05-28 17:11:09 UTC
The default start angle for an arc is -90deg, default end value is 0deg. So if the shape wants to use a start angle of 0deg, it has to be written as direct value into the file. That is not the case, at least LibreOffice gets a "not set", when it opens the file. In case a value is not set, the default value is used. So the adjustment values tell, that an arc from -90deg to -81deg has to be drawn.

The commands given in the path describe an arc from (43200|21600) to (24979|266) in a rectangle of left|top = (0|0) to right|bottom = (43200||43200).

The effect of this mismatch is, that a huge width of the shape is calculated. If you zoom out, you see the complete shape. Resize it to a reasonable width and zoom back to 100%. Now you see, that the line is not straight, but that it is an arc with start angle -90deg and end angle -81deg.

PowerPoint 365 initially evaluates the path and not the handles. LibreOffice regenerates the path from the handles and thus has a different result.

I cannot produce such file from scratch. I suspect, that the angles have been manually set using a script. I'm not sure if it's worth the effort to include parts in the code that repair such inconsistencies within the file.
Comment 7 Xisco Faulí 2019-05-29 08:28:13 UTC
(In reply to Regina Henschel from comment #6)
> The default start angle for an arc is -90deg, default end value is 0deg. So
> if the shape wants to use a start angle of 0deg, it has to be written as
> direct value into the file. That is not the case, at least LibreOffice gets
> a "not set", when it opens the file. In case a value is not set, the default
> value is used. So the adjustment values tell, that an arc from -90deg to
> -81deg has to be drawn.
> 
> The commands given in the path describe an arc from (43200|21600) to
> (24979|266) in a rectangle of left|top = (0|0) to right|bottom =
> (43200||43200).
> 
> The effect of this mismatch is, that a huge width of the shape is
> calculated. If you zoom out, you see the complete shape. Resize it to a
> reasonable width and zoom back to 100%. Now you see, that the line is not
> straight, but that it is an arc with start angle -90deg and end angle -81deg.
> 
> PowerPoint 365 initially evaluates the path and not the handles. LibreOffice
> regenerates the path from the handles and thus has a different result.
> 
> I cannot produce such file from scratch. I suspect, that the angles have
> been manually set using a script. I'm not sure if it's worth the effort to
> include parts in the code that repair such inconsistencies within the file.

Hi Regina,
Thanks for the great analysis.
You're the expert here, so I agree with you opinion. Let's close it as RESOLVED WONTFIX.
Thanks