diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2017-06-24 15:10:59 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2017-06-26 13:44:50 +0200 |
commit | 7173b70d665608f3823f4a3ff0653f84c0630ed3 (patch) | |
tree | 28eac63afd6b45fc50b8c7668afab31cdbb68b89 | |
parent | 59b3c472aa4243df0c5c4800c9e1f47bc3e95df5 (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/39212
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
-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 76eadaa64afa..f88c3cb77735 100644 --- a/forms/source/component/ListBox.cxx +++ b/forms/source/component/ListBox.cxx @@ -1078,7 +1078,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 |