Bug 46163 - ListBox matches entries in Valuelist only for VARCHAR columns
Summary: ListBox matches entries in Valuelist only for VARCHAR columns
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
3.5.0 release
Hardware: All All
: high normal
Assignee: Lionel Elie Mamane
URL:
Whiteboard: target:3.5.1 target:3.6.0
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-16 04:23 UTC by Lionel Elie Mamane
Modified: 2012-02-21 04:56 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
Test document (11.23 KB, application/vnd.oasis.opendocument.database)
2012-02-21 04:07 UTC, Petr Mladek
Details
test document with drop-down (11.29 KB, application/vnd.oasis.opendocument.database)
2012-02-21 04:56 UTC, Lionel Elie Mamane
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lionel Elie Mamane 2012-02-16 04:23:09 UTC
In a database form, create a List Box. Properties / Data, select Valuelist for "type of list content", and in "List content" enter e.g. (press SHIFT-ENTER between values):
 0
 1
 2
 3

Set property "Data field" to a database field of type different than VARCHAR. E.g. char or integer. Insert some data in the table such that this field contains 0, 1,  2 or 3.

Tab General, set property "List entries" to:
 Zero
 One
 Two
 Three

Open the form in non-design mode. Notice that the list box is blank.
Comment 1 Not Assigned 2012-02-16 04:40:50 UTC
Lionel Elie Mamane commited a patch related to this issue to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=c55d050400139a270f5b3b620db4845001db017d

fdo#46163 convert bound values to bound column's type
Comment 2 Not Assigned 2012-02-21 03:59:34 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "libreoffice-3-5":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=10e26364d33150a1f43bcc32a690a9523d792936&g=libreoffice-3-5

fdo#46163 convert bound values to bound column's type


It will be available in LibreOffice 3.5.1.
Comment 3 Petr Mladek 2012-02-21 04:07:15 UTC
Created attachment 57385 [details]
Test document

I am not sure that I understood the bug perfectly. I expected that I will not see the values "One,Two,Three,Four" at all in the non-design view. Though, I saw them even without the patch.

With your patch, the first entry was selected when opened in the non-design view. Also I was able to go through the entries one by one via the "forward" and "back"
buttons.
Comment 4 Lionel Elie Mamane 2012-02-21 04:55:16 UTC
(In reply to comment #3)

> I am not sure that I understood the bug perfectly. I expected that I will not
> see the values "One,Two,Three,Four" at all in the non-design view. Though, I
> saw them even without the patch.

I was describing behaviour with property "General/Drop-down" set to "yes". Attaching a new test document.

As you describe, with drop-down=No, the "List entry" values are shown, but none is selected, although one should be (when the underlying column in the underlying table/query has a value that matches one in "List content").
Comment 5 Lionel Elie Mamane 2012-02-21 04:56:18 UTC
Created attachment 57388 [details]
test document with drop-down