Kaydet (Commit) e005ab5d authored tarafından Julien Nabet's avatar Julien Nabet Kaydeden (comit) Lionel Elie Mamane

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: 's avatarLionel Elie Mamane <lionel@mamane.lu>
üst 6394c228
......@@ -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 ) );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment