Issue 120437 - [From Symphony]Connector line does not shown correctly in grouped object
Summary: [From Symphony]Connector line does not shown correctly in grouped object
Status: CLOSED FIXED
Alias: None
Product: Draw
Classification: Application
Component: open-import (show other issues)
Version: 4.0.0-dev
Hardware: All All
: P3 Normal (vote)
Target Milestone: 4.0.0
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-02 01:40 UTC by Jianyuan Li
Modified: 2012-12-26 08:29 UTC (History)
3 users (show)

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


Attachments
Test sample file for this issue (18.00 KB, application/vnd.ms-powerpoint)
2012-08-02 01:40 UTC, Jianyuan Li
no flags Details
Actual result 1 (16.70 KB, image/jpeg)
2012-08-02 01:43 UTC, Jianyuan Li
no flags Details
Actual result 2 (9.95 KB, image/jpeg)
2012-08-02 01:44 UTC, Jianyuan Li
no flags Details
Another test sample file for this issue (37.50 KB, application/vnd.ms-powerpoint)
2012-08-02 09:11 UTC, Jianyuan Li
no flags Details
Proposed patch to fix most problems (6.52 KB, patch)
2012-08-03 11:28 UTC, Armin Le Grand
no flags Details | Diff
New extended patch, replaces first one. (8.15 KB, patch)
2012-08-03 14:44 UTC, Armin Le Grand
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description Jianyuan Li 2012-08-02 01:40:04 UTC
Created attachment 78808 [details]
Test sample file for this issue

Reproduce step:
1. Import the sample file in AOO. It is a MS 2003 ppt file.
2. Check the import result. See the two jpg files in attachment.
Expect result: The imported connector line in group object should be the same as in sample ppt file.
Actual result: Connector line with red bound is shown incorrectly. Its two ends get away from the connection points of rectangular which is connected by it.
Comment 1 Jianyuan Li 2012-08-02 01:43:48 UTC
Created attachment 78809 [details]
Actual result 1
Comment 2 Jianyuan Li 2012-08-02 01:44:07 UTC
Created attachment 78810 [details]
Actual result 2
Comment 3 Jianyuan Li 2012-08-02 04:46:03 UTC
I am working on this issue.
Comment 4 Jianyuan Li 2012-08-02 08:46:53 UTC
The issue can be fixed by add some code in filter(msdffimp.cxx) for connector line import.
Comment 5 Jianyuan Li 2012-08-02 09:11:00 UTC
But for connector line in organization chart in attachment file "oc.ppt", the change in filter(msdffimp.cxx) still does not work. Comparing its AOO import result with the attachment "realgrouped.ppt", its connector line will not become normal when drag the grouped object(for "realgrouped.ppt", dragging can result in a normal connector line).
Comment 6 Jianyuan Li 2012-08-02 09:11:49 UTC
Created attachment 78827 [details]
Another test sample file for this issue
Comment 7 Armin Le Grand 2012-08-03 08:15:32 UTC
ALG: Attachment 78808 [details] (example1): Ungrouping corrects the connector.
Attachment 78827 [details]: The connector is not connected to the shapes at all, thus no refresh on actions taken.
Taking a look...
Comment 8 Armin Le Grand 2012-08-03 09:59:43 UTC
ALG @Jianyuan Li: When removing SdrEdgeObj::NbcRotate/NbcMirror/NbcShear the trink AOO behaves like the AOO34 release. Does this fix the error from your POV? I'm asking since even in AOO3.4 the connector(s) in question are not nicely layouted and 'snap' when moving the group.
BTW: It has to do with bEdgeTrackUserDefined, a compatibility feature Sven Jacobi had added once for PPT where the layouted paths of connectors get imported.
Comment 9 Armin Le Grand 2012-08-03 11:19:29 UTC
ALG: Connectors do not get relayouted for two reasons:
- In SdrModel::setLock calling ImpReformatAllEdgeObjects has no effect since mbModelLocked is still on true (checked inside ImpReformatAllEdgeObjects).
- SdrObjList::ReformatAllEdgeObjects() goes currently only over the flat page hierarchy, so connectors in groups will not be handled at all.

When correcting both, example1 loads well, it's connectors are not really bEdgeTrackUserDefined, they get connections set for both ends.

Example2 does not change. Closer looking shows that it is a real case of bEdgeTrackUserDefined. When looking at the PPT file (in PPT) it can be seen that the connector in question is hidden half behind object 3. If applying the transformations to the imported edge track, the start and end point will be correct, but still the connector is layouted as:

 _|
|

instead of
 _
|
|

This may be because the control point data (the offset controllers) do not get imported, but I do not know for sure. Preparing proposed patch.
Comment 10 Armin Le Grand 2012-08-03 11:28:28 UTC
Created attachment 78841 [details]
Proposed patch to fix most problems

ALG @Jianyuan Li: Please have a look.
Comment 11 Jianyuan Li 2012-08-03 12:42:43 UTC
@Armin:

There is a concept "skew" in AOO(See connector configuration dialog). We can adjust the imported connector line as one in MS 2003. Then its skew value will be changed. So this value will impact the connector line drawing.
This concept does not exist in MS 2003. So filter does nothing for this property. And core function will set a default value 0 for it.
I think this results in the issue. Symphony works well for this issue. In it, nothing is set for skew value. Can the default value 0 be not set in AOO?
Comment 12 Jianyuan Li 2012-08-03 12:56:50 UTC
I think filter imports connector line edge path(with adjustment value) correctly.
Comment 13 Jianyuan Li 2012-08-03 12:58:12 UTC
I will check the patch later. A new code base is loaded and being built......
Comment 14 Armin Le Grand 2012-08-03 14:18:54 UTC
ALG @Jianyuan Li: The skew value is zero (on default). This creates the standard connector form. I am curious if it gets layouted at all, it should not since it is a bEdgeTrackUserDefined case.
Comment 15 Armin Le Grand 2012-08-03 14:42:27 UTC
ALG: Two more additions:

- in SdrEdgeObj::ConnectToNode reset bEdgeTrackUserDefined when really a 
connection to an SdrObject gets set. This can no longer be a EdgeTrackUserDefined case.

- in SdrEdgeObj::ImpRecalcEdgeTrack return always when bEdgeTrackUserDefined or no model or model locked. This avoids reliably the overwriting of bEdgeTrackUserDefined cases and their imported polygons (as the other cnages, cannot have worked for quite some time).

With this changes both exampes work fine, example2 shows connector as in PPT. Preparing extended patch.
Comment 16 Armin Le Grand 2012-08-03 14:44:17 UTC
Created attachment 78842 [details]
New extended patch, replaces first one.

ALG @Jianyuan Li: Please have a look. Just use 2nd patch (this one), it contains first one.
Comment 17 Jianyuan Li 2012-08-06 08:31:22 UTC
@Armin:
The second patch look very good:
1. The regression issue(fix for i54102, revision 1351648) is fixed.
2. The connector is layouted correctly:
 _
|
|
instead of

 _|
|

Thanks.
Comment 18 Armin Le Grand 2012-08-06 08:44:02 UTC
ALG: Need to change more. It is not okay to not transform the bEdgeTrackUserDefined path because this is nee3ded for interactive editing later. The error is not to transform the geometry, but that it gets transformed when importing it. The PPT import filter has the knowledge that this bEdgeTrackUserDefined path is in already transformed form and should not call any transformations when importing.
Doing needed changes...
Comment 19 SVN Robot 2012-08-06 09:32:46 UTC
"alg" committed SVN revision 1369760 into trunk:
#120437# Connector corrections in groups and PPT imports
Comment 20 Armin Le Grand 2012-08-06 09:32:57 UTC
ALG: Found the place where the correction is needed, mirror flags were already resetted. Added resetting rotation flag to not apply it twice. Built, tested, works as expected. Result is as in comment17, checking in code, done in revision 1369760.
Comment 21 liuping 2012-08-28 07:34:38 UTC
confirm on AOO350ml 1377620 on Win7-64bit