summaryrefslogtreecommitdiff
path: root/sw/source/core/text/inftxt.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/text/inftxt.cxx')
-rw-r--r--sw/source/core/text/inftxt.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index 344ccede8962..c399ac758a24 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -426,7 +426,7 @@ void SwTextSizeInfo::GetTextSize( const SwScriptInfo* pSI, const TextFrameIndex
aDrawInf.SetSnapToGrid( SnapToGrid() );
aDrawInf.SetKanaComp( nComp );
SwPosSize aSize( m_pFnt->GetTextSize_( aDrawInf ) );
- nMaxSizeDiff = static_cast<sal_uInt16>(aDrawInf.GetKanaDiff());
+ nMaxSizeDiff = o3tl::narrowing<sal_uInt16>(aDrawInf.GetKanaDiff());
nMinSize = aSize.Width();
}
@@ -955,7 +955,7 @@ static void lcl_DrawSpecial( const SwTextPaintInfo& rTextPaintInfo, const SwLine
Point aTmpPos( nX, nY );
rNonConstTextPaintInfo.SetPos( aTmpPos );
sal_uInt16 nOldWidth = rPor.Width();
- const_cast<SwLinePortion&>(rPor).Width( static_cast<sal_uInt16>(aFontSize.Width()) );
+ const_cast<SwLinePortion&>(rPor).Width( o3tl::narrowing<sal_uInt16>(aFontSize.Width()) );
rTextPaintInfo.DrawText( aTmp, rPor );
const_cast<SwLinePortion&>(rPor).Width( nOldWidth );
rNonConstTextPaintInfo.SetFont( const_cast<SwFont*>(pOldFnt) );