Issue 119480 - [From Symphony]Curve in Background cannot be displayed correctly in AOO3.4
Summary: [From Symphony]Curve in Background cannot be displayed correctly in AOO3.4
Status: REOPENED
Alias: None
Product: Impress
Classification: Application
Component: save-export (show other issues)
Version: 3.4.0
Hardware: PC All
: P3 Normal (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-29 03:36 UTC by Du Jing
Modified: 2019-03-11 18:49 UTC (History)
6 users (show)

See Also:
Issue Type: PATCH
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
sample file (77.45 KB, application/x-rar-compressed)
2012-05-29 03:36 UTC, Du Jing
no flags Details
simple sample file which can reproduced this defect (18.50 KB, application/vnd.ms-powerpoint)
2012-07-04 02:47 UTC, SunYing
no flags Details
patch for ppt import damaged curve error (1.92 KB, patch)
2012-07-04 02:48 UTC, SunYing
no flags Details | Diff
patch for ppt import damaged curve error (1.92 KB, patch)
2012-07-05 06:23 UTC, SunYing
no flags Details | Diff
patch for ppt import damaged curve error (2.00 KB, patch)
2012-07-08 06:52 UTC, SunYing
no flags Details | Diff
patch for ppt import damaged curve error (2.00 KB, patch)
2012-07-09 09:35 UTC, SunYing
awf.aoo: review+
Details | Diff
Capture.png (321.85 KB, image/png)
2012-08-24 02:36 UTC, liuping
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Du Jing 2012-05-29 03:36:42 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
Comment 1 SunYing 2012-07-02 05:52:38 UTC
I'm checking this defect.
Comment 2 SunYing 2012-07-03 02:09:45 UTC
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.
Comment 3 Du Jing 2012-07-03 02:12:47 UTC
can reproduce in AOO 3.4,change confirm status
Comment 4 SunYing 2012-07-04 02:47:21 UTC
Created attachment 78570 [details]
simple sample file which can reproduced this defect
Comment 5 SunYing 2012-07-04 02:48:21 UTC
Created attachment 78571 [details]
patch for ppt import damaged curve error
Comment 6 SunYing 2012-07-04 02:48:48 UTC
solution:
Use the path data to calculate the start angle of special arc.
Comment 7 SunYing 2012-07-05 06:23:51 UTC
Created attachment 78583 [details]
patch for ppt import damaged curve error
Comment 8 Andre 2012-07-06 14:53:57 UTC
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?
Comment 9 SunYing 2012-07-08 06:23:32 UTC
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.
Comment 10 SunYing 2012-07-08 06:52:10 UTC
Created attachment 78590 [details]
patch for ppt import damaged curve error
Comment 11 Andre 2012-07-09 09:15:50 UTC
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?
Comment 12 SunYing 2012-07-09 09:35:08 UTC
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.
Comment 13 Andre 2012-07-09 12:11:50 UTC
@SunYing: Thanks for your fix and your patience with my questions.

Committted with SVN revision 1359096.
Comment 14 Andre 2012-07-09 12:12:15 UTC
Comment on attachment 78583 [details]
patch for ppt import damaged curve error

Superseded by next patch.
Comment 15 Andre 2012-07-09 12:12:34 UTC
Comment on attachment 78601 [details]
patch for ppt import damaged curve error

Reviewed, OK.
Comment 16 Li Feng Wang 2012-08-21 06:02:14 UTC
Verified on AOo trunk r1374181.
Curve in backgrond still not same as Curve in MS
Comment 17 Li Feng Wang 2012-08-23 01:56:18 UTC
look comment16, change status to reopened.
Comment 18 liuping 2012-08-23 02:59:10 UTC
Verified on Windows7-64bit &Ubuntu10.04 &Mac10.7 &Redhat &Ubuntu-64bit with AOO trunk r1374181 ,Pass
Comment 19 liuping 2012-08-24 02:35:49 UTC
But still have a blue line in AOO ,no blue line in MS
refer capture.png
Comment 20 liuping 2012-08-24 02:36:41 UTC
Created attachment 79107 [details]
Capture.png
Comment 21 SunYing 2012-08-24 02:42:14 UTC
I will  checking this issue again
Comment 22 Regina Henschel 2019-03-11 00:54:43 UTC
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.
Comment 23 Marcus 2019-03-11 18:49:38 UTC
@Regine:
Thanks for this. I've changed the isssue type to PATCH to make it easier to identify such kind of issues.