svx/source/form/formcontroller.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 16eafe39aba428178aea67fba38cdfb8abf25262
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Wed Aug 24 10:49:47 2022 +0200
Commit:     Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
CommitDate: Wed Aug 31 16:01:10 2022 +0200

    tdf#150577: Revert "Micro-optim in FormController::approveRowChange"
    
    This reverts commit e005ab5d40d358adb75a64e140d46f4bf605647d.
    
    XColumn::wasNull is documented [1] to require a previous call to a get*
    method. The reverted change internally queried the *previous* column's
    wasNull.
    
    [1] 
https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1sdb_1_1XColumn.html#a0d482c20564f9119052b1962f830190e
    
    Change-Id: I3e988358764fa6935e8eb3e66340a0869c157d02
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138550
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>
    (cherry picked from commit 59f30175bfc557aa7c752ab0b45af9d34215d4dc)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138822
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    (cherry picked from commit 0e12ed1c39531566d080c9fa1e27e9e2659addd2)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138894
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>
    Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
    Tested-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com>

diff --git a/svx/source/form/formcontroller.cxx 
b/svx/source/form/formcontroller.cxx
index 50e0d4f592d9..d5687a15ba03 100644
--- a/svx/source/form/formcontroller.cxx
+++ b/svx/source/form/formcontroller.cxx
@@ -3647,7 +3647,7 @@ sal_Bool SAL_CALL FormController::approveRowChange(const 
RowChangeEvent& _rEvent
             }
 
             // TODO: in case of binary fields, this "getString" below is 
extremely expensive
-            if ( !rColInfo.xColumn->wasNull() || 
!rColInfo.xColumn->getString().isEmpty() )
+            if ( !rColInfo.xColumn->getString().isEmpty() || 
!rColInfo.xColumn->wasNull() )
                 continue;
 
             OUString sMessage( SvxResId( RID_ERR_FIELDREQUIRED ) );

Reply via email to