summaryrefslogtreecommitdiff
path: root/sw/source/core/text/portxt.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-01-12 20:13:41 +0100
committerStephan Bergmann <sbergman@redhat.com>2018-01-12 20:13:41 +0100
commit0ae2d98d1f6d29c80bd1ee830db4c333e4ee1e1d (patch)
treed9b77eece17b7b144a4ea50592b639b9f7c87095 /sw/source/core/text/portxt.cxx
parent506856ca50e676520bcc80a8b498355663d0388f (diff)
More loplugin:cstylecast: sw
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: I0f49d21dfdf82742f11b27709f74294feb1e419e
Diffstat (limited to 'sw/source/core/text/portxt.cxx')
-rw-r--r--sw/source/core/text/portxt.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx
index 58ca2664ab0e..d6da0f0db312 100644
--- a/sw/source/core/text/portxt.cxx
+++ b/sw/source/core/text/portxt.cxx
@@ -76,7 +76,7 @@ static sal_Int32 lcl_AddSpace( const SwTextSizeInfo &rInf, const OUString* pStr,
if ( pSI )
nScript = pSI->ScriptType( nPos );
else
- nScript = (sal_uInt8)g_pBreakIt->GetBreakIter()->getScriptType( *pStr, nPos );
+ nScript = static_cast<sal_uInt8>(g_pBreakIt->GetBreakIter()->getScriptType( *pStr, nPos ));
// Note: rInf.GetIdx() can differ from nPos,
// e.g., when rPor is a field portion. nPos referes to the string passed
@@ -191,10 +191,10 @@ static sal_Int32 lcl_AddSpace( const SwTextSizeInfo &rInf, const OUString* pStr,
pPor->GetExpText( rInf, aStr );
const_cast<SwTextSizeInfo &>(rInf).SetOnWin( bOldOnWin );
- nNextScript = (sal_uInt8)g_pBreakIt->GetBreakIter()->getScriptType( aStr, 0 );
+ nNextScript = static_cast<sal_uInt8>(g_pBreakIt->GetBreakIter()->getScriptType( aStr, 0 ));
}
else
- nNextScript = (sal_uInt8)g_pBreakIt->GetBreakIter()->getScriptType( rInf.GetText(), nPos );
+ nNextScript = static_cast<sal_uInt8>(g_pBreakIt->GetBreakIter()->getScriptType( rInf.GetText(), nPos ));
if( ASIAN == nNextScript )
{
@@ -222,7 +222,7 @@ void SwTextPortion::BreakCut( SwTextFormatInfo &rInf, const SwTextGuess &rGuess
// The word/char is larger than the line
// Special case 1: The word is larger than the line
// We truncate ...
- const sal_uInt16 nLineWidth = (sal_uInt16)(rInf.Width() - rInf.X());
+ const sal_uInt16 nLineWidth = static_cast<sal_uInt16>(rInf.Width() - rInf.X());
sal_Int32 nLen = rGuess.CutPos() - rInf.GetIdx();
if (nLen > 0)
{
@@ -329,7 +329,7 @@ bool SwTextPortion::Format_( SwTextFormatInfo &rInf )
short nKern = rInf.GetFont()->CheckKerning();
if( nKern > 0 && rInf.Width() < rInf.X() + Width() + nKern )
{
- nKern = (short)(rInf.Width() - rInf.X() - Width() - 1);
+ nKern = static_cast<short>(rInf.Width() - rInf.X() - Width() - 1);
if( nKern < 0 )
nKern = 0;
}