diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-04-23 17:04:03 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-04-23 21:08:20 +0100 |
commit | 4eaf7792423802736904a4390355b5718a122d48 (patch) | |
tree | 8807d38ea4fe4ee889d939b1edcd53fc75cf41ec | |
parent | f13cf2437f34402ef76bec6dc2c77f9f388f15b8 (diff) |
cppcheck: cstyleCast, these cast's are unnecessary anyway
and make both uses the same pattern
Change-Id: Ia4170b29ad948af08bfb842a7e28dd7550eb27bf
-rw-r--r-- | sw/source/filter/ww8/wrtw8sty.cxx | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx index 1b4a5d972c13..e9d472368347 100644 --- a/sw/source/filter/ww8/wrtw8sty.cxx +++ b/sw/source/filter/ww8/wrtw8sty.cxx @@ -2208,14 +2208,12 @@ bool WW8_WrPlcSubDoc::WriteGenericTxt( WW8Export& rWrt, sal_uInt8 nTTyp, } } } - else if( i < aSpareFmts.size() ) + else if (i < aSpareFmts.size() && aSpareFmts[i]) { - if( const SwFrmFmt* pFmt = (const SwFrmFmt*)aSpareFmts[ i ] ) - { - const SwNodeIndex* pNdIdx = pFmt->GetCntnt().GetCntntIdx(); - rWrt.WriteSpecialText( pNdIdx->GetIndex() + 1, - pNdIdx->GetNode().EndOfSectionIndex(), nTTyp ); - } + const SwFrmFmt& rFmt = *aSpareFmts[i]; + const SwNodeIndex* pNdIdx = rFmt.GetCntnt().GetCntntIdx(); + rWrt.WriteSpecialText( pNdIdx->GetIndex() + 1, + pNdIdx->GetNode().EndOfSectionIndex(), nTTyp ); } // CR at end of one textbox text ( otherwise WW gpft :-( ) @@ -2458,9 +2456,9 @@ void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, sal_uInt8 nTTyp, } if( NULL == pObj ) { - if( i < aSpareFmts.size() && aSpareFmts[ i ] ) + if (i < aSpareFmts.size() && aSpareFmts[i]) { - const SwFrmFmt& rFmt = *(const SwFrmFmt*)aSpareFmts[ i ]; + const SwFrmFmt& rFmt = *aSpareFmts[i]; const SwFmtChain* pChn = &rFmt.GetChain(); while( pChn->GetNext() ) |