Apache OpenOffice (AOO) Bugzilla – Issue 119480
[From Symphony]Curve in Background cannot be displayed correctly in AOO3.4
Last modified: 2019-03-11 18:49:38 UTC
Created attachment 77675 [details] sample file build:AOO3.4_1327774 Steps: 1.open the sample in AOO3.4 and switch to slide master view 2.check the slide background defect: Curve in Background cannot be displayed correctly in AOO3.4
I'm checking this defect.
root cause: 1.Open sample file with MS PPT 2003; 2.Enter the title master page view, select the object contain the curve; 3.Ungroup the object; 4.Find the curve autoshape isn't normal,which has been wrong processed.
can reproduce in AOO 3.4,change confirm status
Created attachment 78570 [details] simple sample file which can reproduced this defect
Created attachment 78571 [details] patch for ppt import damaged curve error
solution: Use the path data to calculate the start angle of special arc.
Created attachment 78583 [details] patch for ppt import damaged curve error
Your patch looks basically good. But I still have two questions: - Regarding the use of atan() on line 4558: What do you thing about using atan2() instead? That would allow detection of the right quadrant. - Regarding the call of NormAngle360() on line 4559: NormAngle360() seems to expect arguments that are given as angle, measured in degree*100 (in the range [0,36000) for a full circle). In the patch, however, the argument is the result of atan()*100. Atan() returns a value in radian (range [-pi/2,+pi/2]). Is there a transformation factor missing (radian to degree) or am I missing something?
commets is very valuable. and atan2 is a better choice^_^. and in line 4558,the var fnumber should in [0,360]. change the code in the following: fNumber = atan2( double( aStartPt.X() - cent.X() ),double( aStartPt.Y() - cent.Y() ) )+ F_PI; // 0..2PI fNumber /= F_PI180; // 0..360.0 pls review.
Created attachment 78590 [details] patch for ppt import damaged curve error
Thanks for the update, looks better now. Just one more question. There is a change on line 4520 (second hunk of the patch). This changed from the first version of the patch to the second version from if ( nNumElemVert >= 3 ) to if ( nNumElemVert >= 4 ) Which one is correct?
Created attachment 78601 [details] patch for ppt import damaged curve error if ( nNumElemVert >= 3 ) is correct, I created patch based on my old code. update the patch.
@SunYing: Thanks for your fix and your patience with my questions. Committted with SVN revision 1359096.
Comment on attachment 78583 [details] patch for ppt import damaged curve error Superseded by next patch.
Comment on attachment 78601 [details] patch for ppt import damaged curve error Reviewed, OK.
Verified on AOo trunk r1374181. Curve in backgrond still not same as Curve in MS
look comment16, change status to reopened.
Verified on Windows7-64bit &Ubuntu10.04 &Mac10.7 &Redhat &Ubuntu-64bit with AOO trunk r1374181 ,Pass
But still have a blue line in AOO ,no blue line in MS refer capture.png
Created attachment 79107 [details] Capture.png
I will checking this issue again
The solution is in https://gerrit.libreoffice.org/68941. You can use it. I provide it hereby under Apache * License, Version 2.0. I have no build environment for Apache OpenOffice.
@Regine: Thanks for this. I've changed the isssue type to PATCH to make it easier to identify such kind of issues.