diff options
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/doc/DocumentFieldsManager.cxx | 18 |
1 files changed, 10 insertions, 8 deletions
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; |