summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2017-06-24 15:10:59 +0200
committerLionel Elie Mamane <lionel@mamane.lu>2017-06-24 15:22:17 +0200
commitecdcf38a3250536d9b7f48a8ded50e23ccfcd1df (patch)
tree9e31fde44634c0719908abdb23254ca3004123fc
parent9da0183f3bf6ba88f5e9c057809b7ccae99b7af2 (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
-rw-r--r--forms/source/component/ListBox.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx
index 59e416451b96..fbd2ce67a7bd 100644
--- a/forms/source/component/ListBox.cxx
+++ b/forms/source/component/ListBox.cxx
@@ -1102,7 +1102,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