[Libreoffice-commits] core.git: svx/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sat Sep 15 02:01:34 UTC 2018
svx/source/form/formcontroller.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit e005ab5d40d358adb75a64e140d46f4bf605647d
Author: Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Fri Sep 14 20:10:11 2018 +0200
Commit: Lionel Elie Mamane <lionel at mamane.lu>
CommitDate: Sat Sep 15 04:01:06 2018 +0200
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 <lionel at mamane.lu>
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 ) );
More information about the Libreoffice-commits
mailing list