[Libreoffice-commits] .: 2 commits - filter/prj svtools/source

Caolán McNamara caolan at kemper.freedesktop.org
Tue Sep 6 03:19:36 PDT 2011


 filter/prj/build.lst              |    2 +-
 svtools/source/graphic/grfmgr.cxx |   12 +++++-------
 2 files changed, 6 insertions(+), 8 deletions(-)

New commits:
commit 2bec6ead48e7296b9d224c2f49b6d4c54b13fae1
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Sep 6 11:19:23 2011 +0100

    nope, python is supposed to install python

diff --git a/filter/prj/build.lst b/filter/prj/build.lst
index 6c2d871..9d2601d 100644
--- a/filter/prj/build.lst
+++ b/filter/prj/build.lst
@@ -1,4 +1,4 @@
-fl      filter  :    TRANSLATIONS:translations svtools unotools xmloff cppu tools cppuhelper sal svx javaunohelper XPDF:xpdf jvmaccess canvas SAXON:saxon LIBXSLT:libxslt basegfx package pyuno NULL
+fl      filter  :    TRANSLATIONS:translations svtools unotools xmloff cppu tools cppuhelper sal svx javaunohelper XPDF:xpdf jvmaccess canvas SAXON:saxon LIBXSLT:libxslt basegfx package PYTHON:python NULL
 fl	filter									usr1	-	all	fl_mkout			NULL
 fl	filter\prj								get		-	all	fl_prj				NULL
 fl	filter\inc								nmake	-	all	fl_inc				NULL
commit 2c90e29e4305407f9fc9aa01b79f8dde7dc4cfb4
Author: Kenneth Venken <kenneth.venken at gmail.com>
Date:   Tue Sep 6 11:12:36 2011 +0100

    cppcheck scope

diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx
index 43b8687..4e3d994 100644
--- a/svtools/source/graphic/grfmgr.cxx
+++ b/svtools/source/graphic/grfmgr.cxx
@@ -275,8 +275,6 @@ sal_Bool GraphicObject::ImplGetCropParams( OutputDevice* pOut, Point& rPt, Size&
         const MapMode   aMap100( MAP_100TH_MM );
         Size            aSize100;
         long            nTotalWidth, nTotalHeight;
-        long            nNewLeft, nNewTop, nNewRight, nNewBottom;
-        double          fScale;
 
         if( nRot10 )
         {
@@ -301,17 +299,17 @@ sal_Bool GraphicObject::ImplGetCropParams( OutputDevice* pOut, Point& rPt, Size&
 
         if( aSize100.Width() > 0 && aSize100.Height() > 0 && nTotalWidth > 0 && nTotalHeight > 0 )
         {
-            fScale = (double) aSize100.Width() / nTotalWidth;
-            nNewLeft = -FRound( ( ( pAttr->GetMirrorFlags() & BMP_MIRROR_HORZ ) ? pAttr->GetRightCrop() : pAttr->GetLeftCrop() ) * fScale );
-            nNewRight = nNewLeft + FRound( aSize100.Width() * fScale ) - 1;
+            double fScale = (double) aSize100.Width() / nTotalWidth;
+            const long nNewLeft = -FRound( ( ( pAttr->GetMirrorFlags() & BMP_MIRROR_HORZ ) ? pAttr->GetRightCrop() : pAttr->GetLeftCrop() ) * fScale );
+            const long nNewRight = nNewLeft + FRound( aSize100.Width() * fScale ) - 1;
 
             fScale = (double) rSz.Width() / aSize100.Width();
             rPt.X() += FRound( nNewLeft * fScale );
             rSz.Width() = FRound( ( nNewRight - nNewLeft + 1 ) * fScale );
 
             fScale = (double) aSize100.Height() / nTotalHeight;
-            nNewTop = -FRound( ( ( pAttr->GetMirrorFlags() & BMP_MIRROR_VERT ) ? pAttr->GetBottomCrop() : pAttr->GetTopCrop() ) * fScale );
-            nNewBottom = nNewTop + FRound( aSize100.Height() * fScale ) - 1;
+            const long nNewTop = -FRound( ( ( pAttr->GetMirrorFlags() & BMP_MIRROR_VERT ) ? pAttr->GetBottomCrop() : pAttr->GetTopCrop() ) * fScale );
+            const long nNewBottom = nNewTop + FRound( aSize100.Height() * fScale ) - 1;
 
             fScale = (double) rSz.Height() / aSize100.Height();
             rPt.Y() += FRound( nNewTop * fScale );


More information about the Libreoffice-commits mailing list