[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - svx/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Sep 7 10:00:47 UTC 2018


 svx/source/form/formcontroller.cxx |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 3448ca93eb46365d05387f7f3512c706bdb987c4
Author:     Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Thu Sep 6 20:52:26 2018 +0200
Commit:     Julien Nabet <serval2412 at yahoo.fr>
CommitDate: Fri Sep 7 12:00:24 2018 +0200

    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
    (cherry picked from commit dbb444e4ed7c19a11733ce8438bbb6546d42f852)
    Reviewed-on: https://gerrit.libreoffice.org/60125
    Reviewed-by: Lionel Elie Mamane <lionel at mamane.lu>
    Tested-by: Jenkins

diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx
index c302f4dee524..881f1ec84967 100644
--- a/svx/source/form/formcontroller.cxx
+++ b/svx/source/form/formcontroller.cxx
@@ -3723,8 +3723,6 @@ sal_Bool SAL_CALL FormController::approveRowChange(const RowChangeEvent& _rEvent
         for ( size_t col = 0; col < colCount; ++col )
         {
             const ColumnInfo& rColInfo = m_pColumnInfoCache->getColumnInfo( col );
-            if ( rColInfo.nNullable != ColumnValue::NO_NULLS )
-                continue;
 
             if ( rColInfo.bAutoIncrement )
                 continue;
@@ -3732,8 +3730,11 @@ sal_Bool SAL_CALL FormController::approveRowChange(const RowChangeEvent& _rEvent
             if ( rColInfo.bReadOnly )
                 continue;
 
-            if ( !rColInfo.xFirstControlWithInputRequired.is() && !rColInfo.xFirstGridWithInputRequiredColumn.is() )
+            if ( !rColInfo.xFirstControlWithInputRequired.is() && !rColInfo.xFirstGridWithInputRequiredColumn.is()
+                  && rColInfo.nNullable != ColumnValue::NO_NULLS )
+            {
                 continue;
+            }
 
             // TODO: in case of binary fields, this "getString" below is extremely expensive
             if ( !rColInfo.xColumn->getString().isEmpty() || !rColInfo.xColumn->wasNull() )


More information about the Libreoffice-commits mailing list