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

coverity#1426945 Unchecked dynamic_cast

Change-Id: I6c3d84a0fb1b4332f78a1c0ca04c9a7700b53c90
üst 826cf6f9
......@@ -1027,10 +1027,9 @@ static bool lcl_SetTextFormatColl( const SwNodePtr& rpNode, void* pArgs )
{
// Check, if the list style of the paragraph will change.
bool bChangeOfListStyleAtParagraph( true );
SwTextNode* pTNd( dynamic_cast<SwTextNode*>(pCNd) );
OSL_ENSURE( pTNd, "<lcl_SetTextFormatColl(..)> - text node expected -> crash" );
SwTextNode& rTNd(dynamic_cast<SwTextNode&>(*pCNd));
{
SwNumRule* pNumRuleAtParagraph( pTNd->GetNumRule() );
SwNumRule* pNumRuleAtParagraph(rTNd.GetNumRule());
if ( pNumRuleAtParagraph )
{
const SwNumRuleItem& rNumRuleItemAtParagraphStyle =
......@@ -1048,7 +1047,7 @@ static bool lcl_SetTextFormatColl( const SwNodePtr& rpNode, void* pArgs )
std::unique_ptr< SwRegHistory > pRegH;
if ( pPara->pHistory )
{
pRegH.reset( new SwRegHistory( pTNd, *pTNd, pPara->pHistory ) );
pRegH.reset(new SwRegHistory(&rTNd, rTNd, pPara->pHistory));
}
pCNd->ResetAttr( RES_PARATR_NUMRULE );
......
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