Changeset 21554 for trunk/src


Ignore:
Timestamp:
Jan 11, 2011, 11:47:27 PM (15 years ago)
Author:
dmik
Message:

Fixed broken indentation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/ole32/ole2.c

    r10432 r21554  
    562562
    563563  hwndTrackWindow = CreateWindowA(OLEDD_DRAGTRACKERCLASS,
    564                                     "TrackerWindow",
    565                                     WS_POPUP,
    566                                     CW_USEDEFAULT, CW_USEDEFAULT,
    567                                     CW_USEDEFAULT, CW_USEDEFAULT,
    568                                     0,
    569                                     0,
    570                                     0,
    571                                     (LPVOID)&trackerInfo);
     564                                  "TrackerWindow",
     565                                  WS_POPUP,
     566                                  CW_USEDEFAULT, CW_USEDEFAULT,
     567                                  CW_USEDEFAULT, CW_USEDEFAULT,
     568                                  0,
     569                                  0,
     570                                  0,
     571                                  (LPVOID)&trackerInfo);
    572572
    573573  if (hwndTrackWindow!=0)
     
    588588    {
    589589      if ( (msg.message >= WM_KEYFIRST) &&
    590            (msg.message <= WM_KEYLAST) )
     590           (msg.message <= WM_KEYLAST) )
    591591      {
    592592#ifdef __WIN32OS2__
    593593        dprintf(("dragloop: key msg %x\n", msg.message));
    594594#endif
    595         /*
    596         * When keyboard messages are sent to windows on this thread, we
    597         * want to ignore notify the drop source that the state changed.
    598         * in the case of the Escape key, we also notify the drop source
    599         * we give it a special meaning.
    600         */
    601         if ( (msg.message==WM_KEYDOWN) &&
    602              (msg.wParam==VK_ESCAPE) )
    603         {
    604           trackerInfo.escPressed = TRUE;
    605         }
    606 
    607         /*
    608         * Notify the drop source.
    609         */
    610         OLEDD_TrackStateChange(&trackerInfo,
    611                                msg.pt,
    612                                OLEDD_GetButtonState());
     595        /*
     596        * When keyboard messages are sent to windows on this thread, we
     597        * want to ignore notify the drop source that the state changed.
     598        * in the case of the Escape key, we also notify the drop source
     599        * we give it a special meaning.
     600        */
     601        if ( (msg.message==WM_KEYDOWN) &&
     602             (msg.wParam==VK_ESCAPE) )
     603        {
     604          trackerInfo.escPressed = TRUE;
     605        }
     606
     607        /*
     608        * Notify the drop source.
     609        */
     610        OLEDD_TrackStateChange(&trackerInfo,
     611                               msg.pt,
     612                               OLEDD_GetButtonState());
    613613      }
    614614      else
     
    617617        dprintf(("dragloop: dispmsg %x\n", msg.message));
    618618#endif
    619         /*
    620         * Dispatch the messages only when it's not a keyboard message.
    621         */
    622         DispatchMessageA(&msg);
     619        /*
     620        * Dispatch the messages only when it's not a keyboard message.
     621        */
     622        DispatchMessageA(&msg);
    623623      }
    624624    }
     
    15241524            }
    15251525        }
    1526     }   
     1526    }
    15271527
    15281528    WARN_(accel)("couldn't translate accelerator key\n");
     
    15591559          DeleteFileW(pmedium->u.lpszFileName);
    15601560        }
    1561        
     1561
    15621562        CoTaskMemFree(pmedium->u.lpszFileName);
    15631563      }
     
    18961896       * Track the movement of the mouse.
    18971897       */
    1898       #ifdef __WIN32OS2__
     1898#ifdef __WIN32OS2__
    18991899      wParam = OLEDD_GetButtonState();
    1900       #endif
     1900#endif
    19011901      OLEDD_TrackMouseMove(trackerInfo, mousePos, wParam);
    19021902
     
    20012001#endif
    20022002    IDropTarget_DragOver(trackerInfo->curDragTarget,
    2003                         keyState,
    2004                         mousePosParam,
    2005                         trackerInfo->pdwEffect);
     2003                        keyState,
     2004                        mousePosParam,
     2005                        trackerInfo->pdwEffect);
    20062006#ifdef __WIN32OS2__
    2007     TRACE("OLEDD_TrackMouseMove: IDropTarget_DragEnter -> %x, *pdwEffect=%x\n", hr, *trackerInfo->pdwEffect);
     2007      TRACE("OLEDD_TrackMouseMove: IDropTarget_DragOver -> %x, *pdwEffect=%x\n", hr, *trackerInfo->pdwEffect);
    20082008#endif
    20092009  }
     
    20392039
    20402040      do {
    2041         newDropTargetNode = OLEDD_FindDropTarget(nexttar);
    2042       } while (!newDropTargetNode && (nexttar = GetParent(nexttar)) != 0);
    2043       if(nexttar) hwndNewTarget = nexttar;
     2041        newDropTargetNode = OLEDD_FindDropTarget(nexttar);
     2042      }
     2043      while (!newDropTargetNode && (nexttar = GetParent(nexttar)) != 0);
     2044
     2045      if (nexttar)
     2046        hwndNewTarget = nexttar;
    20442047
    20452048      trackerInfo->curDragTargetHWND = hwndNewTarget;
     
    20512054      if (trackerInfo->curDragTarget!=0)
    20522055      {
    2053         POINTL  mousePosParam;
    2054        
    2055         /*
    2056          * The documentation tells me that the coordinate should be in the target
    2057          * window's coordinate space. However, the tests I made tell me the
    2058          * coordinates should be in screen coordinates.
    2059          */
    2060         mousePosParam.x = mousePos.x;
    2061         mousePosParam.y = mousePos.y;
    2062        
     2056        POINTL  mousePosParam;
     2057
     2058        /*
     2059         * The documentation tells me that the coordinate should be in the target
     2060         * window's coordinate space. However, the tests I made tell me the
     2061         * coordinates should be in screen coordinates.
     2062         */
     2063        mousePosParam.x = mousePos.x;
     2064        mousePosParam.y = mousePos.y;
     2065
    20632066#ifdef __WIN32OS2__
    20642067        hr =
    20652068#endif
    2066         IDropTarget_DragEnter(trackerInfo->curDragTarget,
    2067                               trackerInfo->dataObject,
    2068                               keyState,
    2069                               mousePosParam,
    2070                               trackerInfo->pdwEffect);
     2069        IDropTarget_DragEnter(trackerInfo->curDragTarget,
     2070                              trackerInfo->dataObject,
     2071                              keyState,
     2072                              mousePosParam,
     2073                              trackerInfo->pdwEffect);
    20712074#ifdef __WIN32OS2__
    20722075        TRACE("OLEDD_TrackMouseMove: IDropTarget_DragEnter -> %x, *pdwEffect=%x\n", hr, *trackerInfo->pdwEffect);
     
    21892192      switch (trackerInfo->returnValue)
    21902193      {
    2191         /*
    2192          * If the source wants us to complete the operation, we tell
    2193          * the drop target that we just dropped the object in it.
    2194          */
     2194        /*
     2195         * If the source wants us to complete the operation, we tell
     2196         * the drop target that we just dropped the object in it.
     2197         */
    21952198        case DRAGDROP_S_DROP:
    2196         {
    2197           POINTL  mousePosParam;
    2198        
    2199           /*
    2200            * The documentation tells me that the coordinate should be
    2201            * in the target window's coordinate space. However, the tests
    2202            * I made tell me the coordinates should be in screen coordinates.
    2203            */
    2204           mousePosParam.x = mousePos.x;
    2205           mousePosParam.y = mousePos.y;
    2206        
    2207           IDropTarget_Drop(trackerInfo->curDragTarget,
    2208                            trackerInfo->dataObject,
    2209                            keyState,
    2210                            mousePosParam,
    2211                            trackerInfo->pdwEffect);
    2212           break;
    2213         }
    2214         /*
    2215          * If the source told us that we should cancel, fool the drop
    2216          * target by telling it that the mouse left it's window.
    2217          * Also set the drop effect to "NONE" in case the application
    2218          * ignores the result of DoDragDrop.
    2219          */
     2199        {
     2200          POINTL  mousePosParam;
     2201
     2202          /*
     2203           * The documentation tells me that the coordinate should be
     2204           * in the target window's coordinate space. However, the tests
     2205           * I made tell me the coordinates should be in screen coordinates.
     2206           */
     2207          mousePosParam.x = mousePos.x;
     2208          mousePosParam.y = mousePos.y;
     2209
     2210          IDropTarget_Drop(trackerInfo->curDragTarget,
     2211                           trackerInfo->dataObject,
     2212                           keyState,
     2213                           mousePosParam,
     2214                           trackerInfo->pdwEffect);
     2215          break;
     2216        }
     2217        /*
     2218         * If the source told us that we should cancel, fool the drop
     2219         * target by telling it that the mouse left it's window.
     2220         * Also set the drop effect to "NONE" in case the application
     2221         * ignores the result of DoDragDrop.
     2222         */
    22202223        case DRAGDROP_S_CANCEL:
    2221           IDropTarget_DragLeave(trackerInfo->curDragTarget);
    2222           *trackerInfo->pdwEffect = DROPEFFECT_NONE;
    2223           break;
     2224          IDropTarget_DragLeave(trackerInfo->curDragTarget);
     2225          *trackerInfo->pdwEffect = DROPEFFECT_NONE;
     2226          break;
    22242227
    22252228#ifdef __WIN32OS2__
     
    26992702        IEnumFORMATETCImpl* ef;
    27002703        DWORD size=cfmt * sizeof(FORMATETC);
    2701        
     2704
    27022705        ef=(IEnumFORMATETCImpl*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IEnumFORMATETCImpl));
    27032706
     
    28552858          ICOM_VTBL(dto) = &dtovt;
    28562859        }
    2857        
     2860
    28582861        return (LPDATAOBJECT)dto;
    28592862}
     
    29592962{
    29602963        ICOM_THIS(IDataObjectImpl,iface);
    2961        
     2964
    29622965    dprintf(("IDataObject_fnGetDataHere %x %x STUB", pformatetc, pmedium));
    29632966        return E_NOTIMPL;
     
    29682971        ICOM_THIS(IDataObjectImpl,iface);
    29692972        UINT i;
    2970        
     2973
    29712974        dprintf(("IDataObject_fnQueryGetData (%p)->(fmt=0x%08x tym=0x%08lx)\n", This, pformatetc->cfFormat, pformatetc->tymed));
    2972        
     2975
    29732976        if(!(DVASPECT_CONTENT & pformatetc->dwAspect))
    29742977          return DV_E_DVASPECT;
     
    29932996{
    29942997        ICOM_THIS(IDataObjectImpl,iface);
    2995        
     2998
    29962999    dprintf(("IDataObject_fnGetCanonicalFormatEtc STUB"));
    29973000    return DATA_S_SAMEFORMATETC;
     
    30753078          return (*ppenumFormatEtc) ? S_OK : E_FAIL;
    30763079        }
    3077        
     3080
    30783081        return E_NOTIMPL;
    30793082}
     
    34333436      if(IDataObject_EnumFormatEtc(pDataObject, DATADIR_GET, &enumfmt) == S_OK) {
    34343437          for (;;) {
    3435        
     3438
    34363439             FORMATETC tmp;
    34373440             ULONG     actual = 1, res;
     
    36213624          ICOM_VTBL(dto) = &droptarget;
    36223625        }
    3623        
     3626
    36243627        return (IDropTarget *)dto;
    36253628}
Note: See TracChangeset for help on using the changeset viewer.