diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-03-07 12:05:56 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-03-07 12:19:27 +0000 |
commit | ad4e155fa81536bda2896ffde69a44aafa7c85af (patch) | |
tree | 816dff9003b305551fd90715402c5386b87563ce /editeng | |
parent | b2c18b7eb7581a41ff51191b2a65e531429ce23a (diff) |
coverity#735418 Logically dead code
Change-Id: Iad5d984cd923758daee8d5d6d76694586a34b9e0
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/editeng.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index 2d8694009c38..30413780943b 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -1835,7 +1835,7 @@ void EditEngine::SetControlWord( sal_uInt32 nWord ) if ( bSpellingChanged ) { pImpEditEngine->StopOnlineSpellTimer(); - if ( bSpellingChanged && ( nWord & EE_CNTRL_ONLINESPELLING ) ) + if (nWord & EE_CNTRL_ONLINESPELLING) { // Create WrongList, start timer... sal_Int32 nNodes = pImpEditEngine->GetEditDoc().Count(); @@ -1856,10 +1856,9 @@ void EditEngine::SetControlWord( sal_uInt32 nWord ) ContentNode* pNode = pImpEditEngine->GetEditDoc().GetObject( n ); const ParaPortion* pPortion = pImpEditEngine->GetParaPortions()[n]; bool bWrongs = false; - if (pNode->GetWrongList() != NULL && ( bSpellingChanged || ( nWord & EE_CNTRL_ONLINESPELLING ) )) + if (pNode->GetWrongList() != NULL) bWrongs = !pNode->GetWrongList()->empty(); - if ( bSpellingChanged ) - pNode->DestroyWrongList(); + pNode->DestroyWrongList(); if ( bWrongs ) { pImpEditEngine->aInvalidRect.Left() = 0; |