From e005ab5d40d358adb75a64e140d46f4bf605647d Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Fri, 14 Sep 2018 20:10:11 +0200 Subject: Micro-optim in FormController::approveRowChange TODO says: "in case of binary fields, this "getString" below is extremely expensive" In this case, swap the terms of the if to hope to gain a little. Change-Id: I4ef7b3bf5a9cbe49f7d56462d02ab274cbfd0025 Reviewed-on: https://gerrit.libreoffice.org/60509 Tested-by: Jenkins Reviewed-by: Lionel Elie Mamane --- svx/source/form/formcontroller.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'svx/source') diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx index 134b73d93782..98e06bf10c94 100644 --- a/svx/source/form/formcontroller.cxx +++ b/svx/source/form/formcontroller.cxx @@ -3737,7 +3737,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->getString().isEmpty() || !rColInfo.xColumn->wasNull() ) + if ( !rColInfo.xColumn->wasNull() || !rColInfo.xColumn->getString().isEmpty() ) continue; OUString sMessage( SvxResId( RID_ERR_FIELDREQUIRED ) ); -- cgit