[Libreoffice-commits] .: 2 commits - comphelper/inc comphelper/source toolkit/source unotools/inc unotools/source vcl/inc vcl/source vcl/unx xmloff/inc xmloff/source

Stephan Bergmann sbergmann at kemper.freedesktop.org
Mon Oct 24 04:23:38 PDT 2011


 comphelper/inc/comphelper/accessiblecontexthelper.hxx |    3 +
 comphelper/source/misc/accessiblecontexthelper.cxx    |    2 +
 toolkit/source/awt/forward.hxx                        |    6 +--
 unotools/inc/unotools/options.hxx                     |    2 +
 unotools/source/config/options.cxx                    |    2 +
 vcl/inc/fontcache.hxx                                 |    4 +-
 vcl/inc/printergfx.hxx                                |    4 +-
 vcl/inc/unx/salgdi.h                                  |   28 +++++++++---------
 vcl/source/app/settings.cxx                           |   18 ++---------
 vcl/source/gdi/pdfwriter_impl.cxx                     |    2 -
 vcl/source/window/splitwin.cxx                        |   12 -------
 vcl/source/window/toolbox.cxx                         |   19 ------------
 vcl/unx/generic/printer/ppdparser.cxx                 |    7 ----
 vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx              |    8 ++---
 xmloff/inc/xmloff/maptype.hxx                         |    2 -
 xmloff/source/transform/TransformerActionInit.hxx     |    2 -
 16 files changed, 40 insertions(+), 81 deletions(-)

New commits:
commit 81448039ea3f757fcdfc2212a02b0ecf56b7c821
Author: Kristian Rietveld <kris at lanedo.com>
Date:   Sat Oct 22 10:10:28 2011 +0200

    Also use .NET2003 build fix for Clang

diff --git a/toolkit/source/awt/forward.hxx b/toolkit/source/awt/forward.hxx
index ab39b40..efb22e7 100644
--- a/toolkit/source/awt/forward.hxx
+++ b/toolkit/source/awt/forward.hxx
@@ -64,12 +64,12 @@
         return aReturn; \
     }
 
-#if defined (_MSC_VER) && (_MSC_VER <= 1310)
+#if (defined (_MSC_VER) && (_MSC_VER <= 1310)) || defined (__clang__)
 // Windows .Net2003 build fix
 #define W3K_EXPLICIT_CAST(x) static_cast <XWindow2*> (&x)
-#else // !(defined (_MSC_VER) && (_MSC_VER <= 1310))
+#else // !((defined (_MSC_VER) && (_MSC_VER <= 1310)) || defined (__clang__))
 #define W3K_EXPLICIT_CAST(x) x
-#endif // !(defined (_MSC_VER) && (_MSC_VER <= 1310))
+#endif // !((defined (_MSC_VER) && (_MSC_VER <= 1310)) || defined (__clang__))
 
 #endif /* AWT_FORWARD_HXX */
 
commit c31d7b012f953f4a677fd5a576c0aa8379897879
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Oct 24 12:27:16 2011 +0200

    Some warning cleanup (found with trunk Clang).

diff --git a/comphelper/inc/comphelper/accessiblecontexthelper.hxx b/comphelper/inc/comphelper/accessiblecontexthelper.hxx
index b80805d..3f02666 100644
--- a/comphelper/inc/comphelper/accessiblecontexthelper.hxx
+++ b/comphelper/inc/comphelper/accessiblecontexthelper.hxx
@@ -52,9 +52,10 @@ namespace comphelper
 
     /** abstract interface for implementing a mutex
     */
-    class IMutex
+    class COMPHELPER_DLLPUBLIC IMutex
     {
     public:
+        virtual ~IMutex();
         virtual void acquire() = 0;
         virtual void release() = 0;
     };
diff --git a/comphelper/source/misc/accessiblecontexthelper.cxx b/comphelper/source/misc/accessiblecontexthelper.cxx
index 4d2a7d9..980fa36 100644
--- a/comphelper/source/misc/accessiblecontexthelper.cxx
+++ b/comphelper/source/misc/accessiblecontexthelper.cxx
@@ -44,6 +44,8 @@ namespace comphelper
     using namespace ::com::sun::star::lang;
     using namespace ::com::sun::star::accessibility;
 
+    IMutex::~IMutex() {}
+
     //=====================================================================
     //= OContextHelper_Impl
     //=====================================================================
diff --git a/unotools/inc/unotools/options.hxx b/unotools/inc/unotools/options.hxx
index d743e95..3c032c2 100644
--- a/unotools/inc/unotools/options.hxx
+++ b/unotools/inc/unotools/options.hxx
@@ -50,6 +50,8 @@ namespace utl {
     class UNOTOOLS_DLLPUBLIC ConfigurationListener
     {
     public:
+        virtual ~ConfigurationListener();
+
         virtual void ConfigurationChanged( ConfigurationBroadcaster* p, sal_uInt32 nHint=0 ) = 0;
     };
     typedef ::std::vector< ConfigurationListener* > IMPL_ConfigurationListenerList;
diff --git a/unotools/source/config/options.cxx b/unotools/source/config/options.cxx
index 5eee90d..6fc5d98 100644
--- a/unotools/source/config/options.cxx
+++ b/unotools/source/config/options.cxx
@@ -35,6 +35,8 @@
 using utl::detail::Options;
 using utl::ConfigurationBroadcaster;
 
+utl::ConfigurationListener::~ConfigurationListener() {}
+
 ConfigurationBroadcaster::ConfigurationBroadcaster()
 : mpList(0)
 , m_nBroadcastBlocked( 0 )
diff --git a/vcl/inc/fontcache.hxx b/vcl/inc/fontcache.hxx
index ad261e8..fd1b8cd 100644
--- a/vcl/inc/fontcache.hxx
+++ b/vcl/inc/fontcache.hxx
@@ -42,9 +42,9 @@ namespace psp
 class VCL_PLUGIN_PUBLIC FontCache
 {
     struct FontDir;
-    friend class FontDir;
+    friend struct FontDir;
     struct FontFile;
-    friend class FontFile;
+    friend struct FontFile;
 
     typedef std::list< PrintFontManager::PrintFont* > FontCacheEntry;
     struct FontFile
diff --git a/vcl/inc/printergfx.hxx b/vcl/inc/printergfx.hxx
index 7fea405..840054a 100644
--- a/vcl/inc/printergfx.hxx
+++ b/vcl/inc/printergfx.hxx
@@ -41,7 +41,7 @@
 namespace psp {
 
 // forwards
-class JobData;
+struct JobData;
 
 /*
  * lightweight container to handle RGB values
@@ -130,7 +130,7 @@ class Font3;
 class GlyphSet;
 class PrinterJob;
 class PrintFontManager;
-class KernPair;
+struct KernPair;
 struct CharacterMetric;
 
 /*
diff --git a/vcl/inc/unx/salgdi.h b/vcl/inc/unx/salgdi.h
index d606a36..fc055c0 100644
--- a/vcl/inc/unx/salgdi.h
+++ b/vcl/inc/unx/salgdi.h
@@ -43,20 +43,20 @@
 #include <deque>
 
 // -=-= forwards -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-struct  ImplFontMetricData;
-struct  ImplFontSelectData;
-class   SalBitmap;
-class   SalColormap;
-class   SalDisplay;
-class   SalFrame;
-class   X11SalVirtualDevice;
-class   SalPolyLine;
-class   PspSalPrinter;
-class   PspSalInfoPrinter;
-class   ServerFont;
-class   ImplLayoutArgs;
-class   X11FontLayout;
-class   ServerFontLayout;
+class ImplFontMetricData;
+class ImplFontSelectData;
+class SalBitmap;
+class SalColormap;
+class SalDisplay;
+class SalFrame;
+class X11SalVirtualDevice;
+class SalPolyLine;
+class PspSalPrinter;
+class PspSalInfoPrinter;
+class ServerFont;
+class ImplLayoutArgs;
+class X11FontLayout;
+class ServerFontLayout;
 
 namespace basegfx {
     class B2DTrapezoid;
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index eec8ba5..0b4f7a9 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -393,13 +393,8 @@ void KeyboardSettings::CopyData()
 
 sal_Bool KeyboardSettings::operator ==( const KeyboardSettings& rSet ) const
 {
-    if ( mpData == rSet.mpData )
-        return sal_True;
-
-    if ( (mpData->mnOptions             == rSet.mpData->mnOptions) )
-        return sal_True;
-    else
-        return sal_False;
+    return mpData == rSet.mpData
+        || mpData->mnOptions == rSet.mpData->mnOptions;
 }
 
 // =======================================================================
@@ -1404,13 +1399,8 @@ void NotificationSettings::CopyData()
 
 sal_Bool NotificationSettings::operator ==( const NotificationSettings& rSet ) const
 {
-    if ( mpData == rSet.mpData )
-        return sal_True;
-
-    if ( (mpData->mnOptions             == rSet.mpData->mnOptions) )
-        return sal_True;
-    else
-        return sal_False;
+    return mpData == rSet.mpData
+        || mpData->mnOptions == rSet.mpData->mnOptions;
 }
 
 // =======================================================================
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 3bdcbe1..7a607af 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -6515,7 +6515,7 @@ bool PDFWriterImpl::emitTrailer()
     aLine.append( "/Root " );
     aLine.append( m_nCatalogObject );
     aLine.append( " 0 R\n" );
-    if( nSecObject |= 0 )
+    if( nSecObject )
     {
         aLine.append( "/Encrypt ");
         aLine.append( nSecObject );
diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx
index 8ea0246..ed717f6 100644
--- a/vcl/source/window/splitwin.cxx
+++ b/vcl/source/window/splitwin.cxx
@@ -437,18 +437,6 @@ static void ImplDeleteSet( ImplSplitSet* pSet )
 
 // -----------------------------------------------------------------------
 
-static void ImplSetSplitSize( ImplSplitSet* pSet, long nNewSize )
-{
-    pSet->mnSplitSize = nNewSize;
-    for ( sal_uInt16 i = 0; i < pSet->mnItems; i++ )
-    {
-        if ( pSet->mpItems[i].mpSet )
-            ImplSetSplitSize( pSet->mpItems[i].mpSet, nNewSize );
-    }
-}
-
-// -----------------------------------------------------------------------
-
 static void ImplCalcSet( ImplSplitSet* pSet,
                          long nSetLeft, long nSetTop,
                          long nSetWidth, long nSetHeight,
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 7361f8a..669bc93 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -2278,25 +2278,6 @@ sal_uInt16 ToolBox::ImplCalcBreaks( long nWidth, long* pMaxLineWidth, sal_Bool b
 }
 
 // -----------------------------------------------------------------------
-namespace
-{
-    sal_Bool ImplFollowedByVisibleButton( std::vector< ImplToolItem >::iterator _aSeparator, std::vector< ImplToolItem >::iterator _aEnd )
-    {
-        std::vector< ImplToolItem >::iterator aLookup = _aSeparator;
-        while ( ++aLookup != _aEnd )
-        {
-            if ( aLookup->meType == TOOLBOXITEM_SEPARATOR )
-                return ImplFollowedByVisibleButton( aLookup, _aEnd );
-
-            if ( ( aLookup->meType == TOOLBOXITEM_BUTTON ) && aLookup->mbVisible )
-                return sal_True;
-        }
-        return sal_False;
-    }
-}
-
-
-// -----------------------------------------------------------------------
 
 Size ToolBox::ImplGetOptimalFloatingSize( FloatingSizeMode eMode )
 {
diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx
index f5c1836..208fc07 100644
--- a/vcl/unx/generic/printer/ppdparser.cxx
+++ b/vcl/unx/generic/printer/ppdparser.cxx
@@ -275,14 +275,7 @@ using ::rtl::OUString;
 using ::rtl::OStringBuffer;
 using ::rtl::OUStringHash;
 
-
-#undef DBG_ASSERT
-#if defined DBG_UTIL || (OSL_DEBUG_LEVEL > 1)
 #define BSTRING(x) ByteString( x, osl_getThreadTextEncoding() )
-#define DBG_ASSERT( x, y ) { if( ! (x) ) fprintf( stderr, (y) ); }
-#else
-#define DBG_ASSERT( x, y )
-#endif
 
 namespace
 {
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 5901f86..95e756b 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -838,11 +838,11 @@ sal_Bool GtkSalGraphics::drawNativeControl(    ControlType nType,
     {
         returnVal = NWPaintGTKListBox( gdkDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rCaption );
     }
-    else if ( (nType== CTRL_TOOLBAR) )
+    else if ( nType== CTRL_TOOLBAR )
     {
         returnVal = NWPaintGTKToolbar( gdkDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rCaption );
     }
-    else if ( (nType== CTRL_MENUBAR) )
+    else if ( nType== CTRL_MENUBAR )
     {
         returnVal = NWPaintGTKMenubar( gdkDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rCaption );
     }
@@ -875,7 +875,7 @@ sal_Bool GtkSalGraphics::drawNativeControl(    ControlType nType,
         // don't actually draw anything; gtk treeviews do not draw lines
         returnVal = TRUE;
     }
-    else if( (nType == CTRL_SLIDER) )
+    else if( nType == CTRL_SLIDER )
     {
         returnVal = NWPaintGTKSlider( gdkDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rCaption );
     }
@@ -1006,7 +1006,7 @@ sal_Bool GtkSalGraphics::getNativeControlRegion(  ControlType nType,
         rNativeContentRegion = rNativeBoundingRegion;
         returnVal = sal_True;
     }
-    if( (nType == CTRL_MENU_POPUP) )
+    if( nType == CTRL_MENU_POPUP )
     {
         if( (nPart == PART_MENU_ITEM_CHECK_MARK) ||
             (nPart == PART_MENU_ITEM_RADIO_MARK) )
diff --git a/xmloff/inc/xmloff/maptype.hxx b/xmloff/inc/xmloff/maptype.hxx
index a4afdd0..5139605 100644
--- a/xmloff/inc/xmloff/maptype.hxx
+++ b/xmloff/inc/xmloff/maptype.hxx
@@ -46,7 +46,7 @@ struct XMLPropertyMapEntry
     sal_uInt16      mnNameSpace;    /** declares the Namespace in wich this
                                         property exists */
     enum ::xmloff::token::XMLTokenEnum meXMLName;       /// XML-Name
-    sal_Int32       mnType;         /** Bit 0..23 : XML-Type of its value
+    sal_uInt32      mnType;         /** Bit 0..23 : XML-Type of its value
                                         Bit 24..31: The flags specifies
                                                     additional rules how
                                                     to im/export the porperty */
diff --git a/xmloff/source/transform/TransformerActionInit.hxx b/xmloff/source/transform/TransformerActionInit.hxx
index c4e10e7..0e1d209 100644
--- a/xmloff/source/transform/TransformerActionInit.hxx
+++ b/xmloff/source/transform/TransformerActionInit.hxx
@@ -41,7 +41,7 @@ struct XMLTransformerActionInit
     sal_uInt32 m_nParam2;
     sal_uInt32 m_nParam3;
 
-    static sal_Int32 QNameParam( sal_uInt16 nPrefix,
+    static sal_uInt32 QNameParam( sal_uInt16 nPrefix,
                                     ::xmloff::token::XMLTokenEnum eLocalName )
     {
         return (static_cast< sal_uInt32 >( nPrefix ) << 16) +


More information about the Libreoffice-commits mailing list