diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-01-12 20:13:41 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-01-12 20:13:41 +0100 |
commit | 0ae2d98d1f6d29c80bd1ee830db4c333e4ee1e1d (patch) | |
tree | d9b77eece17b7b144a4ea50592b639b9f7c87095 /sw/source/core/text/txtdrop.cxx | |
parent | 506856ca50e676520bcc80a8b498355663d0388f (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/txtdrop.cxx')
-rw-r--r-- | sw/source/core/text/txtdrop.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sw/source/core/text/txtdrop.cxx b/sw/source/core/text/txtdrop.cxx index 7ec194348087..d6ffec0dc272 100644 --- a/sw/source/core/text/txtdrop.cxx +++ b/sw/source/core/text/txtdrop.cxx @@ -726,7 +726,7 @@ void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTextFormatInfo &rInf aText[ nTmpIdx ] = aStr; aWishedHeight[ nTmpIdx ] = sal_uInt16(nWishedHeight); // save initial scaling factor - aFactor[ nTmpIdx ] = (sal_uInt16)nFactor; + aFactor[ nTmpIdx ] = static_cast<sal_uInt16>(nFactor); } bool bGrow = ( pDrop->GetLen() != 0 ); @@ -876,7 +876,7 @@ void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTextFormatInfo &rInf else { if ( bUseCache ) - aFactor[ nTmpIdx ] = (sal_uInt16)nFactor; + aFactor[ nTmpIdx ] = static_cast<sal_uInt16>(nFactor); nMin = nFactor; } @@ -927,13 +927,13 @@ void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTextFormatInfo &rInf pCurrPart = pCurrPart->GetFollow(); } - pDrop->SetY( (short)nDescent ); + pDrop->SetY( static_cast<short>(nDescent) ); } bool SwDropPortion::Format( SwTextFormatInfo &rInf ) { bool bFull = false; - nFix = (sal_uInt16)rInf.X(); + nFix = static_cast<sal_uInt16>(rInf.X()); SwLayoutModeModifier aLayoutModeModifier( *rInf.GetOut() ); aLayoutModeModifier.SetAuto(); @@ -971,7 +971,7 @@ bool SwDropPortion::Format( SwTextFormatInfo &rInf ) Width(); // set values - pCurrPart->SetWidth( (sal_uInt16)nTmpWidth ); + pCurrPart->SetWidth( static_cast<sal_uInt16>(nTmpWidth) ); // Move rInf.SetIdx( rInf.GetIdx() + pCurrPart->GetLen() ); @@ -980,7 +980,7 @@ bool SwDropPortion::Format( SwTextFormatInfo &rInf ) } SetJoinBorderWithNext(false); SetJoinBorderWithPrev(false); - Width( (sal_uInt16)(rInf.X() - nOldX) ); + Width( static_cast<sal_uInt16>(rInf.X() - nOldX) ); } // reset my length @@ -1018,7 +1018,7 @@ bool SwDropPortion::Format( SwTextFormatInfo &rInf ) else { const sal_uInt16 nWant = Width() + GetDistance(); - const sal_uInt16 nRest = (sal_uInt16)(rInf.Width() - rInf.X()); + const sal_uInt16 nRest = static_cast<sal_uInt16>(rInf.Width() - rInf.X()); if( ( nWant > nRest ) || lcl_IsDropFlyInter( rInf, Width() + GetDistance(), nDropHeight ) ) nDistance = 0; |