summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2018-09-14 20:10:11 +0200
committerLionel Elie Mamane <lionel@mamane.lu>2018-09-15 04:01:06 +0200
commite005ab5d40d358adb75a64e140d46f4bf605647d (patch)
tree2ea5bd4db35845af418a37d501a0cd1aba81a2f4 /svx
parent6394c22887a55b6ce33e2abbbd5837ee642ee4dd (diff)
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@mamane.lu>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/form/formcontroller.cxx2
1 files changed, 1 insertions, 1 deletions
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 ) );