diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2017-06-24 15:10:59 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2017-06-27 14:02:17 +0200 |
commit | 0407f4b518b437b0277c7a9d8246436675b1e6b1 (patch) | |
tree | 63c43cf5ac98e8362cd23c3a607d7326f0b3991c /forms | |
parent | 36c76cd04a093af506a99b4db8dc397e68f1cddc (diff) |
tdf#108732 ListBox: in absence of a field, treat data as string
so that one meaningfully compare it; default is DataType::OTHER,
which is not comparable
Change-Id: Ifc1e1c9b801f45d0a95a83d30cc205b91e647880
Reviewed-on: https://gerrit.libreoffice.org/39211
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
(cherry picked from commit 39ea36bf8602744c27c16369c88db2858653b59f)
Diffstat (limited to 'forms')
-rw-r--r-- | forms/source/component/ListBox.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx index d5599d55859e..b875eef1d15c 100644 --- a/forms/source/component/ListBox.cxx +++ b/forms/source/component/ListBox.cxx @@ -1070,7 +1070,9 @@ namespace frm sal_Int32 OListBoxModel::getValueType() const { - return (m_nBoundColumnType != css::sdbc::DataType::SQLNULL) ? m_nBoundColumnType : getFieldType(); + return (m_nBoundColumnType != css::sdbc::DataType::SQLNULL) ? + m_nBoundColumnType : + ( hasField() ? getFieldType() : DataType::VARCHAR); } ValueList OListBoxModel::impl_getValues() const |