Bug 132605 - Connector dialog does not allow negative value for Line Skew
Summary: Connector dialog does not allow negative value for Line Skew
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
7.0.0.0.alpha0+
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Connectors Dialog
  Show dependency treegraph
 
Reported: 2020-05-01 22:48 UTC by Regina Henschel
Modified: 2021-02-27 15:48 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
document with connectors to reproduce the error (8.99 KB, application/vnd.oasis.opendocument.graphics)
2020-05-01 22:48 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2020-05-01 22:48:01 UTC
Created attachment 160207 [details]
document with connectors to reproduce the error

Open attached document. It has three standard connectors.
The top-left one has default settings for property "Line Skew".
In the top-right one line 2 of the connector has a value of -4cm, in the bottom one line 2 has a value of 4cm.

Open the dialog "Connector" (from context menu) of the top-right one. Notice, that the value for "line 2" is set to 0. Try to set a negative value for "line 2". It is is not possible.

The dialog must allow negative values for Line Skew, because these values describe the offset to the default value.

I see the error in Version: 5.1.6.1
Build ID: f3e25ec0581f5012f54d8810dcddd5824f4ee374
CPU Threads: 8; OS Version: Windows 6.2; UI Render: default; 
Locale: de-DE (en_US); Calc: group

Version 4.0.1.2 (Build ID: 84102822e3d61eb989ddd325abf1ac077904985) and Version LibreOffice 3.5.4.2 Build ID: 165a79a-7059095-e13bb37-fef39a4-9503d18 had the error, that the Line Skew fields were not enabled at all and only one line had a handle in the UI.

But AOO416m1(Build:9790)  -  Rev. 1844436 2018-10-23 12:57 has it correct.
Comment 1 Julien Nabet 2020-05-02 08:22:30 UTC
On pc Debian x86-64 with master sources updated today, I could reproduce this.
Comment 2 Julien Nabet 2020-05-02 08:34:47 UTC
We may change the range here:
cui/source/tabpages/connect.cxx in SvxConnectionPage::SvxConnectionPage
eg by adding : m_xMtrFldLine2->set_range(-5000, 5000, eFUnit);

What should be the range for:
Line 1 / Line 2 / Line 3 for Line Skew
and
Begin horizontal / End horizontal / Begin vertical / End vertical for Line Spacing

Also, I noticed that when changing connector several times the enable/disable process for Line Skew seems buggy (sometimes an item stays disabled). I'd like to have your opinion before submitting a new bugtracker.
Comment 3 Regina Henschel 2020-05-02 13:33:41 UTC
(In reply to Julien Nabet from comment #2)
> We may change the range here:
> cui/source/tabpages/connect.cxx in SvxConnectionPage::SvxConnectionPage
> eg by adding : m_xMtrFldLine2->set_range(-5000, 5000, eFUnit);
> 
> What should be the range for:
> Line 1 / Line 2 / Line 3 for Line Skew

Fix values are not suitable because the used paper sizes in Draw have a wide range. The fields needs to consider page width/height, -max(width,height) to +max(width,height) perhaps. But I don't know where the restriction to existing coordinates are done. Problematic are banner-like paper formats of e.g 6m x 0.5m.

> and
> Begin horizontal / End horizontal / Begin vertical / End vertical for Line
> Spacing

That is difficult. ODF has non-negative values here. But AOO allows negative values. It would be save to stick to non-negative values and extend to negative values (which requires "extended" on file save) only on concrete user request.
The range is currently 0cm to 10cm. I would change it only on concrete user request. I think, that users, who know to use the dialog, are not beginners and are able to write a bug report.

> 
> Also, I noticed that when changing connector several times the
> enable/disable process for Line Skew seems buggy (sometimes an item stays
> disabled). I'd like to have your opinion before submitting a new bugtracker.

You mean changing the connector type? Line Skew is in ODF only defined for connector type "standard". There should be a field for each currently drawn line segment (besides start and end segment). If you can reliable reproduce, that fields in Line Skew do not correspond to the handles for a connector of type "standard", then it is a bug, which should be reported.

For other line types it is difficult, because the way LibreOffice uses the Line Skew fields is not ODF conform. To get that corrected, larger changes than correcting the dialog would be needed. One problem for example: The handles of connector type "Line" are used to change length of start and end segment. For dragging in UI that would be possible, but the values currently go to Line Skew, whereas they have to go to Line Spacing.

[Connector routing is a night mare. Have a look at the two methods SdrEdgeObj::ImpCalcEdgeTrack in svdoegde.cxx and the comments therein.]
Comment 4 Julien Nabet 2020-05-02 13:48:29 UTC
Thank you Regina for this very detailed feedback.
I must recognize I expected something a less complicated.

Since I know nothing about connectors, I let other devs take a look.
=> uncc myself