Bug 150743 - [Editing] Horizontal line will disappear while setting position and height through sidebar if "Keep ratio" is set.
Summary: [Editing] Horizontal line will disappear while setting position and height th...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
7.0.0.3 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisectRequest, regression
Depends on:
Blocks: Shapes-Line
  Show dependency treegraph
 
Reported: 2022-09-01 13:23 UTC by Robert Großkopf
Modified: 2024-03-23 19:17 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
DrawMenue.png (11.16 KB, image/png)
2022-10-06 18:07 UTC, Hans-Werner
Details
LO 3.6.7.2.odt (630.35 KB, application/vnd.oasis.opendocument.text)
2022-10-07 08:43 UTC, Hans-Werner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Großkopf 2022-09-01 13:23:58 UTC
Open a new Draw document. Could also be a Writer document or something else with toolbar "Drawing" enabled.
Choose "Insert Line" and press shift while inserting.
A horizontal line will appear.
Now switch (on sidebar) to properties of this line.
"Height" is shown as '0,00 cm'
! This value is wrong - properties of context menu of the object will show '0,04 cm' instead. !
Now click by mouse in the field, which shows the height '0,00 cm'. After clicking this click in field for "Width". 
"Width" will be set to '0,00 cm' immediately.

You couldn't change this any more. Only possibility is to delete the line by navigator.

This bug appears on OpenSUSE 15.3 64bit rpm Linux in Writer, Draw - not tested in other modules
Version: 7.4.0.3 / LibreOffice Community
Build ID: f85e47c08ddd19c015c0114a68350214f7066f5a
CPU threads: 6; OS: Linux 5.3; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (de_DE.UTF-8); UI: en-US
Calc: threaded
Comment 1 Robert Großkopf 2022-09-01 13:39:06 UTC
This bug first appears in LO 7.0.0.3 here. Works well on the same machine with LO 6.4.7.2. So a regression.
Tested with OpenSUSE 15.3 64bit rpm Linux.
Comment 2 Jean-Baptiste Faure 2022-09-29 14:47:33 UTC
I do not reproduce in Version: 7.4.3.0.0+ / LibreOffice Community
Build ID: 901297a0361c0b0508e5c9fa413e1002560cb49a
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR
Ubuntu_20.04_x86-64
Calc: threaded

In the sidebar the unit for the width is the point (pt) and in the properties dialog it is cm.

Best regards. JBF
Comment 3 Robert Großkopf 2022-09-29 15:29:52 UTC
Have had a look at this again. The bug appears since LO 7.0.0.3 when "Keep ratio" is set in the sidebar. Have reset the user folder and it wasn't set by default.

Please try it again with "Keep ratio" in sidebar. Will work with "Keep ratio" in LO 6.4.7.2, won't work since LO 7.0.0.3.
Comment 4 LeroyG 2022-10-03 23:10:54 UTC
Testing in Draw. The Unit of measurement is set to "cm".
After inserting an horizontal line (as in the bug Description):
- Height value (Sidebar, Properties, Position and Size) is shown as 0.00 cm.
- Height value (Context menu, Position and Size, Position and Size tab, Size) is shown as 0.00 cm.
That seems correct to me. Lines have 1 dimension.

Line Height ≠ Line Width

Beside that, if line Width value is set to 0.0, Zoom level do not change line height.

(In reply to Robert Großkopf from comment #0)
> properties of context menu of the object will show '0,04 cm' instead. !

Not for me. See that the Line Width in the Style for "Object without fill" could be blamed for that.

Not a bug for me.

Version: 7.3.3.1 / LibreOffice Community
Build ID: 30(Build:1)
CPU threads: 1; OS: Linux 5.14; UI render: default; VCL: gtk3
Locale: es-MX (es_ES.UTF-8); UI: en-US
Calc: threaded
Comment 5 Robert Großkopf 2022-10-04 06:13:59 UTC
(In reply to LeroyG from comment #4)
> Testing in Draw. The Unit of measurement is set to "cm".
> After inserting an horizontal line (as in the bug Description):
> - Height value (Sidebar, Properties, Position and Size) is shown as 0.00 cm.

Seems you haven't read all:
No go to sidebar, 
switch "Keep ratio" on (if it isn't switched on), 
click in "Height" (0,00cm) 
click in "Width"

"Width" will show 0,00cm after this action here.

Could be the behavior is different on you system, because
→ you aren't using a LO-Version directly from LibreOffice
→ you are using VCL: gtk3
Comment 6 Hans-Werner 2022-10-04 08:28:19 UTC
I can confirm this BUG:

Version: 7.3.6.2 (x64) / LibreOffice Community
Build ID: c28ca90fd6e1a19e189fc16c05f8f8924961e12e
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: CL

If "keep ratio" is set "on",

+ it should not be possible to input values for "height", if the line is exactly horizontal.
+ it should not be possible to input values for "width", if the line is exactly vertical.

Because it's possible, the horizontal or vertical line disappears and never comes back.
Comment 7 Hans-Werner 2022-10-04 09:34:54 UTC
No BUG to be seen using:

Version: 6.4.7.2 (x64)
Build-ID: 639b8ac485750d5696d7590a72ef1b496725cfb5
CPU-Threads: 4; BS: Windows 10.0 Build 19044; UI-Render: GL; VCL: win; 
Gebietsschema: de-DE (de_DE); UI-Sprache: de-DE
Calc: CL

+ exactly horizonal line: input of height values is possible and to be seen, but ignored by LO.
+ exactly vertical line: input of width values is possible and to be seen, but ignored by LO.
Comment 8 Jean-Baptiste Faure 2022-10-06 16:37:31 UTC
(In reply to Hans-Werner from comment #6)
> [...]
> If "keep ratio" is set "on",
> 
> + it should not be possible to input values for "height", if the line is
> exactly horizontal.
> + it should not be possible to input values for "width", if the line is
> exactly vertical.

I think you are misunderstanding the meaning of height and width in this case.
Height is the height of the surrounding rectangle around the line.
Width is the line thickness.
So the width is valid whatever is the orientation of the line.

If the line is horizontal, initial height is set to zero. I can change this value and the length of the line is changed accordingly. If I set the height to 0,1cm, the length is multiplied by 100. Restoring the 0cm height the length is set to 0cm too. But it is still possible to select the line, even with the mouse (rectangular selection) and to modify its length.

So, I do not see a bug under Linux with GTK.

Version: 7.4.3.0.0+ / LibreOffice Community
Build ID: 8bc82b41a97461a6b03e7a678f563b5ad3b4d79d
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR
Ubuntu_20.04_x86-64
Calc: threaded

Best regards. JBF
Comment 9 Hans-Werner 2022-10-06 18:07:46 UTC
Created attachment 182884 [details]
DrawMenue.png
Comment 10 Hans-Werner 2022-10-06 18:13:35 UTC
(In reply to Jean-Baptiste Faure from comment #8)

[1] Yes, this is true: "But it is still possible to select the line, even with the mouse (rectangular selection) and to modify its length." But it is not possible to restore the disappeared line by using the input fields "Height:" and "Width:".

For a better understanding of the following, please take a look at the attached file "DrawMenue.png".

[2] If you draw a horizontal line (5 cm), the WIDTH (of the rectangle) to be seen is 5 cm and the HEIGHT (of the rectangle) to be seen is 0 cm - OKAY

[3] If you draw a vertical line (5 cm), the WIDTH (of the rectangle) to be seen is 0 cm and the HEIGHT (of the rectangle) to be seen is 5 cm - OKAY

[4] Below "Position and Size" "Height:" is always the HEIGHT of the RECTANGLE and "Width:" is always the WIDTH of the RECTANGLE. Below "Position and Size" "Height:" or "Width:" never stand for THICKNESS of the line.

[5] The "Width:" below "Position and Size" has nothing to do with the "Width:" above "Position and Size". The "Width:" below "Position and Size" is the width of the RECTANGLE. The "Width:" above "Position and Size" is the THICKNESS of the line. 

The real problem:

[6] LO 6.4.7.2 (x64)
[6.1] "Keep ratio" = OFF
[6.1.1] If there's a horizontal line, "Height:"-Inputs are ignored - OKAY
[6.1.2] If there's a vertical line, "Width:"-Inputs are ignored - OKAY
[6.2] "Keep ratio" = ON
[6.2.1] If there's a horizontal line, "Height:"-Inputs are ignored - OKAY
[6.2.2] If there's a vertical line, "Width:"-Inputs are ignored - OKAY

[7] LO 7.3.6.2 (x64)
[7.1] "Keep ratio" = OFF
[7.1.1] If there's a horizontal line, "Height:"-Inputs are ignored - OKAY
[7.1.2] If there's a vertical line, "Width:"-Inputs are ignored - OKAY
[7.2] "Keep ratio" = ON
[7.2.1] If there's a horizontal line, "Height:"-Inputs are NOT ignored - ERROR
[7.2.2] If there's a vertical line, "Width:"-Inputs are NOT ignored - ERROR

Greetings
Hans-Werner ;-))
Comment 11 Robert Großkopf 2022-10-07 06:15:52 UTC
(In reply to Jean-Baptiste Faure from comment #8)

> Height is the height of the surrounding rectangle around the line.
> Width is the line thickness.

If width is the thickness why doesn't change the width when changing the "thickness" to 6 pt?
> 
> If the line is horizontal, initial height is set to zero. I can change this
> value and the length of the line is changed accordingly. If I set the height
> to 0,1cm, the length is multiplied by 100.

Ah, 0,1= 0*100???
That's another error. But now: Set back to 0 - and the line will have a width and a hight of 0.

Please test the right behavior with LO 6.4! No problem to install more than one version of LO - have installed about 20 versions parallel here for testing.
Comment 12 Robert Großkopf 2022-10-07 06:34:38 UTC
Another hint: LO 6.4.7.2 is also a little bit buggy in this behavior.

If you click into height (0,00cm) and back to width nothing will be changed.
But if you change height to 0,1cm with will be changed immediately to 0cm.

So: Back to LO 6.4 won't be a solution. Disabling "keep ratio" for width or height 0 cm would be the best, because (theoretical) a line should have a thickness of 0 cm. But this thickness couldn't be shown on a screen …
Comment 13 Hans-Werner 2022-10-07 08:43:52 UTC
Created attachment 182897 [details]
LO 3.6.7.2.odt
Comment 14 Hans-Werner 2022-10-07 08:45:58 UTC
[1] My "Comment 10"

I agree with Robert. LO 6.4.7.2 is buggy too, Therefore:

[6.2] "Keep ratio" = ON
[6.2.1] If there's a horizontal line, "Height:"-Inputs are NOT ignored - ERROR
[6.2.2] If there's a vertical line, "Width:"-Inputs are NOT ignored - ERROR

[2] Very old BUG

This seems to be a very old bug. I tested using LO 7.3.6.2 - LO 6.4.7.2 - LO 5.4.7.2 - LO 4.4.7.2 - LO 3.6.7.2. All this versions of LO are buggy - in some way - due to the mentioned problem.

[3] BUG

[3.1] If there's a vertical line and "Keep ratio" = 'ON' "Width:"-Inputs are NOT ignored.
[3.2] If there's a horizontal line and "Keep ratio" = 'ON' "Height:"-Inputs are NOT ignored.

[4] No BUG

[4.1]  "Keep ratio" = 'OFF'
[4.2]  "Keep ratio" = 'OFF' AND NO vertical or horizontal line.

[5] BUG @ LO 3.6.7.2

Please take a look at the attached file "LO 3.6.7.2.odt" to see the buggy behaviour of "LO 3.6.7.2" due to the mentioned problem.
Comment 15 Hans-Werner 2022-10-07 09:23:40 UTC
Instead of:
> [4.2]  "Keep ratio" = 'OFF' AND NO vertical or horizontal line.

[4.2]  "Keep ratio" = 'ON' AND NO vertical or horizontal line.
Comment 16 Jean-Baptiste Faure 2022-10-08 17:40:08 UTC
I see the same behavior with LO 6.4.7.

What you are highlighting is that the notion of a rectangle surrounding a drawing object, defined by its width and height, is not adapted to the case of a horizontal or vertical line. 
In the case where "Keep ratio" is checked, we just have a special case here that involves a division by zero.

Best regards. JBF
Comment 17 Hans-Werner 2022-10-09 09:15:57 UTC
(In reply to Jean-Baptiste Faure from comment #16)

I fully agree:

If there's a horizontal or vertical line, height or witdth of the (virtual) rectangle becomes 0. In this case the computing of ratio causes the division by 0.

This is the bug:

The algorithm tries to compute ratio while the height or width of the (virtual) rectangle ist 0 in the special cases of vertical/horizontal line and therfore causes the division by 0.

It seems to be a very old bug as to bee seen in attached file "LO 3.6.7.2.odt".

Greetings
Hans-Werner ;-))
Comment 18 LeroyG 2022-10-09 20:32:54 UTC
(In reply to Robert Großkopf from comment #5)
> (In reply to LeroyG from comment #4)
> Seems you haven't read all:

There are two Width fields (one for Line, other for Position and Size), and I mixed both while testing.

Keep ratio is marked.
I clicked on the + near to Height (not in the Height number field).

Height turned 0.10 and Width (also Position and Size) turned 0 (the division by 0 issue).