Issue 123048 - line skew parameter is not read from file for connectors in OO draw
Summary: line skew parameter is not read from file for connectors in OO draw
Status: CLOSED FIXED
Alias: None
Product: Draw
Classification: Application
Component: open-import (show other issues)
Version: 4.0.0
Hardware: PC All
: P3 Normal (vote)
Target Milestone: 4.0.1
Assignee: Armin Le Grand
QA Contact: Prachi
URL:
Keywords: regression
: 123315 (view as issue list)
Depends on:
Blocks:
 
Reported: 2013-08-16 08:28 UTC by Joerg
Modified: 2017-05-20 10:34 UTC (History)
8 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---
jsc: 4.0.1_release_blocker+


Attachments
TGZ contins three files, my sample odg file, one picture after saving the file, one picture after re-opening the file. (10.18 KB, application/x-compressed)
2013-08-16 08:28 UTC, Joerg
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Joerg 2013-08-16 08:28:51 UTC
Created attachment 81340 [details]
TGZ contins three files, my sample odg file, one picture after saving the file, one picture after re-opening the file.

I have two standard connector lines between two objects (e.g. rectangles)
In order to avoid the lines lying above each other the "line skew" parameter was used (using the gui).
When reopening the file, all lines are lying above each other again an the line skew parameters are "0".
As the "line skew" parameters are set correctly in the content.xml file, I assume that the reading of the parameter / filling the connector object is not working correctly somehow.

Verified on Linux (RHEL6) and Windows XP with Apache OO draw 4.0.0
Comment 1 Joe Smith 2013-08-16 13:46:36 UTC
I see this as well, testing
AOO400m3(Build:9702)  -  Rev. 1503704
2013-07-16 11:18:40 (Tue, 16 Jul 2013) - Linux i686

Steps:
1) File > New > Draw
2) Insert two objects
3) Add a connector between glue points on the two objects
4) Manually adjust the routing of the connector (drag the middle handle, for example)
5) File > Save
6) File > Reload

The connector has returned to the default routing; the manual adjustment is lost.

As Joerg mentioned, the file seems fine: a file created with 4.0 then loaded in AOO 3.4.1 shows the correct adjustment. This looks like a regression.
Comment 2 Dietmar 2013-08-18 08:15:11 UTC
I ran into the same problem. I created a more complex diagram with many connectors requiring careful adjustments to maintain readability. After save and reload of the file all adjustments were gone. The problem can be consistently replicated. If data are required I could submit an example, too.
Environment is Draw 4.0 on Win 7.
Comment 3 Regina Henschel 2013-08-18 14:12:35 UTC
It is an error in opening. The information in the file format is correct, both the line-skew attribute and the calculated path.

It is OK in AOO3.4.1

It fails at least since r1370716.
Comment 4 Regina Henschel 2013-08-28 11:28:37 UTC
It is severe, that existing drawings are destroyed on opening. Therefore I request release blocker.
Comment 5 jsc 2013-08-30 11:51:17 UTC
do we have a fix already in place?
Comment 6 Regina Henschel 2013-08-30 12:26:32 UTC
No. I think Armin will know, whether it is safely doable for AOO4.01. I put him in CC.
Comment 7 Armin Le Grand 2013-08-30 12:53:36 UTC
ALG: I will take this one as it's on my list, currently still on another one...
Comment 8 Regina Henschel 2013-08-30 22:14:59 UTC
It wsa OK in r1369534, and broken in r1369786
Comment 9 Armin Le Grand 2013-09-02 12:21:29 UTC
ALG: Grepping, taking a look, building xmloff...
Comment 10 Armin Le Grand 2013-09-02 13:30:12 UTC
ALG: What has changed is that the layout suppression in 3.4.1 was not working for 3.4.1 due to the following line:

	if ( bEdgeTrackUserDefined && (GetModel() && GetModel()->isLocked()) )

This was adapted to

    if(bEdgeTrackUserDefined || !GetModel() || GetModel()->isLocked())

which works as designed, so ImpCalcEdgeTrack will never be used during load. Problem is that the former error allowed values from the ItemSet to be set at the EdgeTrack using ImpSetAttrToEdgeInfo; this is *never* done now before later in SdrEdgeObj::ImpRecalcEdgeTrack() really

		*pEdgeTrack=ImpCalcEdgeTrack(*pEdgeTrack,aCon1,aCon2,&aEdgeInfo);
		ImpSetEdgeInfoToAttr();

is called. This *will* kill values which are in the ItemSet, but were vere adapted/set at the EdgeInfo (in ImpSetEdgeInfoToAttr). To solve this, the object needs to remember if ImpCalcEdgeTrack was ever suppressed, and if yes, get to a valid state by calling ImpCalcEdgeTrack once and then ImpSetAttrToEdgeInfo. After that, all will be as if layouting would have never been suppressed at all.

Testing this theory...
Comment 11 Armin Le Grand 2013-09-02 13:32:35 UTC
ALG: Works as intended. This error shows how fragile stuff as the connectors is and that it nees rework urgently. Having redundant information in the ItemSet and in the local EdgeInfo is dangerous (as rendundant information always is).
Doing some more tests...
Comment 12 Armin Le Grand 2013-09-02 14:29:02 UTC
ALG: Okay, looks good. Comitting and requesting AOO401 flag due to regression...
Comment 13 Armin Le Grand 2013-09-02 14:30:51 UTC
Committed for AOO410
Comment 14 jsc 2013-09-02 14:43:40 UTC
approve showstopper request
Comment 15 SVN Robot 2013-09-02 15:13:28 UTC
"alg" committed SVN revision 1519451 into trunk:
i123048 Corrected connector layout after reload
Comment 16 Joe Smith 2013-09-02 15:34:36 UTC
Hmm, a 4.0.1 release blocker yet the committed target is is 4.1?

A typo, or I'm confused again.

ALG: Thanks for looking at this!
Comment 17 jsc 2013-09-02 15:43:36 UTC
correct target
Comment 18 Armin Le Grand 2013-09-03 09:09:03 UTC
@Joe: As long as the flag is not on '+' I see the fix targeted to AOO410. *If* the flag is given, I change it when comitting to AOO401 usually.
Comment 19 jsc 2013-09-03 09:12:28 UTC
approve showstopper request again
Comment 20 jsc 2013-09-03 09:16:02 UTC
set target milestone
Comment 21 Armin Le Grand 2013-09-03 09:54:34 UTC
ALG: Checked and committed to AOO401, changed target, done.
Comment 22 SVN Robot 2013-09-03 10:04:14 UTC
"alg" committed SVN revision 1519625 into branches/AOO401:
i123048 Corrected connector layout after reload
Comment 23 fanyuzhen 2013-09-05 02:53:34 UTC
The latest available build in cwiki is AOO401m2(Build:9711)  -  Rev. 1518667, waiting for the build AOO401 (rev. 1519625) or the later
Comment 24 Prachi 2013-09-06 02:06:50 UTC
This problem still exist in AOO401m2(Build:9711)  -  Rev. 1518667
OS win 7
Comment 25 Ariel Constenla-Haile 2013-09-06 02:09:17 UTC
(In reply to Prachi from comment #24)
> This problem still exist in AOO401m2(Build:9711)  -  Rev. 1518667
> OS win 7

Per comment 22 this was fixed in revision 1519625
1518667 < 1519625
Comment 26 Ariel Constenla-Haile 2013-09-06 02:28:49 UTC
back to fixed
Comment 27 Armin Le Grand 2013-09-06 08:46:01 UTC
ALG:
@Ariel: Thanks, you were faster than me!
@Prachi: Thanks that you offer support and started reviewing, please look at my comment 20 in task 122982 for more info on revisions.
@Yuzhen Fan: Seems you should give people more information when you hand over tasks for reviewing...
Comment 28 Regina Henschel 2013-10-14 19:02:26 UTC
*** Issue 123315 has been marked as a duplicate of this issue. ***