summaryrefslogtreecommitdiffstats
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:15:05 +0200
commit3aa20b929fd2888bc3f8542baae48dbc6e3362cb (patch)
tree7e552661bfd0ceb338dc1b7bef48212a3e8fb134
parentResolves: tdf#108292 WalkAndMatchElements: really limit the match (diff)
downloadcore-3aa20b929fd2888bc3f8542baae48dbc6e3362cb.tar.gz
core-3aa20b929fd2888bc3f8542baae48dbc6e3362cb.zip
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 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