Bug 46163

Summary: ListBox matches entries in Valuelist only for VARCHAR columns
Product: LibreOffice Reporter: Lionel Elie Mamane <lionel>
Component: DatabaseAssignee: Lionel Elie Mamane <lionel>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: high    
Version: 3.5.0 release   
Hardware: All   
OS: All   
Whiteboard: target:3.5.1 target:3.6.0
i915 platform: i915 features:
Attachments: Test document
test document with drop-down

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

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.