[Libreoffice-commits] .: vcl/unx

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sun Oct 21 03:32:05 PDT 2012


 vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit b339e4e2ba2b833903956cbcebf64a2a99dba176
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Sun Oct 21 12:29:58 2012 +0200

    Fix Variable 'eState' is reassigned a value before the old one has been used
    
    See http://nabble.documentfoundation.org/Cppcheck-report-in-vcl-unx-gtk-gdi-salnativewidgets-gtk-cxx-td4014513.html
    
    Change-Id: I9f59ed1fa0cd325d65f5574332b19625b27f8900

diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 5870070..56a9b0a 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -3448,7 +3448,6 @@ sal_Bool GtkSalGraphics::NWPaintGTKSlider(
                          : GTK_WIDGET(gWidgetData[m_nXScreen].gVScale);
     const gchar* pDetail = (nPart == PART_TRACK_HORZ_AREA) ? "hscale" : "vscale";
     GtkOrientation eOri = (nPart == PART_TRACK_HORZ_AREA) ? GTK_ORIENTATION_HORIZONTAL : GTK_ORIENTATION_VERTICAL;
-    GtkStateType eState = (nState & CTRL_STATE_ENABLED) ? GTK_STATE_ACTIVE : GTK_STATE_INSENSITIVE;
     gint slider_width = 10;
     gint slider_length = 10;
     gint trough_border = 0;
@@ -3458,7 +3457,7 @@ sal_Bool GtkSalGraphics::NWPaintGTKSlider(
                           "trough-border", &trough_border,
                           NULL);
 
-    eState = (nState & CTRL_STATE_ENABLED) ? GTK_STATE_NORMAL : GTK_STATE_INSENSITIVE;
+    GtkStateType eState = (nState & CTRL_STATE_ENABLED) ? GTK_STATE_NORMAL : GTK_STATE_INSENSITIVE;
     if( nPart == PART_TRACK_HORZ_AREA )
     {
         gtk_paint_box( pWidget->style,


More information about the Libreoffice-commits mailing list