Bug 132605 - Connector dialog does not allow negative value for Line Skew
Summary: Connector dialog does not allow negative value for Line Skew
Status: RESOLVED FIXED
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: Regina Henschel
URL:
Whiteboard: target:24.2.0 target:7.6.3
Keywords:
Depends on:
Blocks: Connectors Dialog
  Show dependency treegraph
 
Reported: 2020-05-01 22:48 UTC by Regina Henschel
Modified: 2024-02-20 11:43 UTC (History)
2 users (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
Comment 5 QA Administrators 2023-02-28 03:19:49 UTC Comment hidden (obsolete)
Comment 6 Regina Henschel 2023-02-28 20:19:41 UTC
The error still exists in Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 9d44236a62bf59d120dda89924d0d1407b2bd52b
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded
Comment 7 Regina Henschel 2023-10-09 11:36:39 UTC
A proposed patch is in https://gerrit.libreoffice.org/c/core/+/157700
Comment 8 Regina Henschel 2023-10-09 11:50:50 UTC
@Heiko: Can you please look at the patch? The values -100 work. But I'm not sure about the values (incl 100) at all. They are without unit and it is not clear how they relate to the field values, which for me are in "cm".

The "Line Skew" values are not available in the sidebar. You need to call "Connector" from the context menu or from the Format menu.
Comment 9 Heiko Tietze 2023-10-18 11:50:40 UTC
(In reply to Regina Henschel from comment #8)
> They are without unit and it is not clear how they relate to the field values...
A value of 1.00 results in a 1cm gap. Using kilometer as standard unit keeps cm in the connector dialog. And 1cm still moves by the same distance, probably because the page is also still A4 and in cm. I would ignore all these irritating details (+2'ed the patch).
Comment 10 Commit Notification 2023-10-18 12:37:26 UTC
Regina Henschel committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6c32d052011132e891dab3254bf2a2ea6f31e888

tdf#132605 Negative skew values in connector dialog

It will be available in 24.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Commit Notification 2023-10-19 11:15:32 UTC
Regina Henschel committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/5c89f10495b34fccff1509ec96593dfa4f4532c9

tdf#132605 Negative skew values in connector dialog

It will be available in 7.6.3.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.