sw/source/core/doc/DocumentFieldsManager.cxx | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-)
New commits: commit 1462bdc3abe60cee43cf6064663d646adbf13894 Author: Mike Kaganski <mike.kagan...@collabora.com> Date: Fri May 18 07:23:56 2018 +0100 Don't do the string operation needlessly Change-Id: Ic5831e56d4528dcc1ad78e00569ad1d58272aeeb Reviewed-on: https://gerrit.libreoffice.org/54514 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/sw/source/core/doc/DocumentFieldsManager.cxx b/sw/source/core/doc/DocumentFieldsManager.cxx index f6bd75d036a4..b4b3c0b32d80 100644 --- a/sw/source/core/doc/DocumentFieldsManager.cxx +++ b/sw/source/core/doc/DocumentFieldsManager.cxx @@ -279,15 +279,17 @@ SwFieldType* DocumentFieldsManager::GetFieldType( { SwFieldType* pFieldType = (*mpFieldTypes)[i]; - OUString aFieldName( pFieldType->GetName() ); - if (bDbFieldMatching && nResId == SwFieldIds::Database) // #i51815# - aFieldName = aFieldName.replace(DB_DELIM, '.'); - - if( nResId == pFieldType->Which() && - rSCmp.isEqual( rName, aFieldName )) + if (nResId == pFieldType->Which()) { - pRet = pFieldType; - break; + OUString aFieldName( pFieldType->GetName() ); + if (bDbFieldMatching && nResId == SwFieldIds::Database) // #i51815# + aFieldName = aFieldName.replace(DB_DELIM, '.'); + + if (rSCmp.isEqual( rName, aFieldName )) + { + pRet = pFieldType; + break; + } } } return pRet; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits