diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2014-01-26 13:38:27 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2014-01-26 13:38:27 +0100 |
commit | 3f42c99fedb4502386a65a106c1552859d951c0e (patch) | |
tree | a7241d7b2a97def3eee2d11e9e2a458d97961431 /sw/source | |
parent | 8ef77fc61e207598d5ad6ca428ccac4249aed170 (diff) |
coverity#1157752 : Copy-paste error
Change-Id: Ic1f6983ebaf0f14542a8f8ebc071382018aa3686
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/access/accpara.cxx | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx index 2f795c64feac..39117823c12d 100644 --- a/sw/source/core/access/accpara.cxx +++ b/sw/source/core/access/accpara.cxx @@ -1562,22 +1562,21 @@ OUString SwAccessibleParagraph::GetFieldTypeNameAtIndex(sal_Int32 nIndex) const SwpHints* pSwpHints = GetTxtNode()->GetpSwpHints(); if (pSwpHints) { - const sal_uInt16 nSize = pSwpHints->Count(); + const sal_uInt16 nSize = pSwpHints ? pSwpHints->Count() : 0; for( sal_uInt16 i = 0; i < nSize; ++i ) { const SwTxtAttr* pHt = (*pSwpHints)[i]; - if ( ( pHt->Which() == RES_TXTATR_FIELD || - pHt->Which() == RES_TXTATR_ANNOTATION || - pHt->Which() == RES_TXTATR_INPUTFIELD ) && - ( nFldIndex-- == 0)) + if ( ( pHt->Which() == RES_TXTATR_FIELD + || pHt->Which() == RES_TXTATR_ANNOTATION + || pHt->Which() == RES_TXTATR_INPUTFIELD ) + && (nFldIndex-- == 0)) { pTxtFld = (SwTxtFld *)pHt; break; } - else if (pHt->Which() == RES_TXTATR_REFMARK && (nFldIndex-- == 0)) - { + else if (pHt->Which() == RES_TXTATR_REFMARK + && (nFldIndex-- == 0)) strTypeName = "set reference"; - } } } } @@ -2364,7 +2363,7 @@ void SwAccessibleParagraph::_correctValues( const sal_Int32 nIndex, if (rValue.Name.compareTo( ChangeAttrColor.Name )==0) { - rValue.Value = ChangeAttr.Value; + rValue.Value = ChangeAttrColor.Value; continue; } |