Kaydet (Commit) 44fd49d6 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1202788 Unchecked dynamic_cast

Change-Id: Ia768f7ebedfbf8650159db9eb86e107994c22374
üst 516a22af
...@@ -1282,10 +1282,10 @@ void SwTOXBaseSection::UpdateSequence( const SwTxtNode* pOwnChapterNode ) ...@@ -1282,10 +1282,10 @@ void SwTOXBaseSection::UpdateSequence( const SwTxtNode* pOwnChapterNode )
( !IsFromChapter() || ( !IsFromChapter() ||
::lcl_FindChapterNode( rTxtNode, 0 ) == pOwnChapterNode ) ) ::lcl_FindChapterNode( rTxtNode, 0 ) == pOwnChapterNode ) )
{ {
const SwSetExpField* pSeqField = dynamic_cast< const SwSetExpField* >( pFmtFld->GetField() ); const SwSetExpField& rSeqField = dynamic_cast<const SwSetExpField&>(*(pFmtFld->GetField()));
OUString sName = GetSequenceName(); OUString sName = GetSequenceName();
sName += OUString( cSequenceMarkSeparator ); sName += OUString( cSequenceMarkSeparator );
sName += OUString::number( pSeqField->GetSeqNumber() ); sName += OUString::number( rSeqField.GetSeqNumber() );
SwTOXPara * pNew = new SwTOXPara( rTxtNode, nsSwTOXElement::TOX_SEQUENCE, 1, sName ); SwTOXPara * pNew = new SwTOXPara( rTxtNode, nsSwTOXElement::TOX_SEQUENCE, 1, sName );
// set indexes if the number or the reference text are to be displayed // set indexes if the number or the reference text are to be displayed
if( GetCaptionDisplay() == CAPTION_TEXT ) if( GetCaptionDisplay() == CAPTION_TEXT )
......
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