comctl32: Indentation fixes

Andrew Talbot andrew.talbot at talbotville.com
Fri May 23 15:54:08 CDT 2008


Changelog:
    comctl32: Indentation fixes.

diff --git a/dlls/comctl32/commctrl.c b/dlls/comctl32/commctrl.c
index 4ff2075..7f36635 100644
--- a/dlls/comctl32/commctrl.c
+++ b/dlls/comctl32/commctrl.c
@@ -782,41 +782,40 @@ CreateToolbarEx (HWND hwnd, DWORD style, UINT wID, INT nBitmaps,
         CreateWindowExW(0, TOOLBARCLASSNAMEW, NULL, style|WS_CHILD, 0,0,100,30,
                         hwnd, (HMENU)(DWORD_PTR)wID, COMCTL32_hModule, NULL);
     if(hwndTB) {
-	TBADDBITMAP tbab;
+        TBADDBITMAP tbab;
 
         SendMessageW (hwndTB, TB_BUTTONSTRUCTSIZE, (WPARAM)uStructSize, 0);
 
-       /* set bitmap and button size */
-       /*If CreateToolbarEx receives 0, windows sets default values*/
-       if (dxBitmap < 0)
-           dxBitmap = 16;
-       if (dyBitmap < 0)
-           dyBitmap = 16;
-       if (dxBitmap == 0 || dyBitmap == 0)
-           dxBitmap = dyBitmap = 16;
-       SendMessageW(hwndTB, TB_SETBITMAPSIZE, 0, MAKELPARAM(dxBitmap, dyBitmap));
-
-       if (dxButton < 0)
-           dxButton = dxBitmap;
-       if (dyButton < 0)
-           dyButton = dyBitmap;
-       /* TB_SETBUTTONSIZE -> TB_SETBITMAPSIZE bug introduced for Windows compatibility */
-       if (dxButton != 0 && dyButton != 0)
-            SendMessageW(hwndTB, TB_SETBITMAPSIZE, 0, MAKELPARAM(dxButton, dyButton));
-
-
-	/* add bitmaps */
-	if (nBitmaps > 0 || hBMInst == HINST_COMMCTRL)
-	{
-	    tbab.hInst = hBMInst;
-	    tbab.nID   = wBMID;
-
-	    SendMessageW (hwndTB, TB_ADDBITMAP, (WPARAM)nBitmaps, (LPARAM)&tbab);
-	}
-	/* add buttons */
-	if(iNumButtons > 0)
-	SendMessageW (hwndTB, TB_ADDBUTTONSW,
-			(WPARAM)iNumButtons, (LPARAM)lpButtons);
+        /* set bitmap and button size */
+        /*If CreateToolbarEx receives 0, windows sets default values*/
+        if (dxBitmap < 0)
+            dxBitmap = 16;
+        if (dyBitmap < 0)
+            dyBitmap = 16;
+        if (dxBitmap == 0 || dyBitmap == 0)
+            dxBitmap = dyBitmap = 16;
+        SendMessageW(hwndTB, TB_SETBITMAPSIZE, 0, MAKELPARAM(dxBitmap, dyBitmap));
+
+        if (dxButton < 0)
+            dxButton = dxBitmap;
+        if (dyButton < 0)
+            dyButton = dyBitmap;
+        /* TB_SETBUTTONSIZE -> TB_SETBITMAPSIZE bug introduced for Windows compatibility */
+        if (dxButton != 0 && dyButton != 0)
+                SendMessageW(hwndTB, TB_SETBITMAPSIZE, 0, MAKELPARAM(dxButton, dyButton));
+
+        /* add bitmaps */
+        if (nBitmaps > 0 || hBMInst == HINST_COMMCTRL)
+        {
+            tbab.hInst = hBMInst;
+            tbab.nID   = wBMID;
+
+            SendMessageW (hwndTB, TB_ADDBITMAP, (WPARAM)nBitmaps, (LPARAM)&tbab);
+        }
+
+        /* add buttons */
+        if(iNumButtons > 0)
+            SendMessageW (hwndTB, TB_ADDBUTTONSW, (WPARAM)iNumButtons, (LPARAM)lpButtons);
     }
 
     return hwndTB;
diff --git a/dlls/comctl32/datetime.c b/dlls/comctl32/datetime.c
index b46c495..b88e50c 100644
--- a/dlls/comctl32/datetime.c
+++ b/dlls/comctl32/datetime.c
@@ -162,16 +162,16 @@ DATETIME_SetSystemTime (DATETIME_INFO *infoPtr, DWORD flag, const SYSTEMTIME *lp
           lprgSysTimeArray->wHour, lprgSysTimeArray->wMinute, lprgSysTimeArray->wSecond);
 
     if (flag == GDT_VALID) {
-      if (lprgSysTimeArray->wYear < 1601 || lprgSysTimeArray->wYear > 30827 ||
-          lprgSysTimeArray->wMonth < 1 || lprgSysTimeArray->wMonth > 12 ||
-          lprgSysTimeArray->wDayOfWeek > 6 ||
-          lprgSysTimeArray->wDay < 1 || lprgSysTimeArray->wDay > 31 ||
-          lprgSysTimeArray->wHour > 23 ||
-          lprgSysTimeArray->wMinute > 59 ||
-          lprgSysTimeArray->wSecond > 59 ||
-          lprgSysTimeArray->wMilliseconds > 999
-          )
-        return 0;
+        if (lprgSysTimeArray->wYear < 1601 || lprgSysTimeArray->wYear > 30827 ||
+            lprgSysTimeArray->wMonth < 1 || lprgSysTimeArray->wMonth > 12 ||
+            lprgSysTimeArray->wDayOfWeek > 6 ||
+            lprgSysTimeArray->wDay < 1 || lprgSysTimeArray->wDay > 31 ||
+            lprgSysTimeArray->wHour > 23 ||
+            lprgSysTimeArray->wMinute > 59 ||
+            lprgSysTimeArray->wSecond > 59 ||
+            lprgSysTimeArray->wMilliseconds > 999
+            )
+            return 0;
 
         infoPtr->dateValid = TRUE;
         MONTHCAL_CopyTime (lprgSysTimeArray, &infoPtr->date);
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index ab9cefe..eab5233 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -2081,8 +2081,8 @@ calc_label:
 		labelSize.cy /= infoPtr->ntmHeight;
 		labelSize.cy = max(labelSize.cy, 1);
 		labelSize.cy *= infoPtr->ntmHeight;
-	     }
-	     Label.bottom = Label.top + labelSize.cy + HEIGHT_PADDING;
+	    }
+	    Label.bottom = Label.top + labelSize.cy + HEIGHT_PADDING;
 	}
 	else if (uView == LVS_REPORT)
 	{
@@ -9963,37 +9963,37 @@ LISTVIEW_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
     return LISTVIEW_VScroll(infoPtr, (INT)LOWORD(wParam), 0, (HWND)lParam);
 
   case WM_MOUSEWHEEL:
-      if (wParam & (MK_SHIFT | MK_CONTROL))
-          return DefWindowProcW(hwnd, uMsg, wParam, lParam);
-      return LISTVIEW_MouseWheel(infoPtr, (short int)HIWORD(wParam));
+    if (wParam & (MK_SHIFT | MK_CONTROL))
+        return DefWindowProcW(hwnd, uMsg, wParam, lParam);
+    return LISTVIEW_MouseWheel(infoPtr, (short int)HIWORD(wParam));
 
   case WM_WINDOWPOSCHANGED:
-      if (!(((WINDOWPOS *)lParam)->flags & SWP_NOSIZE)) 
-      {
-      UINT uView = infoPtr->dwStyle & LVS_TYPEMASK;
-	  SetWindowPos(infoPtr->hwndSelf, 0, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOACTIVATE |
-		       SWP_NOZORDER | SWP_NOMOVE | SWP_NOSIZE);
+    if (!(((WINDOWPOS *)lParam)->flags & SWP_NOSIZE))
+    {
+        UINT uView = infoPtr->dwStyle & LVS_TYPEMASK;
+        SetWindowPos(infoPtr->hwndSelf, 0, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOACTIVATE |
+                     SWP_NOZORDER | SWP_NOMOVE | SWP_NOSIZE);
 
-      if ((infoPtr->dwStyle & LVS_OWNERDRAWFIXED) && (uView == LVS_REPORT))
-      {
-          MEASUREITEMSTRUCT mis;
-          mis.CtlType = ODT_LISTVIEW;
-          mis.CtlID = GetWindowLongPtrW(infoPtr->hwndSelf, GWLP_ID);
-          mis.itemID = -1;
-          mis.itemWidth = 0;
-          mis.itemData = 0;
-          mis.itemHeight= infoPtr->nItemHeight;
-          SendMessageW(infoPtr->hwndNotify, WM_MEASUREITEM, mis.CtlID, (LPARAM)&mis);
-          if (infoPtr->nItemHeight != max(mis.itemHeight, 1))
-              infoPtr->nMeasureItemHeight = infoPtr->nItemHeight = max(mis.itemHeight, 1);
-      }
+        if ((infoPtr->dwStyle & LVS_OWNERDRAWFIXED) && (uView == LVS_REPORT))
+        {
+            MEASUREITEMSTRUCT mis;
+            mis.CtlType = ODT_LISTVIEW;
+            mis.CtlID = GetWindowLongPtrW(infoPtr->hwndSelf, GWLP_ID);
+            mis.itemID = -1;
+            mis.itemWidth = 0;
+            mis.itemData = 0;
+            mis.itemHeight= infoPtr->nItemHeight;
+            SendMessageW(infoPtr->hwndNotify, WM_MEASUREITEM, mis.CtlID, (LPARAM)&mis);
+            if (infoPtr->nItemHeight != max(mis.itemHeight, 1))
+                infoPtr->nMeasureItemHeight = infoPtr->nItemHeight = max(mis.itemHeight, 1);
+        }
 
-	  LISTVIEW_UpdateSize(infoPtr);
-	  LISTVIEW_UpdateScroll(infoPtr);
-      }
-      return DefWindowProcW(hwnd, uMsg, wParam, lParam);
+        LISTVIEW_UpdateSize(infoPtr);
+        LISTVIEW_UpdateScroll(infoPtr);
+    }
+    return DefWindowProcW(hwnd, uMsg, wParam, lParam);
 
-/*	case WM_WININICHANGE: */
+/*      case WM_WININICHANGE: */
 
   default:
     if ((uMsg >= WM_USER) && (uMsg < WM_APP))
diff --git a/dlls/comctl32/pager.c b/dlls/comctl32/pager.c
index 11a78a9..bfbb3cd 100644
--- a/dlls/comctl32/pager.c
+++ b/dlls/comctl32/pager.c
@@ -1069,11 +1069,11 @@ PAGER_MouseMove (PAGER_INFO* infoPtr, INT keys, INT x, INT y)
             }
 
             /* Notify parent of released mouse capture */
-        	memset(&nmhdr, 0, sizeof(NMHDR));
-        	nmhdr.hwndFrom = infoPtr->hwndSelf;
-        	nmhdr.idFrom   = GetWindowLongPtrW(infoPtr->hwndSelf, GWLP_ID);
-        	nmhdr.code = NM_RELEASEDCAPTURE;
-		SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, nmhdr.idFrom, (LPARAM)&nmhdr);
+            memset(&nmhdr, 0, sizeof(NMHDR));
+            nmhdr.hwndFrom = infoPtr->hwndSelf;
+            nmhdr.idFrom   = GetWindowLongPtrW(infoPtr->hwndSelf, GWLP_ID);
+            nmhdr.code = NM_RELEASEDCAPTURE;
+            SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, nmhdr.idFrom, (LPARAM)&nmhdr);
         }
         if (IsWindow(infoPtr->hwndSelf))
             KillTimer(infoPtr->hwndSelf, TIMERID1);
diff --git a/dlls/comctl32/tooltips.c b/dlls/comctl32/tooltips.c
index 48d7757..5310bcf 100644
--- a/dlls/comctl32/tooltips.c
+++ b/dlls/comctl32/tooltips.c
@@ -2384,24 +2384,23 @@ TOOLTIPS_Destroy (HWND hwnd, WPARAM wParam, LPARAM lParam)
 	    toolPtr = &infoPtr->tools[i];
 	    if (toolPtr->lpszText) {
 		if ( (toolPtr->lpszText != LPSTR_TEXTCALLBACKW) &&
-		     !IS_INTRESOURCE(toolPtr->lpszText) )
-		{
-		    Free (toolPtr->lpszText);
-		    toolPtr->lpszText = NULL;
+		     !IS_INTRESOURCE(toolPtr->lpszText) ) {
+		     Free(toolPtr->lpszText);
+		     toolPtr->lpszText = NULL;
 		}
 	    }
 
 	    /* remove subclassing */
-        if (toolPtr->uFlags & TTF_SUBCLASS) {
-            if (toolPtr->uFlags & TTF_IDISHWND) {
-                RemoveWindowSubclass((HWND)toolPtr->uId, TOOLTIPS_SubclassProc, 1);
-            }
-            else {
-                RemoveWindowSubclass(toolPtr->hwnd, TOOLTIPS_SubclassProc, 1);
-            }
-        }
-    }
-	Free (infoPtr->tools);
+	    if (toolPtr->uFlags & TTF_SUBCLASS) {
+		if (toolPtr->uFlags & TTF_IDISHWND) {
+		    RemoveWindowSubclass((HWND) toolPtr->uId, TOOLTIPS_SubclassProc, 1);
+		}
+		else {
+		    RemoveWindowSubclass(toolPtr->hwnd, TOOLTIPS_SubclassProc, 1);
+		}
+	    }
+	}
+	Free(infoPtr->tools);
     }
 
     /* free title string */
diff --git a/dlls/comctl32/updown.c b/dlls/comctl32/updown.c
index a62e221..941fc3b 100644
--- a/dlls/comctl32/updown.c
+++ b/dlls/comctl32/updown.c
@@ -894,15 +894,15 @@ static LRESULT WINAPI UpDownWindowProc(HWND hwnd, UINT message, WPARAM wParam, L
             break;
 
 	case WM_TIMER:
-	   /* is this the auto-press timer? */
-	   if(wParam == TIMER_AUTOPRESS) {
+	    /* is this the auto-press timer? */
+	    if (wParam == TIMER_AUTOPRESS) {
 		KillTimer(hwnd, TIMER_AUTOPRESS);
 		infoPtr->Flags &= ~(FLAG_PRESSED | FLAG_ARROW);
 		InvalidateRect(infoPtr->Self, NULL, FALSE);
-	   }
+	    }
 
-	   /* if initial timer, kill it and start the repeat timer */
-  	   if(wParam == TIMER_AUTOREPEAT) {
+	    /* if initial timer, kill it and start the repeat timer */
+	    if (wParam == TIMER_AUTOREPEAT) {
 		KillTimer(hwnd, TIMER_AUTOREPEAT);
 		/* if no accel info given, used default timer */
 		if(infoPtr->AccelCount==0 || infoPtr->AccelVect==0) {
@@ -913,7 +913,7 @@ static LRESULT WINAPI UpDownWindowProc(HWND hwnd, UINT message, WPARAM wParam, L
 		    temp = infoPtr->AccelVect[infoPtr->AccelIndex].nSec * 1000 + 1;
 		}
 		SetTimer(hwnd, TIMER_ACCEL, temp, 0);
-      	    }
+	    }
 
 	    /* now, if the mouse is above us, do the thing...*/
 	    if(infoPtr->Flags & FLAG_MOUSEIN) {



More information about the wine-patches mailing list