Kaydet (Commit) dbb444e4 authored tarafından Julien Nabet's avatar Julien Nabet Kaydeden (comit) Lionel Elie Mamane

tdf#75341: fix condition to approve row (form)

Considering rColInfo.nNullable != ColumnValue::NO_NULLS is ok to approve row
isn't sufficient in the case the field is "Input required" in form.

Change-Id: I27c57fe8ce5afac97eb0650f93703333c85f1421
Reviewed-on: https://gerrit.libreoffice.org/60109
Tested-by: Jenkins
Reviewed-by: 's avatarLionel Elie Mamane <lionel@mamane.lu>
üst e55a8522
...@@ -3723,8 +3723,6 @@ sal_Bool SAL_CALL FormController::approveRowChange(const RowChangeEvent& _rEvent ...@@ -3723,8 +3723,6 @@ sal_Bool SAL_CALL FormController::approveRowChange(const RowChangeEvent& _rEvent
for ( size_t col = 0; col < colCount; ++col ) for ( size_t col = 0; col < colCount; ++col )
{ {
const ColumnInfo& rColInfo = m_pColumnInfoCache->getColumnInfo( col ); const ColumnInfo& rColInfo = m_pColumnInfoCache->getColumnInfo( col );
if ( rColInfo.nNullable != ColumnValue::NO_NULLS )
continue;
if ( rColInfo.bAutoIncrement ) if ( rColInfo.bAutoIncrement )
continue; continue;
...@@ -3732,8 +3730,11 @@ sal_Bool SAL_CALL FormController::approveRowChange(const RowChangeEvent& _rEvent ...@@ -3732,8 +3730,11 @@ sal_Bool SAL_CALL FormController::approveRowChange(const RowChangeEvent& _rEvent
if ( rColInfo.bReadOnly ) if ( rColInfo.bReadOnly )
continue; continue;
if ( !rColInfo.xFirstControlWithInputRequired.is() && !rColInfo.xFirstGridWithInputRequiredColumn.is() ) if ( !rColInfo.xFirstControlWithInputRequired.is() && !rColInfo.xFirstGridWithInputRequiredColumn.is()
&& rColInfo.nNullable != ColumnValue::NO_NULLS )
{
continue; continue;
}
// TODO: in case of binary fields, this "getString" below is extremely expensive // TODO: in case of binary fields, this "getString" below is extremely expensive
if ( !rColInfo.xColumn->getString().isEmpty() || !rColInfo.xColumn->wasNull() ) if ( !rColInfo.xColumn->getString().isEmpty() || !rColInfo.xColumn->wasNull() )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment