summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-10-02 14:04:58 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-10-02 14:49:08 +0100
commit31c407e35bb57adaba338205b6a40301d28d804f (patch)
treed6e63fd4221c6883d2678d0442906075b797e373
parent5d796ae7f4e742665b6aaa722d13f0611023ec44 (diff)
coverity#735532 'Constant' variable guards dead code
Change-Id: Ia0b8ad6af83907a51678e37e41c445fa4a7b5a58
-rw-r--r--sw/source/filter/html/swhtml.cxx36
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 )