summaryrefslogtreecommitdiff
path: root/editeng/source
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2015-06-14 13:35:37 +0200
committerNoel Grandin <noel@peralex.com>2015-06-15 11:56:55 +0200
commit5a2e09989a4b9746a56f15fe7499067a4327fbae (patch)
tree846226a33613d2de8621717ced337328649d1155 /editeng/source
parent7eac94da23f2f4460252eae5fa073fd1d833ba99 (diff)
cppcheck:redundantCondition
Change-Id: Ib8b6342d1da526df6104125ded546b3f053c448b
Diffstat (limited to 'editeng/source')
-rw-r--r--editeng/source/items/numitem.cxx2
-rw-r--r--editeng/source/misc/svxacorr.cxx6
2 files changed, 5 insertions, 3 deletions
diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx
index f99fff5f9203..c25121471652 100644
--- a/editeng/source/items/numitem.cxx
+++ b/editeng/source/items/numitem.cxx
@@ -398,7 +398,7 @@ void SvxNumberFormat::SetGraphicBrush( const SvxBrushItem* pBrushItem,
delete pGraphicBrush;
pGraphicBrush = 0;
}
- else if ( !pGraphicBrush || !(*pBrushItem == *pGraphicBrush) )
+ else if ( !pGraphicBrush || (*pBrushItem != *pGraphicBrush) )
{
delete pGraphicBrush;
pGraphicBrush = static_cast<SvxBrushItem*>(pBrushItem->Clone());
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index fc84b22bd337..3095affdc11a 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -2876,8 +2876,10 @@ const SvxAutocorrWord* SvxAutocorrWordList::WordMatches(const SvxAutocorrWord *p
sal_Int32 nFndPos = -1;
do {
nFndPos = rTxt.indexOf( sTmp, nFndPos + 1);
- not_suffix = (bWasWordDelim && (nSttWdPos >= nFndPos + sTmp.getLength()));
- } while ( nFndPos != -1 && (!(left_wildcard || (!left_wildcard && (!nFndPos || IsWordDelim( rTxt[ nFndPos - 1 ])))) || not_suffix));
+ if (nFndPos == -1)
+ break;
+ not_suffix = bWasWordDelim && (nSttWdPos >= (nFndPos + sTmp.getLength()));
+ } while ( (!left_wildcard && nFndPos && !IsWordDelim( rTxt[ nFndPos - 1 ])) || not_suffix );
if ( nFndPos != -1 )
{