forms/source/component/FormComponent.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 7c1a8152889fe38d961f8f605713c44293920a28
Author:     Andreas Heinisch <andreas.heini...@yahoo.de>
AuthorDate: Wed Sep 28 16:30:01 2022 +0200
Commit:     Andreas Heinisch <andreas.heini...@yahoo.de>
CommitDate: Wed Oct 5 15:31:51 2022 +0200

    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.heini...@yahoo.de>

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

Reply via email to