Bug 79542 - FORMCONTROLS: .xls - Option buttons contained in group boxes are not grouped.
Summary: FORMCONTROLS: .xls - Option buttons contained in group boxes are not grouped.
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Justin L
URL:
Whiteboard: BSA target:7.6.0
Keywords:
Depends on: 120177
Blocks: Form-Controls XLS
  Show dependency treegraph
 
Reported: 2014-06-02 11:32 UTC by Marco Borra
Modified: 2023-05-15 23:04 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample Document (36.50 KB, application/vnd.ms-excel)
2014-06-02 11:32 UTC, Marco Borra
Details
LibreOffice 4.3beta1 Behavoir (Ubuntu 14.04 LTS) (67.88 KB, image/png)
2014-06-02 11:34 UTC, Marco Borra
Details
Microsoft Office 2003 Behavoir (34.74 KB, image/png)
2014-06-02 11:35 UTC, Marco Borra
Details
screenshot from 5.0 (76.76 KB, image/png)
2015-06-10 06:31 UTC, Yousuf Philips (jay) (retired)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marco Borra 2014-06-02 11:32:43 UTC
Created attachment 100290 [details]
Sample Document

Option buttons contained in a group box should be grouped.
Option buttons contained in different group boxes must belong to independant groups.
1 - Open sample file with both MS Office and LO. The document contains three groups of option buttons.
2 - In MS Office, the option buttons in each group can be selected independently.
3 - In LO, The selection is mutually exclusive as if they belonged to a single group. When you select one of them the others are deselected. 

Current behavior:
Option buttons must be considered in separated groups if they are contained in distinguished group boxes.

Expected behavior:
All option buttons in the sheet are treated as a single group.

Operating System: All
Version: All from 3.6.x to 4.2.4.2 release.

              
Operating System: All
Version: 4.3.0.0.beta1
Comment 1 Marco Borra 2014-06-02 11:34:26 UTC
Created attachment 100291 [details]
LibreOffice 4.3beta1 Behavoir (Ubuntu 14.04 LTS)
Comment 2 Marco Borra 2014-06-02 11:35:12 UTC
Created attachment 100293 [details]
Microsoft Office 2003 Behavoir
Comment 3 Yousuf Philips (jay) (retired) 2014-06-04 19:04:51 UTC
Confirmed on Windows and Linux Mint on 3.6.7, 4.2.4, and 4.3 beta.
Comment 4 QA Administrators 2015-06-08 14:42:50 UTC Comment hidden (obsolete)
Comment 5 Yousuf Philips (jay) (retired) 2015-06-10 06:31:42 UTC
Created attachment 116434 [details]
screenshot from 5.0

Still doesnt look like the excel output.

Version: 5.1.0.0.alpha1+
Build ID: 587006cac508616f486aea45e265a170bcccdc87
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2015-06-06_00:16:39
Comment 6 QA Administrators 2016-09-20 10:01:59 UTC Comment hidden (obsolete, spam)
Comment 7 Justin L 2018-10-03 18:10:10 UTC
XLSX has the same problem. That one should be solved by the patch proposed in bug 111980 comment 8. Since the code is very different, that link probably isn't too helpful, but perhaps it will give some inspiration.
Comment 8 QA Administrators 2019-10-04 03:05:51 UTC Comment hidden (obsolete, spam)
Comment 9 Justin L 2020-07-22 13:14:44 UTC
(In reply to Marco Borra from comment #0)
> 3 - In LO, The selection is mutually exclusive as if they belonged to a
> single group. When you select one of them the others are deselected.

ALL 6 radio buttons will be simultaneously selected, and non are ever deselected in LO since LO 6.1 commit 1ebb77fd17b417d92ab48fcef56a0230c5750de2
Author: Armin Le Grand on Mon Apr 16 22:34:50 2018 +0200
    SOSAW080: Derive SdrObjGroup from SdrObjList
Comment 10 Timur 2022-03-11 12:59:58 UTC
Option groups are grouped but cannot be clicked Yes-No (just Yes). Up to 7.4+.
Comment 11 Timur 2022-03-11 13:08:10 UTC
*** Bug 120177 has been marked as a duplicate of this bug. ***
Comment 12 Timur 2022-06-09 14:20:41 UTC Comment hidden (obsolete)
Comment 13 Timur 2022-06-09 14:22:10 UTC
I think that key problem is that there's not autogroup on XLS import, as in XLSX.
Comment 14 Timur 2022-06-10 09:44:07 UTC
In otherwise lengthy bug 147822 that's about Calc crash and XLS/X radio, reporter makes a short analysis of code in https://bugs.documentfoundation.org/show_bug.cgi?id=147822#c15.  

Justin, you fixed XLSX. Can you please look at this?
Comment 15 Justin L 2022-08-03 23:18:28 UTC
In XclImpOptionButtonObj::DoProcessControl() we have...
    // TODO: grouping

Not good.
Comment 16 Justin L 2022-08-08 21:31:18 UTC
I have something that kindof works. However, to do this well probably depends on bug 120177 being fixed first.

The proper way to import this (seeing that LO doesn't have a working GroupBox concept itself) is to group the buttons after all controls have been loaded. My failed attempt to do that is at http://gerrit.libreoffice.org/c/core/+/137838

An alternative method (that works for this particular bug doc) only works if the group-box controls are always defined prior to their contents. Perhaps that is always true - I don't know. That version is at http://gerrit.libreoffice.org/c/core/+/137839
Comment 17 Commit Notification 2023-05-15 23:01:33 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/25fed4ae027b9680597ea498c25acc3f854db4bf

tdf#79542 xls: applyGroupBox to radiobutton groups

It will be available in 7.6.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 18 Justin L 2023-05-15 23:04:24 UTC
This could be backported to 7.5 - the bug it depends on was fixed there.