From 4d31f2e1601efffdbdb3c54227e44666418da5d5 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Fri, 6 Oct 2017 22:29:46 +0200 Subject: Remove redundant comparison Change-Id: I51820119f9dd6bacb852680b48f0b052ef6cb7e9 Reviewed-on: https://gerrit.libreoffice.org/43214 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- sw/source/core/unocore/unofield.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sw') diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx index 8902c0ea8c27..9d0b21b2cbc5 100644 --- a/sw/source/core/unocore/unofield.cxx +++ b/sw/source/core/unocore/unofield.cxx @@ -626,7 +626,7 @@ void SAL_CALL SwXFieldMaster::setPropertyValue( } } - else if (!pType && m_pImpl->m_pDoc && rPropertyName == UNO_NAME_NAME) + else if (m_pImpl->m_pDoc && rPropertyName == UNO_NAME_NAME) { OUString sTypeName; rValue >>= sTypeName; @@ -2782,7 +2782,7 @@ sal_Bool SwXTextFieldMasters::hasByName(const OUString& rName) if( SwFieldIds::Unknown != nResId ) { sName = sName.copy(std::min(sTypeName.getLength()+1, sName.getLength())); - bRet = SwFieldIds::Unknown != nResId && nullptr != GetDoc()->getIDocumentFieldsAccess().GetFieldType(nResId, sName, true); + bRet = nullptr != GetDoc()->getIDocumentFieldsAccess().GetFieldType(nResId, sName, true); } return bRet; } -- cgit