Bug 149208

Summary: [XLSX] Excessive border weight in imported Excel files
Product: LibreOffice Reporter: Rafael Lima <rafael.palma.lima>
Component: CalcAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: minor CC: rb.henschel
Priority: medium    
Version: 7.3.2.2 release   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=79787
https://bugs.documentfoundation.org/show_bug.cgi?id=150005
https://bugs.documentfoundation.org/show_bug.cgi?id=154772
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 59284    
Attachments: Border options available in Excel
Sample XLSX file used in the screenshots
Screenshot of the file opened in Excel at 200% zoom
Screenshot of the file opened in LO Calc at 200% zoom
Sample XLSX in MSO and LO
Sample XLSX in MSO and LO modified
How LO7.6 renders the Excel styles "hair", "thin", "medium", "thick"

Description Rafael Lima 2022-05-20 18:34:32 UTC
Created attachment 180261 [details]
Border options available in Excel

Excel offers 3 options for border thickness when it comes to solid borders (see first attachment showing these options). I'll call them "Thin", "Medium" and "Thick", since MS does not provide names for them in the user interface.

The way LO Calc import these borders is causing a bit of inconsistency, because our import is making the borders look much thicker than they should. For example, if you apply these borders in Excel, save the XLSX document and open it in LO Calc they will appear with excessive border weight.

Below I'll attach more files showing the problem, as well as a sample XLSX file.

I believe the way we convert border thickness needs to be improved. Or maybe the way we draw these borders in the screen. This is because in Excel, if you zoom in/out the border thickness does not change, whereas in LO Calc zooming affects the thickness of the border drawn in the screen.

System info:
Version: 7.3.3.2 / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 16; OS: Linux 5.13; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Ubuntu package version: 1:7.3.3~rc2-0ubuntu0.21.10.1~lo1
Calc: threaded
Comment 1 Rafael Lima 2022-05-20 18:36:17 UTC
Created attachment 180262 [details]
Sample XLSX file used in the screenshots
Comment 2 Rafael Lima 2022-05-20 18:36:58 UTC
Created attachment 180263 [details]
Screenshot of the file opened in Excel at 200% zoom
Comment 3 Rafael Lima 2022-05-20 18:37:26 UTC
Created attachment 180264 [details]
Screenshot of the file opened in LO Calc at 200% zoom
Comment 4 Timur 2022-06-06 10:28:53 UTC
Created attachment 180586 [details]
Sample XLSX in MSO and LO

Seems so. Bug 48622 introduced predefined thickness, but it doesn't look like MSO.
Comment 5 Timur 2022-06-06 10:34:09 UTC
Created attachment 180587 [details]
Sample XLSX in MSO and LO modified

Thin from MSO could be Very Thin, Medium could be Thin, Thick could be Medium.
Comment 6 Regina Henschel 2023-04-12 18:54:37 UTC
Created attachment 186625 [details]
How LO7.6 renders the Excel styles "hair", "thin", "medium", "thick"

The screenshot compares rendering in Excel with rendering in LO 7.6. The screenshot was taken with 180% zoom on a display with 120dpi.