diff options
author | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2011-05-16 23:22:50 +0200 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2011-05-16 23:22:50 +0200 |
commit | 0b26358b96e77efffed70d5b7c9a50cdd12da2a8 (patch) | |
tree | 0ad7302211e60fc1a0938517ea92a19c1c8db757 | |
parent | 0183c94cafa2b61217f018f51cac84667aa6fbfb (diff) |
WaE - add explicit casting (decimal-types → integer types)
4 files changed, 6 insertions, 6 deletions
diff --git a/sd/source/ui/slidesorter/controller/SlsAnimationFunction.cxx b/sd/source/ui/slidesorter/controller/SlsAnimationFunction.cxx index 71b6c024ae7a..0acaff6833a2 100644 --- a/sd/source/ui/slidesorter/controller/SlsAnimationFunction.cxx +++ b/sd/source/ui/slidesorter/controller/SlsAnimationFunction.cxx @@ -276,7 +276,7 @@ AnimationParametricFunction::AnimationParametricFunction (const ParametricFuncti double AnimationParametricFunction::operator() (const double nX) { - const sal_Int32 nIndex0 (nX * maY.size()); + const sal_Int32 nIndex0 (static_cast<sal_Int32>(nX * maY.size())); const double nX0 (nIndex0 / double(maY.size()-1)); const sal_uInt32 nIndex1 (nIndex0 + 1); const double nX1 (nIndex1 / double(maY.size()-1)); diff --git a/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx b/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx index 71ac9450ca21..3de7eb8c3901 100644 --- a/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx @@ -195,7 +195,7 @@ void ScrollBarManager::PlaceVerticalScrollBar (const Rectangle& aArea) mpVerticalScrollBar->SetPosSizePixel(aPosition, aSize); // Restore the position. - mpVerticalScrollBar->SetThumbPos(nThumbPosition); + mpVerticalScrollBar->SetThumbPos(static_cast<long>(nThumbPosition)); mnVerticalPosition = nThumbPosition / double(mpVerticalScrollBar->GetRange().Len()); } diff --git a/sd/source/ui/slidesorter/view/SlsButtonBar.cxx b/sd/source/ui/slidesorter/view/SlsButtonBar.cxx index f338a998c56f..c98cc49199e2 100644 --- a/sd/source/ui/slidesorter/view/SlsButtonBar.cxx +++ b/sd/source/ui/slidesorter/view/SlsButtonBar.cxx @@ -155,7 +155,7 @@ namespace { for (sal_Int32 nX = 0; nX<nWidth; ++nX) { const sal_uInt8 nValue (255 - pSourceBitmap->GetPixel(nY, nX).GetBlueOrIndex()); - const sal_uInt8 nNewValue (nValue * (1-nAlpha)); + const sal_uInt8 nNewValue (static_cast<sal_uInt8>(nValue * (1-nAlpha))); pBitmap->SetPixel(nY, nX, 255-nNewValue); } } @@ -756,8 +756,8 @@ void ButtonBar::StartFadeAnimation ( ::boost::ref(mrSlideSorter.GetView()), ::boost::bind(aButtonBlendFunctor, _1), ::boost::bind(aButtonBarBlendFunctor, _1)), - nDelay, - nDuration, + static_cast<sal_Int32>(nDelay), + static_cast<sal_Int32>(nDuration), ::boost::bind( &model::VisualState::SetButtonAlphaAnimationId, ::boost::ref(pDescriptor->GetVisualState()), diff --git a/slideshow/source/engine/slide/slideimpl.cxx b/slideshow/source/engine/slide/slideimpl.cxx index eb2ee6c1bc57..4c749ee9a307 100644 --- a/slideshow/source/engine/slide/slideimpl.cxx +++ b/slideshow/source/engine/slide/slideimpl.cxx @@ -1158,7 +1158,7 @@ bool SlideImpl::loadShapes() } addPolygons(aMPShapesFunctor.getPolygons()); - nCurrCount = aMPShapesFunctor.getImportedShapesCount(); + nCurrCount = static_cast<sal_Int32>(aMPShapesFunctor.getImportedShapesCount()); } catch( uno::RuntimeException& ) { |