Bug 150100 - UI Calc Double cell border has minimum width at import
Summary: UI Calc Double cell border has minimum width at import
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.3.0.3 release
Hardware: All All
: medium normal
Assignee: Balázs Varga (allotropia)
URL:
Whiteboard: target:7.5.0 target:7.4.1
Keywords:
Depends on:
Blocks: Cell-Border
  Show dependency treegraph
 
Reported: 2022-07-22 08:58 UTC by Gabor Kelemen (allotropia)
Modified: 2022-08-16 08:12 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
Example file from Calc (9.22 KB, application/vnd.oasis.opendocument.spreadsheet)
2022-07-22 08:58 UTC, Gabor Kelemen (allotropia)
Details
The Border tab page before saving, with 0.75 pt width set (62.54 KB, image/png)
2022-07-22 09:01 UTC, Gabor Kelemen (allotropia)
Details
The Border tab page after saving: width is now 1.10 pt, but the colored borders still look the same (62.12 KB, image/png)
2022-07-22 09:06 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (allotropia) 2022-07-22 08:58:56 UTC
Created attachment 181369 [details]
Example file from Calc

In the attached example file I have set double line cell borders with all widths available in the Borders tab page in rows 3 and 4, plus two custom values 1 and 3 pt.
What is visible at first that there is no visual difference between 0.05 pt and 1 pt double line cell borders, while there is between single border lines.

Another aspect of this is save and reload: the Borders tab page now shows all values below 1.1 pt as 1.1 pt custom width, which makes sense when you look at the actual sheet.

1, On a Calc sheet open Format Cells - Border 
2, Set border style to double line, and width to any of 0.05 - 1 pt.
3, Save and reload, open the Border tab again.

The Width displayed is Custom 1.10 pt instead of previous 0.05, 0.5, 0.75 or 1 pt.
Widths larger than that are retained properly.

Version: 7.5.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 21a31eefab1401d288dbb8220f3df3365be9efaf
CPU threads: 14; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: en-US (hu_HU); UI: en-US
Calc: threaded

This started in 5.3 with commit:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=9259fcd40b1749cd421c433bcc436cb335cbbe43

author	Justin Luth <justin_luth@sil.org>	2016-11-14 09:38:25 +0300
committer	Justin Luth <justin_luth@sil.org>	2016-11-15 05:39:38 +0000
commit 9259fcd40b1749cd421c433bcc436cb335cbbe43 (patch)

tdf#88827 - double-thin border: MINGAPWIDTH is a valid width

Before this the smaller values did not show at all, so this was an improvement.

From the commit message I conclude that the behavior here is actually correct - double cell borders need to be 1.10 pt wide at least to be visible at all.

Therefore I'd like to suggest to change the UI: if double line style is selected, the presets below 1.5 pt should be hidden.

Also the side bar has two "Double Hairline" presets (1.10 pt and 2.35 pt) that may be worth adding here as well.
Comment 1 Gabor Kelemen (allotropia) 2022-07-22 09:01:55 UTC
Created attachment 181370 [details]
The Border tab page before saving, with 0.75 pt width set
Comment 2 Gabor Kelemen (allotropia) 2022-07-22 09:06:06 UTC
Created attachment 181371 [details]
The Border tab page after saving: width is now 1.10 pt, but the colored borders still look the same
Comment 3 Rafael Lima 2022-07-22 19:31:59 UTC
Repro with

Version: 7.5.0.0.alpha0+ / LibreOffice Community
Build ID: 21a31eefab1401d288dbb8220f3df3365be9efaf
CPU threads: 16; OS: Linux 5.15; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Calc: threaded

If I set the border width to any value <= 1pt and then save the file and reopen it, I get the 1.1 pt border width as reported by the OP.

The only weird thing here is that the 1.1 pt value should have been shown while Calc was still opened (before saving the document). For instance, when I apply the border with 0.5 pt width and then open the Border dialog again, the 1.1 pt value should already be there. Why does it only appear after saving and reopening?
Comment 4 Commit Notification 2022-07-29 06:54:14 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/fe2d59a0730e60c0196baa46af12440afd343878

tdf#150100 sc import and UI: fix double cell border dialog

It will be available in 7.5.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 5 Commit Notification 2022-08-01 06:21:05 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/b12e4b505b30238d98095f31508713a1bac485ac

tdf#150100 sc import and UI: fix double cell border dialog

It will be available in 7.4.1.

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 6 Gabor Kelemen (allotropia) 2022-08-16 08:12:49 UTC
Verified in

Version: 7.5.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: bfca51d9035000e518e4938ceb145cb92cc17b1f
CPU threads: 14; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: en-US (hu_HU); UI: en-US
Calc: threaded

Selecting "double thin" line style for cell border disables the line width options below 1.5 pt.
After selecting "Custom" line width the spinner does not allow widths to go below 1.1 pt.