summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-03-19 14:17:58 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-03-19 18:31:27 +0100
commit9501b7f33183e22de9fab7b2e4bd0e82dbcf7eef (patch)
treed800bc966a648b6c6b62a008737746328356074a
parentd414befa3f837aed3d80a77756a154e30dc6cb37 (diff)
coverity#1430093 Logically dead code
regression from... commit e9171066136868fe89947dda5095e9479d5e50e7 Date: Sat Mar 10 18:00:58 2018 +0100 Use for-range loops in editeng Change-Id: If7601ecc0d8d87bf87d982544e0f4b5b2a5d91c6 Reviewed-on: https://gerrit.libreoffice.org/51561 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--editeng/source/uno/unotext2.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/editeng/source/uno/unotext2.cxx b/editeng/source/uno/unotext2.cxx
index 41c5c4e73f2c..908485f86683 100644
--- a/editeng/source/uno/unotext2.cxx
+++ b/editeng/source/uno/unotext2.cxx
@@ -62,7 +62,7 @@ SvxUnoTextContentEnumeration::SvxUnoTextContentEnumeration( const SvxUnoTextBase
ESelection aCurrentParaSel = ESelection( currentPara, nStartPos, currentPara, nEndPos );
for (auto const& elemRange : rRanges)
{
- if (!pContent)
+ if (pContent)
break;
SvxUnoTextContent* pIterContent = dynamic_cast< SvxUnoTextContent* >( elemRange );
if( pIterContent && (pIterContent->mnParagraph == currentPara) )
@@ -409,7 +409,7 @@ SvxUnoTextRangeEnumeration::SvxUnoTextRangeEnumeration(const SvxUnoTextBase& rTe
SvxUnoTextRange* pRange = nullptr;
for (auto const& elemRange : rRanges)
{
- if (!pRange)
+ if (pRange)
break;
SvxUnoTextRange* pIterRange = dynamic_cast< SvxUnoTextRange* >( elemRange );
if( pIterRange && pIterRange->mbPortion && (aSel == pIterRange->maSelection) )