Bug 106462 - Assigning ListBox "SelectedValue" property is a no-op
Summary: Assigning ListBox "SelectedValue" property is a no-op
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: framework (show other bugs)
Version:
(earliest affected)
5.3.0.3 release
Hardware: All All
: medium normal
Assignee: Lionel Elie Mamane
URL:
Whiteboard: target:5.4.0 target:5.3.2
Keywords: regression
Depends on:
Blocks:
 
Reported: 2017-03-09 18:36 UTC by Lionel Elie Mamane
Modified: 2017-06-26 16:40 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lionel Elie Mamane 2017-03-09 18:36:14 UTC
Description:
Programatically set a ListBox's "SelectedValue" property. It is not changed.

That's because in OListBoxModel::convertFastPropertyValue, case  PROPERTY_ID_SELECT_VALUE, _rCurrentValue and _rValue are used where the other should be used.

Patch pending

Steps to Reproduce:
.

Actual Results:  
.

Expected Results:
.


Reproducible: Always

User Profile Reset: No

Additional Info:


User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0
Comment 1 Commit Notification 2017-03-09 18:55:44 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "master":

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

tdf#106462 old value and new value were swapped

It will be available in 5.4.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 2 Commit Notification 2017-03-10 08:49:52 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=23b8a097090ad544c596e644cf477feb360c9469&h=libreoffice-5-3

tdf#106462 old value and new value were swapped

It will be available in 5.3.2.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 3 Xisco Faulí 2017-04-13 08:51:55 UTC
Hello Lionel,
Is this bug fixed?
If so, could you please close it as RESOLVED FIXED?
Comment 4 JaeYoung Kim 2017-06-23 17:39:43 UTC
Hi,

I can still see this issue in version 5.3.4.2.
Setting SelectedValue seems to change the value to NULL if the current value and new value are different.

Print oListBox.CurrentValue // current value is "yes"
oListBox.SelectedValue = "yes"
Print oListBox.CurrentValue // shows as "yes"

Print oListBox.CurrentValue // current value is "no"
oListBox.SelectedValue = "yes"
Print oListBox.CurrentValue // shows as "" (NULL)

Thank you.
Comment 5 Lionel Elie Mamane 2017-06-24 12:46:41 UTC
(In reply to JaeYoung Kim from comment #4)

> I can still see this issue in version 5.3.4.2.
> Setting SelectedValue seems to change the value to NULL if the current value
> and new value are different.

This is not the same bug as this one. This bug is that setting SelectedValue does not change the value,. You report that it sets it to NULL, except when setting the same value again.
Comment 6 JaeYoung Kim 2017-06-26 16:22:22 UTC
Thank you for your reply.