Kaydet (Commit) de0a3e8d authored tarafından David Tardon's avatar David Tardon

coverity#1240253 unchecked return value

Change-Id: I0262cb51fbc0b8e4bb6d6aabbd59a7c271768a99
üst b82055f9
......@@ -498,22 +498,24 @@ bool DocumentLinksAdministrationManager::SelectServerObj( const OUString& rStr,
const SwOutlineNodes& rOutlNds = m_rDoc.GetNodes().GetOutLineNds();
sal_uInt16 nTmpPos;
rOutlNds.Seek_Entry( pNd, &nTmpPos );
rpRange = new SwNodeRange( aPos.nNode, 0, aPos.nNode );
// look for the section's end, now
for( ++nTmpPos;
nTmpPos < rOutlNds.size() &&
nLvl < rOutlNds[ nTmpPos ]->GetTxtNode()->
GetAttrOutlineLevel()-1;
++nTmpPos )
; // there is no block
if( nTmpPos < rOutlNds.size() )
rpRange->aEnd = *rOutlNds[ nTmpPos ];
else
rpRange->aEnd = m_rDoc.GetNodes().GetEndOfContent();
return true;
if ( rOutlNds.Seek_Entry( pNd, &nTmpPos ) )
{
rpRange = new SwNodeRange( aPos.nNode, 0, aPos.nNode );
// look for the section's end, now
for( ++nTmpPos;
nTmpPos < rOutlNds.size() &&
nLvl < rOutlNds[ nTmpPos ]->GetTxtNode()->
GetAttrOutlineLevel()-1;
++nTmpPos )
; // there is no block
if( nTmpPos < rOutlNds.size() )
rpRange->aEnd = *rOutlNds[ nTmpPos ];
else
rpRange->aEnd = m_rDoc.GetNodes().GetEndOfContent();
return true;
}
}
}
......
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