[Libreoffice-commits] .: 2 commits - svtools/source vcl/source

Caolán McNamara caolan at kemper.freedesktop.org
Sat Nov 27 13:18:43 PST 2010


 svtools/source/filter.vcl/wmf/winwmf.cxx |    8 ++++----
 vcl/source/gdi/pdfwriter_impl.hxx        |    2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 3718feb2ce0fa75b808f5f1ff365db519ea6d9ae
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Nov 27 21:17:11 2010 +0000

    cppcheck: can reduce the scope of these variables

diff --git a/svtools/source/filter.vcl/wmf/winwmf.cxx b/svtools/source/filter.vcl/wmf/winwmf.cxx
index fdb8cf5..44e1ae8 100644
--- a/svtools/source/filter.vcl/wmf/winwmf.cxx
+++ b/svtools/source/filter.vcl/wmf/winwmf.cxx
@@ -1211,10 +1211,6 @@ sal_Bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pSt
     rPlaceableBound.Right()  = (sal_Int32)0x80000000;
     rPlaceableBound.Bottom() = (sal_Int32)0x80000000;
     
-    sal_Int16 nMapMode = MM_ANISOTROPIC;
-
-    sal_uInt16 nFunction;
-    sal_uInt32 nRSize;
     sal_uInt32 nPos = pStm->Tell();
     sal_uInt32 nEnd = pStm->Seek( STREAM_SEEK_TO_END );
     
@@ -1222,6 +1218,10 @@ sal_Bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pSt
 
     if( nEnd - nPos )
     {
+        sal_Int16 nMapMode = MM_ANISOTROPIC;
+        sal_uInt16 nFunction;
+        sal_uInt32 nRSize;
+
         while( bRet )
         {
             *pStm >> nRSize >> nFunction;
commit ce562d24d52bcaf9d98fbf71c7a382adf9f516f6
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Nov 27 21:09:13 2010 +0000

    cppcheck: init member variable in ctor

diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx
index 598e1df..509222a 100644
--- a/vcl/source/gdi/pdfwriter_impl.hxx
+++ b/vcl/source/gdi/pdfwriter_impl.hxx
@@ -228,7 +228,7 @@ public:
         sal_Int32			m_nObject;
         bool                m_bTrueColor;
 
-        JPGEmit() : m_pStream( NULL ) {}
+        JPGEmit() : m_pStream( NULL ), m_bTrueColor( false ) {}
         ~JPGEmit() { delete m_pStream; }
     };
 


More information about the Libreoffice-commits mailing list