[Libreoffice-commits] .: 2 commits - sd/inc sd/source slideshow/source

Christian Lohmaier cloph at kemper.freedesktop.org
Mon May 16 14:20:46 PDT 2011


 sd/inc/helpids.h                                             |    1 -
 sd/source/ui/slidesorter/controller/SlsAnimationFunction.cxx |    2 +-
 sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx  |    2 +-
 sd/source/ui/slidesorter/view/SlsButtonBar.cxx               |    6 +++---
 slideshow/source/engine/slide/slideimpl.cxx                  |    2 +-
 5 files changed, 6 insertions(+), 7 deletions(-)

New commits:
commit c0255f1178b11054621b182db304fbb45384660f
Author: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
Date:   Mon May 16 23:22:50 2011 +0200

    WaE - add explicit casting (decimal-types → integer types)

diff --git a/sd/source/ui/slidesorter/controller/SlsAnimationFunction.cxx b/sd/source/ui/slidesorter/controller/SlsAnimationFunction.cxx
index bcfb01a..ae84a40 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 9e6fcc3..2d1cba5 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 5254c4b..517166f 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 6876ca4..82491da 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& )
             {
commit dcaf75aa8f530aee9699ca10a73a01312699d66a
Author: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
Date:   Mon May 16 23:21:12 2011 +0200

    WaE (picky) - noeol

diff --git a/sd/inc/helpids.h b/sd/inc/helpids.h
index 06d2b75..93aaa79 100755
--- a/sd/inc/helpids.h
+++ b/sd/inc/helpids.h
@@ -251,4 +251,4 @@
 #define HID_MN_SUB_CONVERT                                      "SD_HID_MN_SUB_CONVERT"
 #define HID_MN_SUB_MIRROR                                       "SD_HID_MN_SUB_MIRROR"
 
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list