diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-10-02 14:04:58 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-10-02 14:49:08 +0100 |
commit | 31c407e35bb57adaba338205b6a40301d28d804f (patch) | |
tree | d6e63fd4221c6883d2678d0442906075b797e373 /sw | |
parent | 5d796ae7f4e742665b6aaa722d13f0611023ec44 (diff) |
coverity#735532 'Constant' variable guards dead code
Change-Id: Ia0b8ad6af83907a51678e37e41c445fa4a7b5a58
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/html/swhtml.cxx | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index ead053964fbe..3b3bfdfc4d8d 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -2434,22 +2434,28 @@ void SwHTMLParser::AddParSpace() const size_t nCntAttr = (pTxtNode && pTxtNode->GetpSwpHints()) ? pTxtNode->GetSwpHints().Count() : 0; - for(size_t i = 0; (i < nCntAttr) && !bIsCJK; ++i) + for(size_t i = 0; i < nCntAttr; ++i) { - pHt = rHints.GetTextHint(i); - nWhich = pHt->Which(); - if( RES_CHRATR_CJK_FONT == nWhich || - RES_CHRATR_CJK_FONTSIZE == nWhich || - RES_CHRATR_CJK_LANGUAGE == nWhich || - RES_CHRATR_CJK_POSTURE == nWhich || - RES_CHRATR_CJK_WEIGHT == nWhich ) - bIsCJK = true; - if( RES_CHRATR_CTL_FONT == nWhich || - RES_CHRATR_CTL_FONTSIZE == nWhich || - RES_CHRATR_CTL_LANGUAGE == nWhich || - RES_CHRATR_CTL_POSTURE == nWhich || - RES_CHRATR_CTL_WEIGHT == nWhich ) - bIsCJK = false; + pHt = rHints.GetTextHint(i); + nWhich = pHt->Which(); + if (RES_CHRATR_CJK_FONT == nWhich || + RES_CHRATR_CJK_FONTSIZE == nWhich || + RES_CHRATR_CJK_LANGUAGE == nWhich || + RES_CHRATR_CJK_POSTURE == nWhich || + RES_CHRATR_CJK_WEIGHT == nWhich) + { + bIsCJK = true; + break; + } + if (RES_CHRATR_CTL_FONT == nWhich || + RES_CHRATR_CTL_FONTSIZE == nWhich || + RES_CHRATR_CTL_LANGUAGE == nWhich || + RES_CHRATR_CTL_POSTURE == nWhich || + RES_CHRATR_CTL_WEIGHT == nWhich) + { + bIsCTL = true; + break; + } } if( bIsCTL ) |