summaryrefslogtreecommitdiff
path: root/forms/source
diff options
context:
space:
mode:
authorAndreas Heinisch <andreas.heinisch@yahoo.de>2022-09-28 16:30:01 +0200
committerAndreas Heinisch <andreas.heinisch@yahoo.de>2022-10-05 15:31:51 +0200
commit7c1a8152889fe38d961f8f605713c44293920a28 (patch)
tree19db23c99c775e7a2f4a36de153593e9f2339268 /forms/source
parent24f231563133ceca55cfca8f7b704db98cd2a923 (diff)
tdf#122319 - Don't allow nullable form components if input is required
Change-Id: I676aab37df7a98192680b87f0143a27d2a5fd3ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140713 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
Diffstat (limited to 'forms/source')
-rw-r--r--forms/source/component/FormComponent.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx
index 9b5558eed5e6..7b6dd36c5e75 100644
--- a/forms/source/component/FormComponent.cxx
+++ b/forms/source/component/FormComponent.cxx
@@ -1960,7 +1960,8 @@ void OBoundControlModel::connectToField(const Reference<XRowSet>& rForm)
m_xColumn.set( m_xField, UNO_QUERY );
sal_Int32 nNullableFlag = ColumnValue::NO_NULLS;
m_xField->getPropertyValue(PROPERTY_ISNULLABLE) >>= nNullableFlag;
- m_bRequired = (ColumnValue::NO_NULLS == nNullableFlag);
+ // tdf#122319 - don't allow nullable form components if input is required
+ m_bRequired = (ColumnValue::NO_NULLS == nNullableFlag || m_bInputRequired);
// we're optimistic: in case of ColumnValue_NULLABLE_UNKNOWN we assume nullability...
}
else