sw/source/core/doc/docfmt.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
New commits: commit b50c438583c4e3f8865eb553694a209803c988f5 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Dec 25 20:59:46 2017 +0000 coverity#1426945 Unchecked dynamic_cast Change-Id: I6c3d84a0fb1b4332f78a1c0ca04c9a7700b53c90 diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index c344a2f6e966..c4bbf0b78ce3 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -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 );
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits