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 /vcl | |
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 'vcl')
-rw-r--r-- | vcl/source/control/imp_listbox.cxx | 4 | ||||
-rw-r--r-- | vcl/source/filter/sgvmain.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/bitmap.cxx | 4 | ||||
-rw-r--r-- | vcl/source/gdi/dibtools.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 4 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl2.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/pngread.cxx | 2 | ||||
-rw-r--r-- | vcl/source/outdev/outdev.cxx | 2 | ||||
-rw-r--r-- | vcl/source/outdev/transparent.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/menubarwindow.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/menufloatingwindow.cxx | 2 |
11 files changed, 14 insertions, 14 deletions
diff --git a/vcl/source/control/imp_listbox.cxx b/vcl/source/control/imp_listbox.cxx index c56845b85352..c824c628b896 100644 --- a/vcl/source/control/imp_listbox.cxx +++ b/vcl/source/control/imp_listbox.cxx @@ -1244,7 +1244,7 @@ void ImplListBoxWindow::Tracking( const TrackingEvent& rTEvt ) } else { - nSelect = (sal_Int32) ( ( aPt.Y() + mnBorder ) / mnMaxHeight ) + (sal_Int32) mnTop; + nSelect = (sal_Int32) ( ( aPt.Y() + mnBorder ) / mnMaxHeight ) + mnTop; nSelect = std::min( nSelect, GetLastVisibleEntry() ); nSelect = std::min( nSelect, (sal_Int32) ( mpEntryList->GetEntryCount() - 1 ) ); } @@ -1866,7 +1866,7 @@ void ImplListBoxWindow::ImplDoPaint(vcl::RenderContext& rRenderContext, const Re long nY = 0; // + mnBorder; long nHeight = GetOutputSizePixel().Height();// - mnMaxHeight + mnBorder; - for (sal_Int32 i = (sal_Int32)mnTop; i < nCount && nY < nHeight + mnMaxHeight; i++) + for (sal_Int32 i = mnTop; i < nCount && nY < nHeight + mnMaxHeight; i++) { const ImplEntryType* pEntry = mpEntryList->GetEntryPtr(i); if (nY + pEntry->mnHeight >= rRect.Top() && diff --git a/vcl/source/filter/sgvmain.cxx b/vcl/source/filter/sgvmain.cxx index adc956a6e4c0..0bfc0a3ef74e 100644 --- a/vcl/source/filter/sgvmain.cxx +++ b/vcl/source/filter/sgvmain.cxx @@ -901,7 +901,7 @@ bool SgfFilterSDrw( SvStream& rInp, SgfHeader&, SgfEntry&, GDIMetaFile& rMtf ) rMtf.WindStart(); MapMode aMap(MapUnit::Map10thMM,Point(),Fraction(1,4),Fraction(1,4)); rMtf.SetPrefMapMode(aMap); - rMtf.SetPrefSize(Size((sal_Int16)aPage.Paper.Size.x,(sal_Int16)aPage.Paper.Size.y)); + rMtf.SetPrefSize(Size(aPage.Paper.Size.x, aPage.Paper.Size.y)); bRet=true; return bRet; } diff --git a/vcl/source/gdi/bitmap.cxx b/vcl/source/gdi/bitmap.cxx index 2931f7c1d8dc..ca040df7d384 100644 --- a/vcl/source/gdi/bitmap.cxx +++ b/vcl/source/gdi/bitmap.cxx @@ -1448,7 +1448,7 @@ bool Bitmap::Replace( const Bitmap& rMask, const Color& rReplaceColor ) // Hurray, we do have an unused entry if( !pFlags[ i ] ) { - pAcc->SetPaletteColor( (sal_uInt16) i, rReplaceColor ); + pAcc->SetPaletteColor( i, rReplaceColor ); aReplace = BitmapColor( (sal_uInt8) i ); } } @@ -1642,7 +1642,7 @@ bool Bitmap::Replace( const Color* pSearchColors, const Color* pReplaceColors, pMinG[ i ] <= rCol.GetGreen() && pMaxG[ i ] >= rCol.GetGreen() && pMinB[ i ] <= rCol.GetBlue() && pMaxB[ i ] >= rCol.GetBlue() ) { - pAcc->SetPaletteColor( (sal_uInt16)nEntry, pReplaceColors[ i ] ); + pAcc->SetPaletteColor( nEntry, pReplaceColors[ i ] ); break; } } diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx index 1559a6ac189f..1f2b0a63e26d 100644 --- a/vcl/source/gdi/dibtools.cxx +++ b/vcl/source/gdi/dibtools.cxx @@ -1350,7 +1350,7 @@ bool ImplWriteDIBBits(SvStream& rOStm, BitmapReadAccess& rAcc, BitmapReadAccess* if(bWriteAlpha) { - *pTmp++ = (sal_uInt8)0xff - (sal_uInt8)pAccAlpha->GetPixelIndex( nY, nX ); + *pTmp++ = (sal_uInt8)0xff - pAccAlpha->GetPixelIndex( nY, nX ); } } diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index ef7a11140b5e..a3d38b224340 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -3334,7 +3334,7 @@ bool PDFWriterImpl::emitFonts() aLine.append( nFontStream ); aLine.append( " 0 obj\n" "<</Length " ); - aLine.append( (sal_Int32)nStreamLengthObject ); + aLine.append( nStreamLengthObject ); if (!g_bDebugDisableCompression) aLine.append( " 0 R" "/Filter/FlateDecode" @@ -7755,7 +7755,7 @@ sal_Int32 PDFWriterImpl::emitDocumentMetadata() aMetadataObj.append( "<</Type/Metadata/Subtype/XML/Length " ); - aMetadataObj.append( (sal_Int32) aMetadataStream.getLength() ); + aMetadataObj.append( aMetadataStream.getLength() ); aMetadataObj.append( ">>\nstream\n" ); if ( !writeBuffer( aMetadataObj.getStr(), aMetadataObj.getLength() ) ) return 0; diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx index 00120c5eb298..4a6b12e05131 100644 --- a/vcl/source/gdi/pdfwriter_impl2.cxx +++ b/vcl/source/gdi/pdfwriter_impl2.cxx @@ -266,7 +266,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa } GDIMetaFile aMtf( i_rMtf ); - for( sal_uInt32 i = 0, nCount = aMtf.GetActionSize(); i < (sal_uInt32)nCount; ) + for( sal_uInt32 i = 0, nCount = aMtf.GetActionSize(); i < nCount; ) { if ( !i_pOutDevData || !i_pOutDevData->PlaySyncPageAct( m_rOuterFace, i ) ) { diff --git a/vcl/source/gdi/pngread.cxx b/vcl/source/gdi/pngread.cxx index 09bbc66b695b..056c337f8565 100644 --- a/vcl/source/gdi/pngread.cxx +++ b/vcl/source/gdi/pngread.cxx @@ -711,7 +711,7 @@ bool PNGReaderImpl::ImplReadPalette() if ( ( ( mnChunkLen % 3 ) == 0 ) && ( ( 0 < nCount ) && ( nCount <= 256 ) ) && mxAcc ) { mbPalette = true; - mxAcc->SetPaletteEntryCount( (sal_uInt16) nCount ); + mxAcc->SetPaletteEntryCount( nCount ); for ( sal_uInt16 i = 0; i < nCount; i++ ) { diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx index 787da984bd7c..c4be8b67f630 100644 --- a/vcl/source/outdev/outdev.cxx +++ b/vcl/source/outdev/outdev.cxx @@ -366,7 +366,7 @@ sal_uInt16 OutputDevice::GetBitCount() const return 0; } - return (sal_uInt16)mpGraphics->GetBitCount(); + return mpGraphics->GetBitCount(); } void OutputDevice::SetOutOffXPixel(long nOutOffX) diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx index 96e106c1b431..c1c3a639bff1 100644 --- a/vcl/source/outdev/transparent.cxx +++ b/vcl/source/outdev/transparent.cxx @@ -513,7 +513,7 @@ void OutputDevice::EmulateDrawTransparent ( const tools::PolyPolygon& rPolyPoly, } if( ( *pRScan & cBit ) == cBlack ) { - *pWScan = (sal_uInt8) pMap[ *pWScan ].GetIndex(); + *pWScan = pMap[ *pWScan ].GetIndex(); } } } diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx index 817e07e4236f..876edcdc51d7 100644 --- a/vcl/source/window/menubarwindow.cxx +++ b/vcl/source/window/menubarwindow.cxx @@ -505,7 +505,7 @@ void MenuBarWindow::ChangeHighlightItem( sal_uInt16 n, bool bSelectEntry, bool b pMenu->ImplCallEventListeners( VclEventId::MenuDehighlight, nHighlightedItem ); } - nHighlightedItem = (sal_uInt16)n; + nHighlightedItem = n; SAL_WARN_IF( ( nHighlightedItem != ITEMPOS_INVALID ) && !pMenu->ImplIsVisible( nHighlightedItem ), "vcl", "ChangeHighlightItem: Not visible!" ); if ( nHighlightedItem != ITEMPOS_INVALID ) Invalidate(); //HighlightItem( nHighlightedItem, true ); diff --git a/vcl/source/window/menufloatingwindow.cxx b/vcl/source/window/menufloatingwindow.cxx index 32de3fdd705c..67d430cd9e3d 100644 --- a/vcl/source/window/menufloatingwindow.cxx +++ b/vcl/source/window/menufloatingwindow.cxx @@ -711,7 +711,7 @@ void MenuFloatingWindow::ChangeHighlightItem( sal_uInt16 n, bool bStartPopupTime pMenu->ImplCallEventListeners( VclEventId::MenuDehighlight, nHighlightedItem ); } - nHighlightedItem = (sal_uInt16)n; + nHighlightedItem = n; SAL_WARN_IF( !pMenu->ImplIsVisible( nHighlightedItem ) && nHighlightedItem != ITEMPOS_INVALID, "vcl", "ChangeHighlightItem: Not visible!" ); if( nHighlightedItem != ITEMPOS_INVALID ) { |