summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/core/text/itrpaint.cxx2
-rw-r--r--sw/source/core/text/porlay.hxx6
2 files changed, 6 insertions, 2 deletions
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<SwLinePortion*>(pRet);
+}
+
#endif