From 6ac930d25f368bfbd984e79c758747318aa34b3c Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sun, 10 May 2015 21:20:33 +0100 Subject: cppcheck: cstyleCast Change-Id: I0cc54e443793dda9bd11a907cc79b54dab3810ad --- sw/source/core/text/itrpaint.cxx | 2 +- sw/source/core/text/porlay.hxx | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'sw') diff --git a/sw/source/core/text/itrpaint.cxx b/sw/source/core/text/itrpaint.cxx index 2e93cdd4ee29..2583b4eec9d4 100644 --- a/sw/source/core/text/itrpaint.cxx +++ b/sw/source/core/text/itrpaint.cxx @@ -550,7 +550,7 @@ void SwTxtPainter::CheckSpecialUnderline( const SwLinePortion* pPor, { // here starts the algorithm for calculating the underline font SwScriptInfo& rScriptInfo = GetInfo().GetParaPortion()->GetScriptInfo(); - SwAttrIter aIter( *(SwTxtNode*)GetInfo().GetTxtFrm()->GetTxtNode(), + SwAttrIter aIter( *GetInfo().GetTxtFrm()->GetTxtNode(), rScriptInfo ); sal_Int32 nTmpIdx = nIndx; diff --git a/sw/source/core/text/porlay.hxx b/sw/source/core/text/porlay.hxx index 3784cdaad445..a19be482353c 100644 --- a/sw/source/core/text/porlay.hxx +++ b/sw/source/core/text/porlay.hxx @@ -378,7 +378,11 @@ inline void SwParaPortion::FormatReset() } inline SwLinePortion *SwLineLayout::GetFirstPortion() const -{ return( pPortion ? pPortion : (SwLinePortion*)this ); } +{ + const SwLinePortion *pRet = pPortion ? pPortion : this; + return const_cast(pRet); +} + #endif -- cgit