Bug 158426

Summary: Number of columns should be limited in Calc data entry form
Product: LibreOffice Reporter: Hossein <hossein>
Component: CalcAssignee: Hossein <hossein>
Status: RESOLVED FIXED    
Severity: normal CC: ilmari.lauhakangas, miguelangelrv
Priority: medium    
Version: Inherited From OOo   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=131560
https://bugs.documentfoundation.org/show_bug.cgi?id=158211
Whiteboard: target:24.8.0
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 116461    

Description Hossein 2023-11-29 00:30:15 UTC
Description:
While testing tdf#158211 (a duplicate of tdf#131560), one can face performance problems by doing select all, and then choosing "Data > Form".

Steps to Reproduce:
1. Open Calc
2. Press ctrl+a to select all cells
3. Choose "Data > Form" from menu bar

Actual Results:
LibreOffice hangs for a few minutes. When the dialog box appears at last, it is still unresponsive.

Expected Results:
LibreOffice should respond immediately, as no heavy process is active.


Reproducible: Always


User Profile Reset: No

Additional Info:
The problem is likely because of the excessive number of columns, as they appear in the dialog box as line edit widgets. Limiting the number of possible columns can help avoid this problem.

In MS Excel, when the number of selected columns is too much, a warning message is displayed: "Too many fields in the data form". The maximum number of columns is 32. This is clarified in these links:

https://answers.microsoft.com/en-us/msoffice/forum/all/too-many-fields-in-the-data-form/4ad69e07-524b-40c7-a520-746f4562bc01

https://www.timeatlas.com/excel-data-form
Comment 1 m_a_riosv 2023-11-29 01:34:17 UTC
+1 for the message.
Comment 2 Buovjaga 2023-11-29 06:59:52 UTC
Came up in the live stream and yes, seems like the right thing to do.
Comment 3 Commit Notification 2024-01-29 12:20:06 UTC
Hossein committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/07203b8ed8cc7a392c196b695c9a5c60955b732b

tdf#158426 Limit field columns for data form to 32

It will be available in 24.8.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.