Kaydet (Commit) 4eaf7792 authored tarafından Caolán McNamara's avatar Caolán McNamara

cppcheck: cstyleCast, these cast's are unnecessary anyway

and make both uses the same pattern

Change-Id: Ia4170b29ad948af08bfb842a7e28dd7550eb27bf
üst f13cf243
......@@ -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() )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment