[Libreoffice-commits] .: 4 commits - comphelper/inc l10ntools/inc l10ntools/source sot/source svtools/source toolkit/source vcl/source vcl/unx

Christian Lohmaier cloph at kemper.freedesktop.org
Mon May 16 14:51:31 PDT 2011


 comphelper/inc/comphelper/documentconstants.hxx         |    1 -
 l10ntools/inc/xmlparse.hxx                              |    2 +-
 l10ntools/source/merge.cxx                              |    1 -
 l10ntools/source/xmlparse.cxx                           |    2 +-
 sot/source/sdstor/stgio.cxx                             |    1 -
 svtools/source/control/ctrlbox.cxx                      |   12 ++++++------
 svtools/source/misc/imap.cxx                            |    1 -
 toolkit/source/awt/asynccallback.cxx                    |    1 -
 toolkit/source/controls/grid/defaultgridcolumnmodel.cxx |    1 -
 toolkit/source/controls/grid/initguard.hxx              |    1 -
 toolkit/source/helper/listenermultiplexer.cxx           |    1 -
 vcl/source/app/solarmutex.cxx                           |    1 -
 vcl/source/gdi/outdev3.cxx                              |    2 +-
 vcl/source/gdi/pdfwriter.cxx                            |    1 -
 vcl/source/glyphs/gcach_layout.cxx                      |    4 ++--
 vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx                |    2 +-
 vcl/unx/source/gdi/salbmp.cxx                           |    2 +-
 vcl/unx/source/window/salobj.cxx                        |    1 -
 18 files changed, 13 insertions(+), 24 deletions(-)

New commits:
commit 9c244cae04b6c9eace612f17fb5ff8cb1a1637be
Author: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
Date:   Mon May 16 23:53:43 2011 +0200

    WaE - might be used uninitialized

diff --git a/vcl/unx/source/gdi/salbmp.cxx b/vcl/unx/source/gdi/salbmp.cxx
index 3021aaf..2c3de92 100644
--- a/vcl/unx/source/gdi/salbmp.cxx
+++ b/vcl/unx/source/gdi/salbmp.cxx
@@ -792,7 +792,7 @@ bool X11SalBitmap::Create( const ::com::sun::star::uno::Reference< ::com::sun::s
 
                 mbGrey = bMask;
                 bool bSuccess = ImplCreateFromDrawable( pixmapHandle, 0, depth, 0, 0, (long) rSize.Width(), (long) rSize.Height() );
-                bool bFreePixmap;
+                bool bFreePixmap = false;
                 if( bSuccess && (args[0] >>= bFreePixmap) && bFreePixmap )
                     XFreePixmap( GetX11SalData()->GetDisplay()->GetDisplay(), pixmapHandle );
 
commit 96b59b35c35728308c80961ea8a44de66e7e5e5d
Author: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
Date:   Mon May 16 23:52:47 2011 +0200

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

diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index 62057ce..e714a92 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -319,25 +319,25 @@ bool BorderWidthImpl::operator== ( const BorderWidthImpl& r ) const
 
 long BorderWidthImpl::GetLine1( long nWidth ) const
 {
-    long result = m_nRate1;
+    long result = static_cast<long>(m_nRate1);
     if ( ( m_nFlags & CHANGE_LINE1 ) > 0 )
-        result = m_nRate1 * nWidth;
+        result = static_cast<long>(m_nRate1 * nWidth);
     return result;
 }
 
 long BorderWidthImpl::GetLine2( long nWidth ) const
 {
-    long result = m_nRate2;
+    long result = static_cast<long>(m_nRate2);
     if ( ( m_nFlags & CHANGE_LINE2 ) > 0 )
-        result = m_nRate2 * nWidth;
+        result = static_cast<long>(m_nRate2 * nWidth);
     return result;
 }
 
 long BorderWidthImpl::GetGap( long nWidth ) const
 {
-    long result = m_nRateGap;
+    long result = static_cast<long>(m_nRateGap);
     if ( ( m_nFlags & CHANGE_DIST ) > 0 )
-        result = m_nRateGap * nWidth;
+        result = static_cast<long>(m_nRateGap * nWidth);
 
     // Avoid having too small distances (less than 1pt)
     if ( result < 20 && m_nRate1 > 0 && m_nRate2 > 0 )
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index d43c163..0f1c30b 100644
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -6132,7 +6132,7 @@ void OutputDevice::forceFallbackFontToFit(SalLayout &rFallback, ImplFontEntry &r
         if (fScale < 1)
         {
             long nOrigHeight = rFontSelData.mnHeight;
-            rFontSelData.mnHeight *= fScale;
+            rFontSelData.mnHeight = static_cast<int>(static_cast<float>(rFontSelData.mnHeight) * fScale);
             rFallbackFont.mnSetFontFlags = mpGraphics->SetFont( &rFontSelData, nFallbackLevel );
             rFontSelData.mnHeight = nOrigHeight;
         }
diff --git a/vcl/source/glyphs/gcach_layout.cxx b/vcl/source/glyphs/gcach_layout.cxx
index bde1a73..49273ab 100644
--- a/vcl/source/glyphs/gcach_layout.cxx
+++ b/vcl/source/glyphs/gcach_layout.cxx
@@ -553,7 +553,7 @@ bool IcuLayoutEngine::operator()( ServerFontLayout& rLayout, ImplLayoutArgs& rAr
                 {
                     if ( j == nRawRunGlyphCount )
                     {
-                        nNewWidth = pNextPos->fX - pPos->fX;
+                        nNewWidth = static_cast<int>(pNextPos->fX - pPos->fX);
                         break;
                     }
 
@@ -566,7 +566,7 @@ bool IcuLayoutEngine::operator()( ServerFontLayout& rLayout, ImplLayoutArgs& rAr
                     int nNextGlyphWidth = rNextGM.GetCharWidth();
                     if ( nNextGlyphWidth > 0 )
                     {
-                        nNewWidth = pNextPos->fX - pPos->fX;
+                        nNewWidth = static_cast<int>(pNextPos->fX - pPos->fX);
                         break;
                     }
                 }
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 1309c53..5c562a1 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -1056,7 +1056,7 @@ sal_Bool GtkSalGraphics::getNativeControlRegion(  ControlType nType,
 
             pango_font_metrics_unref( metrics );
 
-            arrow_extent = arrow_size * arrow_scaling;
+            arrow_extent = static_cast<gint>(arrow_size * arrow_scaling);
 
             rNativeContentRegion = Rectangle( Point( 0, 0 ),
                                               Size( arrow_extent, arrow_extent ));
commit ccd8cfe685680987e60e04a196a8adfaf42ef90e
Author: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
Date:   Mon May 16 23:50:00 2011 +0200

    revert part of 5cd163969b0958bd5812f837ff014409bf5b72ce
    
    size_t is unsigned type, but function returns negative value
    (function is apparenly not used anywhere else)

diff --git a/l10ntools/inc/xmlparse.hxx b/l10ntools/inc/xmlparse.hxx
index aa5c79d..5318911 100644
--- a/l10ntools/inc/xmlparse.hxx
+++ b/l10ntools/inc/xmlparse.hxx
@@ -176,7 +176,7 @@ public:
     );
 
     virtual int GetPosition( ByteString id );
-    size_t RemoveChild( XMLElement *pRefElement );
+    int RemoveChild( XMLElement *pRefElement );
     void RemoveAndDeleteAllChilds();
 
     /// returns a child element which matches the given one
diff --git a/l10ntools/source/xmlparse.cxx b/l10ntools/source/xmlparse.cxx
index be1deca..d7c39b1 100644
--- a/l10ntools/source/xmlparse.cxx
+++ b/l10ntools/source/xmlparse.cxx
@@ -188,7 +188,7 @@ int XMLParentNode::GetPosition( ByteString id ){
 }
 
 /*****************************************************************************/
-size_t XMLParentNode::RemoveChild( XMLElement *pRefElement )
+int XMLParentNode::RemoveChild( XMLElement *pRefElement )
 /*****************************************************************************/
 {
     XMLElement* a;
commit a40bbb2322b253b39ac9248f3a4eeb3f417d1927
Author: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
Date:   Mon May 16 23:44:29 2011 +0200

    WaE (picky) - noeol

diff --git a/comphelper/inc/comphelper/documentconstants.hxx b/comphelper/inc/comphelper/documentconstants.hxx
index 01f7723..4482d4a 100644
--- a/comphelper/inc/comphelper/documentconstants.hxx
+++ b/comphelper/inc/comphelper/documentconstants.hxx
@@ -148,4 +148,4 @@
 #define SFX_FILTER_VERSION_NONE      0
 #define SFX_FILTER_NOTINSTALLED		 SFX_FILTER_MUSTINSTALL | SFX_FILTER_CONSULTSERVICE
 
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx
index 858ac1f..3957b67 100644
--- a/l10ntools/source/merge.cxx
+++ b/l10ntools/source/merge.cxx
@@ -386,4 +386,4 @@ ByteString MergeDataFile::CreateKey( const ByteString& rTYP , const ByteString&
     return sKey.toAsciiUpperCase();
 }
 
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sot/source/sdstor/stgio.cxx b/sot/source/sdstor/stgio.cxx
index 23cf39e..648b097 100644
--- a/sot/source/sdstor/stgio.cxx
+++ b/sot/source/sdstor/stgio.cxx
@@ -388,4 +388,4 @@ sal_uLong StgIo::ValidateFATs()
     return FAT_OK;
 }
 
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/source/misc/imap.cxx b/svtools/source/misc/imap.cxx
index e7e9c3e..e1b74ae 100644
--- a/svtools/source/misc/imap.cxx
+++ b/svtools/source/misc/imap.cxx
@@ -1222,4 +1222,4 @@ void ImageMap::Read( SvStream& rIStm, const String& rBaseURL )
 }
 
 
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/toolkit/source/awt/asynccallback.cxx b/toolkit/source/awt/asynccallback.cxx
index 07c5815..1896b1e 100644
--- a/toolkit/source/awt/asynccallback.cxx
+++ b/toolkit/source/awt/asynccallback.cxx
@@ -195,4 +195,4 @@ void * SAL_CALL comp_AsyncCallback_component_getFactory(
 }
 
 
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx
index 19ad99f..5a22a85 100644
--- a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx
+++ b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx
@@ -391,4 +391,4 @@ namespace toolkit
 {
     return ::com::sun::star::uno::Reference < ::com::sun::star::uno::XInterface >( ( ::cppu::OWeakObject* ) new ::toolkit::DefaultGridColumnModel( _rFactory ) );
 }
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/toolkit/source/controls/grid/initguard.hxx b/toolkit/source/controls/grid/initguard.hxx
index 138cdd8..33a8d58 100644
--- a/toolkit/source/controls/grid/initguard.hxx
+++ b/toolkit/source/controls/grid/initguard.hxx
@@ -64,4 +64,4 @@ namespace toolkit
 
 #endif // SVTOOLS_INITGUARD_HXX
 
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/toolkit/source/helper/listenermultiplexer.cxx b/toolkit/source/helper/listenermultiplexer.cxx
index b139681..4ca367b 100644
--- a/toolkit/source/helper/listenermultiplexer.cxx
+++ b/toolkit/source/helper/listenermultiplexer.cxx
@@ -232,4 +232,4 @@ IMPL_LISTENERMULTIPLEXER_LISTENERMETHOD( SelectionListenerMultiplexer, ::com::su
 //	----------------------------------------------------
 IMPL_LISTENERMULTIPLEXER_BASEMETHODS( TabPageListenerMultiplexer, ::com::sun::star::awt::tab::XTabPageContainerListener )
 IMPL_LISTENERMULTIPLEXER_LISTENERMETHOD( TabPageListenerMultiplexer, ::com::sun::star::awt::tab::XTabPageContainerListener, tabPageActivated, ::com::sun::star::awt::tab::TabPageActivatedEvent )
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/app/solarmutex.cxx b/vcl/source/app/solarmutex.cxx
index 6423a74..ab07911 100644
--- a/vcl/source/app/solarmutex.cxx
+++ b/vcl/source/app/solarmutex.cxx
@@ -54,4 +54,4 @@ void SolarMutexObject::release()
     osl_releaseMutex( m_solarMutex );
 }
 
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/gdi/pdfwriter.cxx b/vcl/source/gdi/pdfwriter.cxx
index acf1aa0..c3e2d31 100644
--- a/vcl/source/gdi/pdfwriter.cxx
+++ b/vcl/source/gdi/pdfwriter.cxx
@@ -574,4 +574,4 @@ void PDFWriter::PlayMetafile( const GDIMetaFile& i_rMTF, const vcl::PDFWriter::P
     ((PDFWriterImpl*)pImplementation)->playMetafile( i_rMTF, i_pData, i_rPlayContext, NULL);
 }
 
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/source/window/salobj.cxx b/vcl/unx/source/window/salobj.cxx
index 03dc1ff..e87b616 100644
--- a/vcl/unx/source/window/salobj.cxx
+++ b/vcl/unx/source/window/salobj.cxx
@@ -563,4 +563,4 @@ void X11SalObject::InterceptChildWindowKeyDown( sal_Bool /*bIntercept*/ )
 {
 }
 
-/* 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