diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-03-23 09:47:49 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-03-23 09:48:10 +0000 |
commit | ed76d1d3504c92bff6bb3e6417e4440572fcd959 (patch) | |
tree | 6d06b4a20bef5acf0c1a4118685f09acdd27fbb7 /editeng | |
parent | a61c4ae9cef23a53ea88f957e090bd5ee9b28ca6 (diff) |
loplugins:redundantcast teach it about c-style typedef casts
Change-Id: I1ac11a2481c0f4d8be1e1fd7c7637ac0ece3d65c
Reviewed-on: https://gerrit.libreoffice.org/35558
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/accessibility/AccessibleEditableTextPara.cxx | 2 | ||||
-rw-r--r-- | editeng/source/editeng/editdoc.cxx | 2 | ||||
-rw-r--r-- | editeng/source/editeng/editview.cxx | 2 | ||||
-rw-r--r-- | editeng/source/editeng/impedit2.cxx | 4 | ||||
-rw-r--r-- | editeng/source/editeng/impedit3.cxx | 10 | ||||
-rw-r--r-- | editeng/source/items/bulitem.cxx | 2 | ||||
-rw-r--r-- | editeng/source/items/textitem.cxx | 4 | ||||
-rw-r--r-- | editeng/source/misc/unolingu.cxx | 2 |
8 files changed, 14 insertions, 14 deletions
diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx index 50bb53ba5d43..c1b6f30202ef 100644 --- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx +++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx @@ -788,7 +788,7 @@ namespace accessibility } // relation CONTENT_FLOWS_TO - if ( (nMyParaIndex + 1) < (sal_Int32)mpParaManager->GetNum() && + if ( (nMyParaIndex + 1) < mpParaManager->GetNum() && mpParaManager->IsReferencable( nMyParaIndex + 1 ) ) { uno::Sequence<uno::Reference<XInterface> > aSequence diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx index 2b2356d07745..5cb51b1ea647 100644 --- a/editeng/source/editeng/editdoc.cxx +++ b/editeng/source/editeng/editdoc.cxx @@ -631,7 +631,7 @@ sal_Int32 ParaPortion::GetLineNumber( sal_Int32 nIndex ) const for ( sal_Int32 nLine = 0; nLine < aLineList.Count(); nLine++ ) { if ( aLineList[nLine].IsIn( nIndex ) ) - return (sal_Int32)nLine; + return nLine; } // Then it should be at the end of the last line! diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index 9f55c2cf0809..7b6ec40254cf 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -1183,7 +1183,7 @@ void EditView::SetInvalidateMore( sal_uInt16 nPixel ) sal_uInt16 EditView::GetInvalidateMore() const { - return (sal_uInt16)pImpEditView->GetInvalidateMore(); + return pImpEditView->GetInvalidateMore(); } static void ChangeFontSizeImpl( EditView* pEditView, bool bGrow, const ESelection& rSel, const FontList* pFontList ) diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index 37cd711b5bad..d925b2c8a0cc 100644 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -1963,7 +1963,7 @@ bool ImpEditEngine::HasDifferentRTLLevels( const ContentNode* pNode ) bool bHasDifferentRTLLevels = false; sal_uInt16 nRTLLevel = IsRightToLeft( nPara ) ? 1 : 0; - for ( sal_Int32 n = 0; n < (sal_Int32)pParaPortion->GetTextPortions().Count(); n++ ) + for ( sal_Int32 n = 0; n < pParaPortion->GetTextPortions().Count(); n++ ) { const TextPortion& rTextPortion = pParaPortion->GetTextPortions()[n]; if ( rTextPortion.GetRightToLeftLevel() != nRTLLevel ) @@ -3075,7 +3075,7 @@ sal_uInt32 ImpEditEngine::CalcTextWidth( bool bIgnoreExtraSpace ) // On the lines of the paragraph ... - sal_Int32 nLines = (sal_Int32)pPortion->GetLines().Count(); + sal_Int32 nLines = pPortion->GetLines().Count(); for ( sal_Int32 nLine = 0; nLine < nLines; nLine++ ) { EditLine& rLine = pPortion->GetLines()[nLine]; diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index 10ae5407dd51..c45f239d3885 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -2401,7 +2401,7 @@ void ImpEditEngine::CreateTextPortions( ParaPortion* pParaPortion, sal_Int32& rS sal_Int32 nPortionStart = 0; sal_Int32 nInvPortion = 0; sal_Int32 nP; - for ( nP = 0; nP < (sal_Int32)pParaPortion->GetTextPortions().Count(); nP++ ) + for ( nP = 0; nP < pParaPortion->GetTextPortions().Count(); nP++ ) { const TextPortion& rTmpPortion = pParaPortion->GetTextPortions()[nP]; nPortionStart = nPortionStart + rTmpPortion.GetLen(); @@ -2462,7 +2462,7 @@ void ImpEditEngine::RecalcTextPortion( ParaPortion* pParaPortion, sal_Int32 nSta // A blank portion may be here, if the paragraph was empty, // or if a line was created by a hard line break. - if ( ( nNewPortionPos < (sal_Int32)pParaPortion->GetTextPortions().Count() ) && + if ( ( nNewPortionPos < pParaPortion->GetTextPortions().Count() ) && !pParaPortion->GetTextPortions()[nNewPortionPos].GetLen() ) { TextPortion& rTP = pParaPortion->GetTextPortions()[nNewPortionPos]; @@ -3454,7 +3454,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRect, Point aSt aTmpFont.SetPropr( 100 ); aTmpFont.SetPhysFont( pOutDev ); OUStringBuffer aBlanks; - comphelper::string::padToLength( aBlanks, (sal_Int32) nTextLen, ' ' ); + comphelper::string::padToLength( aBlanks, nTextLen, ' ' ); Point aUnderlinePos( aOutPos ); if ( nOrientation ) aUnderlinePos = lcl_ImplCalcRotatedPos( aTmpPos, aOrigin, nSin, nCos ); @@ -4203,7 +4203,7 @@ LanguageType ImpEditEngine::ImplCalcDigitLang(LanguageType eCurLang) const else if ( SvtCTLOptions::NUMERALS_ARABIC == nCTLTextNumerals ) eLang = LANGUAGE_ENGLISH; else if ( SvtCTLOptions::NUMERALS_SYSTEM == nCTLTextNumerals ) - eLang = (LanguageType) Application::GetSettings().GetLanguageTag().getLanguageType(); + eLang = Application::GetSettings().GetLanguageTag().getLanguageType(); return eLang; } @@ -4271,7 +4271,7 @@ void ImpEditEngine::ImplInitLayoutMode( OutputDevice* pOutDev, sal_Int32 nPara, // #114278# Also setting up digit language from Svt options // (cannot reliably inherit the outdev's setting) - LanguageType eLang = (LanguageType) Application::GetSettings().GetLanguageTag().getLanguageType(); + LanguageType eLang = Application::GetSettings().GetLanguageTag().getLanguageType(); ImplInitDigitMode( pOutDev, eLang ); } diff --git a/editeng/source/items/bulitem.cxx b/editeng/source/items/bulitem.cxx index 1e2e6a81a62b..c90634daf52f 100644 --- a/editeng/source/items/bulitem.cxx +++ b/editeng/source/items/bulitem.cxx @@ -36,7 +36,7 @@ void SvxBulletItem::StoreFont( SvStream& rStream, const vcl::Font& rFont ) WriteColor( rStream, rFont.GetColor() ); nTemp = (sal_uInt16)rFont.GetFamilyType(); rStream.WriteUInt16( nTemp ); - nTemp = (sal_uInt16)GetSOStoreTextEncoding((rtl_TextEncoding)rFont.GetCharSet()); + nTemp = (sal_uInt16)GetSOStoreTextEncoding(rFont.GetCharSet()); rStream.WriteUInt16( nTemp ); nTemp = (sal_uInt16)rFont.GetPitch(); rStream.WriteUInt16( nTemp ); diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx index ab5cd092dd92..a9d2777428e1 100644 --- a/editeng/source/items/textitem.cxx +++ b/editeng/source/items/textitem.cxx @@ -2134,7 +2134,7 @@ bool SvxCaseMapItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const case SvxCaseMap::SmallCaps: nRet = style::CaseMap::SMALLCAPS; break; default: break; } - rVal <<= (sal_Int16)(nRet); + rVal <<= nRet; return true; } @@ -3401,7 +3401,7 @@ void GetDefaultFonts( SvxFontItem& rLatin, SvxFontItem& rAsian, SvxFontItem& rCo bool SvxRsidItem::QueryValue( uno::Any& rVal, sal_uInt8 ) const { - rVal <<= ( (sal_uInt32)GetValue() ); + rVal <<= GetValue(); return true; } diff --git a/editeng/source/misc/unolingu.cxx b/editeng/source/misc/unolingu.cxx index e306551ee4d5..c87953bd37d0 100644 --- a/editeng/source/misc/unolingu.cxx +++ b/editeng/source/misc/unolingu.cxx @@ -703,7 +703,7 @@ SvxAlternativeSpelling SvxGetAltSpelling( ++nR; aRes.aReplacement = aAltWord.copy( nL, nAltLen - nL - nR ); - aRes.nChangedPos = (sal_Int16) nL; + aRes.nChangedPos = nL; aRes.nChangedLength = nLen - nL - nR; aRes.bIsAltSpelling = true; aRes.xHyphWord = rHyphWord; |