Bug 133143 - [WRITER] - ListBox disabled when the file is opened or until saved.
Summary: [WRITER] - ListBox disabled when the file is opened or until saved.
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisectRequest, regression
Depends on:
Blocks: Form-Controls
  Show dependency treegraph
 
Reported: 2020-05-18 10:04 UTC by Pierre Marty
Modified: 2021-03-23 13:42 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
Demonstration of the bug (7.49 MB, video/mp4)
2020-05-18 10:05 UTC, Pierre Marty
Details
odt file with the list box (9.54 KB, application/vnd.oasis.opendocument.text)
2020-05-18 10:05 UTC, Pierre Marty
Details
csv datas for the odb file (162 bytes, application/vnd.ms-excel)
2020-05-18 10:06 UTC, Pierre Marty
Details
odb file to link to the odt (2.71 KB, application/vnd.sun.xml.base)
2020-05-18 10:06 UTC, Pierre Marty
Details
Example with internal HSQLDB - connect database and open odt-file in LO (37.21 KB, application/zip)
2020-12-27 19:56 UTC, Robert Großkopf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre Marty 2020-05-18 10:04:27 UTC
Description:
When I create a list box linked to an .odb file, the list is not available until I save the document.

When I open an .odt file containing a list box linked to an .odb file, the list is not available until I save the document.

See attached video.

Steps to Reproduce:
1. Link the test.odb file to the test.odt file
2. Activate Form->Design mode
3. Edit the 2nd list field in test.odt
4. In the form props, set the source to "test" and the data to "test".
5. In the control props, set the Data->Data field to "Service" and the content to "SELECT "Service", "Servcie" FROM "test"".

Actual Results:
6. The list is disabled
7. Save the document
8. The list is now activated

Expected Results:
6. The list is enable


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Version: 7.0.0.0.alpha1+
Build ID: ef1b75a60466dda61a9d28b03262f6db357142a5
CPU threads: 12; OS: Linux 4.4; UI render: default; VCL: x11; 
Locale: en-US (C.UTF-8); UI: en-US
Calc: threaded

Version : 6.4.3.2 (x64)
Build ID : 747b5d0ebf89f41c860ec2a39efd7cb15b54f2d8
Threads CPU : 12; OS : Windows 10.0 Build 18363; UI Render : GL; VCL: win; 
Locale : fr-FR (fr_FR); Langue IHM : fr-FR
Calc: CL
Comment 1 Pierre Marty 2020-05-18 10:05:16 UTC
Created attachment 160968 [details]
Demonstration of the bug
Comment 2 Pierre Marty 2020-05-18 10:05:43 UTC
Created attachment 160969 [details]
odt file with the list box
Comment 3 Pierre Marty 2020-05-18 10:06:14 UTC
Created attachment 160970 [details]
csv datas for the odb file
Comment 4 Pierre Marty 2020-05-18 10:06:40 UTC
Created attachment 160971 [details]
odb file to link to the odt
Comment 5 Pierre Marty 2020-06-10 10:10:12 UTC
Hi !

Here are more details about this bug.



Description:

A ListBox field, which obtains its content through an SQL query to an external database stored in a .odb file, is not clickable at document opening.

It is visible but grayed out as a "disabled" field, yet it is noted as "enabled" if inspecting "Control Properties" in "Design Mode".



Bypass:

However, this field becomes clickable when the document is saved, with or without modifications.



See attached video for a demo.



Steps to Reproduce:

1. Download the "test.odt", "test.csv" and the "test.odb" files attached
2. Open "test.odt"
3. Enter in Design mode
4. Right-click on the second field (might be empty) and go to the "Form properties"
5. In the "Data" tab, click on "..." to match "Data source" with the "test.odb" file
6. In the same tab set the "Content" to "test"
7. Close the "Form properties" and access to "Control properties"
8. Verify the field is "Enable", "Visible" and not in "Read-Only" in the "General" tab
9. In the "Data" tab set "Data Field" to "Service"
10. In the same tab set "List Content" to " SELECT "Service", "Service" FROM "test" "
11. Close the "Control properties" and exit the "Design Mode"


Actual Results:
12. The ListBox is not clickable but well set as "Enable"
13. Save the document
14. The list is now clickable


Expected Results:
12. The ListBox is clickable



Reproducible: Always



User Profile Reset: Yes



Additional Info:

Version: 7.1.0.0.alpha0+
Build ID: f9fb86408e6e06c262332be26674305ae5c05bb7
CPU threads: 12; OS: Linux 4.4; UI render: default; VCL: x11
Locale: en-US (C.UTF-8); UI: en-US
Calc: threaded

Version: 7.1.0.0.alpha0+ (x64)
Build ID: 75eeb423196c1e94a0189b7eccff37aed5765853
Threads CPU : 12; OS : Windows 10.0 Build 18363; UI Render : Skia/Vulkan; VCL: win
Locale: fr-FR (fr_FR); Langue IHM : fr-FR
Calc: CL

Version: 7.0.0.0.alpha1+
Build ID: ef1b75a60466dda61a9d28b03262f6db357142a5
CPU threads: 12; OS: Linux 4.4; UI render: default; VCL: x11; 
Locale: en-US (C.UTF-8); UI: en-US
Calc: threaded

Version : 6.4.3.2 (x64)
Build ID : 747b5d0ebf89f41c860ec2a39efd7cb15b54f2d8
Threads CPU : 12; OS : Windows 10.0 Build 18363; UI Render : GL; VCL: win; 
Locale : fr-FR (fr_FR); Langue IHM : fr-FR
Calc: CL

Version: 6.4.0.1 (x64)
Build ID: 1b6477b31f0334bd8620a96f0aeeb449b587be9f
Threads CPU : 12; OS : Windows 10.0 Build 18363; UI Render : GL; VCL: win; 
Locale : fr-FR (fr_FR); Langue IHM : fr-FR
Calc: threaded
Comment 6 Dieter 2020-06-17 07:28:24 UTC
I can confirm the observed behaviour with steps from comment 5, but I'm not familiar enough with that topic (list boxes with a link to odb-file) to assess, if this is a bug or a result of a wrong setting (help content is missing). Sorry.
Comment 7 Dieter 2020-12-27 16:47:41 UTC
Robert can you (In reply to Dieter from comment #6)
> I can confirm the observed behaviour with steps from comment 5, but I'm not
> familiar enough with that topic (list boxes with a link to odb-file) to
> assess, if this is a bug or a result of a wrong setting (help content is
> missing). Sorry.

Robert, can you help here?
cc: robert@familiegrosskopf.de
Comment 8 Robert Großkopf 2020-12-27 19:54:55 UTC
The examples are very special: The database is a text-database. You can't input values in the table. And the only table in the database is the table for the values, which should be shown (and changed) through the list box - and could never be changed.

If I try it with a "normal" internal HSQLDB and an external Writer form I get a different result:
Open the attached *.zip
Connect the database inside this *.zip with LO by Tools → Options → LibreOffice Base ...
Open the *.odt-file.
Both list boxes are filled with data in LO 7.0.4.2 an all earlier versions of LO.
Both list boxes aren't filled with data in LO 7.1.0.1

This is one of the different bugs I detected with LO 7.1.0.1 when testing this.

The second might be related: When creating the SQL for list boxes there isn't shown any content when testing the query. You can't test this again, because there is a third bug: It seems to be impossible to edit the SQL-code when it has been created. The button with the 3 points has been gone in LO 7.1.0.1.

I could confirm the list boxes don't show any content when opening an external form with LO 7.1.0.1
Comment 9 Robert Großkopf 2020-12-27 19:56:46 UTC
Created attachment 168523 [details]
Example with internal HSQLDB - connect database and open odt-file in LO

All this I tested with OpenSUSE 15.2 64bit rpm Linux and different LO-versions. Works up to LO 7.0.4.2, fails with LO 7.1.0.1.
Comment 10 Robert Großkopf 2020-12-28 07:56:13 UTC
Could be the reason for this bug is https://bugs.documentfoundation.org/show_bug.cgi?id=139267. The connection to the database will be lost. Seems LO 7.1 tries to save the connection at a new place (doesn't read the information from older versions from LO) and couldn't read any saved information for the database connection.
Comment 11 Justin L 2021-01-21 18:43:34 UTC
(In reply to Pierre Marty from comment #5)
> However, this field becomes clickable when the document is saved, with or
> without modifications.
This sounds like bug 126731, which I marked as NOTABUG.
Comment 12 Justin L 2021-01-21 19:03:51 UTC
(In reply to Robert Großkopf from comment #8)
> there is a third bug: It seems to be impossible to edit the SQL-code
> when it has been created. The button with the 3 points has been gone in LO
> 7.1.0.1.
This seems to have been reported as bug 139298, which is fixed in 7.1.
Comment 13 Justin L 2021-03-23 13:42:55 UTC
I think I'll close this as NOTABUG - comment 11, since that seems to match OP's reported problem.

I'm don't know if Robert's "The second might be related: When creating the SQL for list boxes there isn't shown any content when testing the query" is still a concern - but that should be reported separately if so, because it is not at all clear what needs to happen with that.