Ignore:
Timestamp:
Sep 15, 2001, 11:32:00 AM (24 years ago)
Author:
sandervl
Message:

restored old version + wine update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/oleaut32/olepicture.c

    r6689 r6711  
    5050#ifdef HAVE_LIBJPEG
    5151/* This is a hack, so jpeglib.h does not redefine INT32 and the like*/
    52 #define XMD_H
     52#define XMD_H 
    5353#ifdef HAVE_JPEGLIB_H
    5454# include <jpeglib.h>
     
    9090  /* We own the object and must destroy it ourselves */
    9191    BOOL fOwn;
    92 
     92 
    9393  /* Picture description */
    9494    PICTDESC desc;
     
    105105
    106106    BOOL keepOrigFormat;
    107     HDC hDCCur;
     107    HDC hDCCur;
    108108} OLEPictureImpl;
    109109
     
    174174  if (newObject==0)
    175175    return newObject;
    176 
     176 
    177177  /*
    178178   * Initialize the virtual function table.
     
    186186
    187187  /*
    188    * Start with one reference count. The caller of this function
     188   * Start with one reference count. The caller of this function 
    189189   * must release the interface pointer when it is done.
    190190   */
    191   newObject->ref    = 1;
    192   newObject->hDCCur = 0;
    193 
    194   newObject->fOwn   = fOwn;
     191  newObject->ref        = 1;
     192  newObject->hDCCur     = 0;
     193
     194  newObject->fOwn       = fOwn;
    195195
    196196  /* dunno about original value */
     
    199199  if (pictDesc) {
    200200      if(pictDesc->cbSizeofstruct != sizeof(PICTDESC)) {
    201       FIXME("struct size = %d\n", pictDesc->cbSizeofstruct);
     201          FIXME("struct size = %d\n", pictDesc->cbSizeofstruct);
    202202      }
    203203      memcpy(&newObject->desc, pictDesc, sizeof(PICTDESC));
     
    206206      switch(pictDesc->picType) {
    207207      case PICTYPE_BITMAP:
    208     OLEPictureImpl_SetBitmap(newObject);
    209     break;
     208        OLEPictureImpl_SetBitmap(newObject);
     209        break;
    210210
    211211      case PICTYPE_METAFILE:
    212     TRACE("metafile handle %08x\n", pictDesc->u.wmf.hmeta);
    213     newObject->himetricWidth = pictDesc->u.wmf.xExt;
    214     newObject->himetricHeight = pictDesc->u.wmf.yExt;
    215     break;
     212        TRACE("metafile handle %08x\n", pictDesc->u.wmf.hmeta);
     213        newObject->himetricWidth = pictDesc->u.wmf.xExt;
     214        newObject->himetricHeight = pictDesc->u.wmf.yExt;
     215        break;
    216216
    217217      case PICTYPE_ICON:
    218218      case PICTYPE_ENHMETAFILE:
    219219      default:
    220     FIXME("Unsupported type %d\n", pictDesc->picType);
    221     newObject->himetricWidth = newObject->himetricHeight = 0;
    222     break;
     220        FIXME("Unsupported type %d\n", pictDesc->picType);
     221        newObject->himetricWidth = newObject->himetricHeight = 0;
     222        break;
    223223      }
    224224  } else {
    225225      newObject->desc.picType = PICTYPE_UNINITIALIZED;
    226226  }
    227 
     227   
    228228  TRACE("returning %p\n", newObject);
    229229  return newObject;
     
    237237 * this object.  */
    238238static void OLEPictureImpl_Destroy(OLEPictureImpl* Obj)
    239 {
     239{ 
    240240  TRACE("(%p)\n", Obj);
    241241
     
    282282  if ( (This==0) || (ppvObject==0) )
    283283    return E_INVALIDARG;
    284 
     284 
    285285  /*
    286286   * Initialize the return parameter.
    287287   */
    288288  *ppvObject = 0;
    289 
     289 
    290290  /*
    291291   * Compare the riid with the interface IDs implemented by this object.
    292292   */
    293   if (memcmp(&IID_IUnknown, riid, sizeof(IID_IUnknown)) == 0)
     293  if (memcmp(&IID_IUnknown, riid, sizeof(IID_IUnknown)) == 0) 
    294294  {
    295295    *ppvObject = (IPicture*)This;
    296296  }
    297   else if (memcmp(&IID_IPicture, riid, sizeof(IID_IPicture)) == 0)
     297  else if (memcmp(&IID_IPicture, riid, sizeof(IID_IPicture)) == 0) 
    298298  {
    299299    *ppvObject = (IPicture*)This;
    300300  }
    301   else if (memcmp(&IID_IDispatch, riid, sizeof(IID_IDispatch)) == 0)
     301  else if (memcmp(&IID_IDispatch, riid, sizeof(IID_IDispatch)) == 0) 
    302302  {
    303303    *ppvObject = (IDispatch*)&(This->lpvtbl2);
    304304  }
    305   else if (memcmp(&IID_IPictureDisp, riid, sizeof(IID_IPictureDisp)) == 0)
     305  else if (memcmp(&IID_IPictureDisp, riid, sizeof(IID_IPictureDisp)) == 0) 
    306306  {
    307307    *ppvObject = (IDispatch*)&(This->lpvtbl2);
    308308  }
    309   else if (memcmp(&IID_IPersistStream, riid, sizeof(IID_IPersistStream)) == 0)
     309  else if (memcmp(&IID_IPersistStream, riid, sizeof(IID_IPersistStream)) == 0) 
    310310  {
    311311  *ppvObject = (IPersistStream*)&(This->lpvtbl3);
    312312  }
    313   else if (memcmp(&IID_IConnectionPointContainer, riid, sizeof(IID_IConnectionPointContainer)) == 0)
     313  else if (memcmp(&IID_IConnectionPointContainer, riid, sizeof(IID_IConnectionPointContainer)) == 0) 
    314314  {
    315315  *ppvObject = (IConnectionPointContainer*)&(This->lpvtbl4);
     
    323323    return E_NOINTERFACE;
    324324  }
    325 
     325 
    326326  /*
    327327   * Query Interface always increases the reference count by one when it is
     
    362362 * See Windows documentation for more details on IUnknown methods.
    363363 */
    364 static ULONG WINAPI OLEPictureImpl_AddRef(
     364static ULONG WINAPI OLEPictureImpl_AddRef( 
    365365  IPicture* iface)
    366366{
     
    371371  return This->ref;
    372372}
    373 
     373       
    374374/************************************************************************
    375375 * OLEPictureImpl_Release (IUnknown)
     
    377377 * See Windows documentation for more details on IUnknown methods.
    378378 */
    379 static ULONG WINAPI OLEPictureImpl_Release(
     379static ULONG WINAPI OLEPictureImpl_Release( 
    380380      IPicture* iface)
    381381{
     
    397397    return 0;
    398398  }
    399 
     399 
    400400  return This->ref;
    401401}
     
    404404/************************************************************************
    405405 * OLEPictureImpl_get_Handle
    406  */
     406 */ 
    407407static HRESULT WINAPI OLEPictureImpl_get_Handle(IPicture *iface,
    408                         OLE_HANDLE *phandle)
     408                                                OLE_HANDLE *phandle)
    409409{
    410410  ICOM_THIS(OLEPictureImpl, iface);
     
    433433/************************************************************************
    434434 * OLEPictureImpl_get_hPal
    435  */
     435 */ 
    436436static HRESULT WINAPI OLEPictureImpl_get_hPal(IPicture *iface,
    437                           OLE_HANDLE *phandle)
     437                                              OLE_HANDLE *phandle)
    438438{
    439439  ICOM_THIS(OLEPictureImpl, iface);
     
    444444/************************************************************************
    445445 * OLEPictureImpl_get_Type
    446  */
     446 */ 
    447447static HRESULT WINAPI OLEPictureImpl_get_Type(IPicture *iface,
    448                           short *ptype)
     448                                              short *ptype)
    449449{
    450450  ICOM_THIS(OLEPictureImpl, iface);
     
    456456/************************************************************************
    457457 * OLEPictureImpl_get_Width
    458  */
     458 */ 
    459459static HRESULT WINAPI OLEPictureImpl_get_Width(IPicture *iface,
    460                            OLE_XSIZE_HIMETRIC *pwidth)
     460                                               OLE_XSIZE_HIMETRIC *pwidth)
    461461{
    462462  ICOM_THIS(OLEPictureImpl, iface);
     
    468468/************************************************************************
    469469 * OLEPictureImpl_get_Height
    470  */
     470 */ 
    471471static HRESULT WINAPI OLEPictureImpl_get_Height(IPicture *iface,
    472                         OLE_YSIZE_HIMETRIC *pheight)
     472                                                OLE_YSIZE_HIMETRIC *pheight)
    473473{
    474474  ICOM_THIS(OLEPictureImpl, iface);
     
    480480/************************************************************************
    481481 * OLEPictureImpl_Render
    482  */
     482 */ 
    483483static HRESULT WINAPI OLEPictureImpl_Render(IPicture *iface, HDC hdc,
    484                         long x, long y, long cx, long cy,
    485                         OLE_XPOS_HIMETRIC xSrc,
    486                         OLE_YPOS_HIMETRIC ySrc,
    487                         OLE_XSIZE_HIMETRIC cxSrc,
    488                         OLE_YSIZE_HIMETRIC cySrc,
    489                         LPCRECT prcWBounds)
     484                                            long x, long y, long cx, long cy,
     485                                            OLE_XPOS_HIMETRIC xSrc,
     486                                            OLE_YPOS_HIMETRIC ySrc,
     487                                            OLE_XSIZE_HIMETRIC cxSrc,
     488                                            OLE_YSIZE_HIMETRIC cySrc,
     489                                            LPCRECT prcWBounds)
    490490{
    491491  ICOM_THIS(OLEPictureImpl, iface);
    492492  TRACE("(%p)->(%08x, (%ld,%ld), (%ld,%ld) <- (%ld,%ld), (%ld,%ld), %p)\n",
    493     This, hdc, x, y, cx, cy, xSrc, ySrc, cxSrc, cySrc, prcWBounds);
     493        This, hdc, x, y, cx, cy, xSrc, ySrc, cxSrc, cySrc, prcWBounds);
    494494  if(prcWBounds)
    495495    TRACE("prcWBounds (%d,%d) - (%d,%d)\n", prcWBounds->left, prcWBounds->top,
    496       prcWBounds->right, prcWBounds->bottom);
     496          prcWBounds->right, prcWBounds->bottom);
    497497
    498498  /*
     
    542542/************************************************************************
    543543 * OLEPictureImpl_set_hPal
    544  */
     544 */ 
    545545static HRESULT WINAPI OLEPictureImpl_set_hPal(IPicture *iface,
    546                           OLE_HANDLE hpal)
     546                                              OLE_HANDLE hpal)
    547547{
    548548  ICOM_THIS(OLEPictureImpl, iface);
     
    554554/************************************************************************
    555555 * OLEPictureImpl_get_CurDC
    556  */
     556 */ 
    557557static HRESULT WINAPI OLEPictureImpl_get_CurDC(IPicture *iface,
    558                            HDC *phdc)
     558                                               HDC *phdc)
    559559{
    560560  ICOM_THIS(OLEPictureImpl, iface);
     
    566566/************************************************************************
    567567 * OLEPictureImpl_SelectPicture
    568  */
     568 */ 
    569569static HRESULT WINAPI OLEPictureImpl_SelectPicture(IPicture *iface,
    570                            HDC hdcIn,
    571                            HDC *phdcOut,
    572                            OLE_HANDLE *phbmpOut)
     570                                                   HDC hdcIn,
     571                                                   HDC *phdcOut,
     572                                                   OLE_HANDLE *phbmpOut)
    573573{
    574574  ICOM_THIS(OLEPictureImpl, iface);
     
    578578
    579579      if (phdcOut)
    580       *phdcOut = This->hDCCur;
     580          *phdcOut = This->hDCCur;
    581581      This->hDCCur = hdcIn;
    582582      if (phbmpOut)
    583       *phbmpOut = This->desc.u.bmp.hbitmap;
     583          *phbmpOut = This->desc.u.bmp.hbitmap;
    584584      return S_OK;
    585585  } else {
     
    591591/************************************************************************
    592592 * OLEPictureImpl_get_KeepOriginalFormat
    593  */
     593 */ 
    594594static HRESULT WINAPI OLEPictureImpl_get_KeepOriginalFormat(IPicture *iface,
    595                                 BOOL *pfKeep)
     595                                                            BOOL *pfKeep)
    596596{
    597597  ICOM_THIS(OLEPictureImpl, iface);
     
    605605/************************************************************************
    606606 * OLEPictureImpl_put_KeepOriginalFormat
    607  */
     607 */ 
    608608static HRESULT WINAPI OLEPictureImpl_put_KeepOriginalFormat(IPicture *iface,
    609                                 BOOL keep)
     609                                                            BOOL keep)
    610610{
    611611  ICOM_THIS(OLEPictureImpl, iface);
     
    618618/************************************************************************
    619619 * OLEPictureImpl_PictureChanged
    620  */
     620 */ 
    621621static HRESULT WINAPI OLEPictureImpl_PictureChanged(IPicture *iface)
    622622{
     
    629629/************************************************************************
    630630 * OLEPictureImpl_SaveAsFile
    631  */
     631 */ 
    632632static HRESULT WINAPI OLEPictureImpl_SaveAsFile(IPicture *iface,
    633                         IStream *pstream,
    634                         BOOL SaveMemCopy,
    635                         LONG *pcbSize)
     633                                                IStream *pstream,
     634                                                BOOL SaveMemCopy,
     635                                                LONG *pcbSize)
    636636{
    637637  ICOM_THIS(OLEPictureImpl, iface);
     
    642642/************************************************************************
    643643 * OLEPictureImpl_get_Attributes
    644  */
     644 */ 
    645645static HRESULT WINAPI OLEPictureImpl_get_Attributes(IPicture *iface,
    646                             DWORD *pdwAttr)
     646                                                    DWORD *pdwAttr)
    647647{
    648648  ICOM_THIS(OLEPictureImpl, iface);
     
    650650  *pdwAttr = 0;
    651651  switch (This->desc.picType) {
    652   case PICTYPE_BITMAP:  break;  /* not 'truely' scalable, see MSDN. */
     652  case PICTYPE_BITMAP:  break;  /* not 'truely' scalable, see MSDN. */
    653653  case PICTYPE_ICON: *pdwAttr     = PICTURE_TRANSPARENT;break;
    654654  case PICTYPE_METAFILE: *pdwAttr = PICTURE_TRANSPARENT|PICTURE_SCALABLE;break;
     
    706706  ICOM_THIS_From_IConnectionPointContainer(OLEPictureImpl, iface);
    707707  TRACE("(%p,%s,%p)\n",This,debugstr_guid(riid),ppCP);
    708   if (!ppCP)
     708  if (!ppCP) 
    709709      return E_POINTER;
    710710  *ppCP = NULL;
     
    805805 * Loads the binary data from the IStream. Starts at current position.
    806806 * There appears to be an 2 DWORD header:
    807  *  DWORD magic;
    808  *  DWORD len;
     807 *      DWORD magic;
     808 *      DWORD len;
    809809 *
    810810 * Currently implemented: BITMAP, ICON, JPEG.
    811811 */
    812812static HRESULT WINAPI OLEPictureImpl_Load(IPersistStream* iface,IStream*pStm) {
    813   HRESULT   hr = E_FAIL;
    814   ULONG     xread;
    815   BYTE      *xbuf;
    816   DWORD     header[2];
    817   WORD      magic;
     813  HRESULT       hr = E_FAIL;
     814  ULONG         xread;
     815  BYTE          *xbuf;
     816  DWORD         header[2];
     817  WORD          magic;
    818818  ICOM_THIS_From_IPersistStream(OLEPictureImpl, iface);
    819819
     
    828828  xbuf = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,header[1]);
    829829  while (xread < header[1]) {
    830     ULONG nread;
     830    ULONG nread; 
    831831    hr = IStream_Read(pStm,xbuf+xread,header[1]-xread,&nread);
    832832    xread+=nread;
     
    841841  case 0xd8ff: { /* JPEG */
    842842#ifdef HAVE_LIBJPEG
    843     struct jpeg_decompress_struct   jd;
    844     struct jpeg_error_mgr       jerr;
    845     int                 ret;
    846     JDIMENSION              x;
    847     JSAMPROW                samprow;
    848     BITMAPINFOHEADER            bmi;
    849     LPBYTE              bits;
    850     HDC                 hdcref;
    851     struct jpeg_source_mgr      xjsm;
     843    struct jpeg_decompress_struct       jd;
     844    struct jpeg_error_mgr               jerr;
     845    int                                 ret;
     846    JDIMENSION                          x;
     847    JSAMPROW                            samprow;
     848    BITMAPINFOHEADER                    bmi;
     849    LPBYTE                              bits;
     850    HDC                                 hdcref;
     851    struct jpeg_source_mgr              xjsm;
    852852
    853853    /* This is basically so we can use in-memory data for jpeg decompression.
    854854     * We need to have all the functions.
    855855     */
    856     xjsm.next_input_byte    = xbuf;
    857     xjsm.bytes_in_buffer    = xread;
    858     xjsm.init_source        = _jpeg_init_source;
    859     xjsm.fill_input_buffer  = _jpeg_fill_input_buffer;
    860     xjsm.skip_input_data    = _jpeg_skip_input_data;
    861     xjsm.resync_to_restart  = _jpeg_resync_to_restart;
    862     xjsm.term_source        = _jpeg_term_source;
     856    xjsm.next_input_byte        = xbuf;
     857    xjsm.bytes_in_buffer        = xread;
     858    xjsm.init_source            = _jpeg_init_source;
     859    xjsm.fill_input_buffer      = _jpeg_fill_input_buffer;
     860    xjsm.skip_input_data        = _jpeg_skip_input_data;
     861    xjsm.resync_to_restart      = _jpeg_resync_to_restart;
     862    xjsm.term_source            = _jpeg_term_source;
    863863
    864864    jd.err = jpeg_std_error(&jerr);
     
    868868    jpeg_start_decompress(&jd);
    869869    if (ret != JPEG_HEADER_OK) {
    870     ERR("Jpeg image in stream has bad format, read header returned %d.\n",ret);
    871     HeapFree(GetProcessHeap(),0,xbuf);
    872     return E_FAIL;
     870        ERR("Jpeg image in stream has bad format, read header returned %d.\n",ret);
     871        HeapFree(GetProcessHeap(),0,xbuf);
     872        return E_FAIL;
    873873    }
    874874    bits = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,(jd.output_height+1)*jd.output_width*jd.output_components);
     
    877877      x = jpeg_read_scanlines(&jd,&samprow,1);
    878878      if (x != 1) {
    879     FIXME("failed to read current scanline?\n");
    880     break;
     879        FIXME("failed to read current scanline?\n");
     880        break;
    881881      }
    882882      memcpy( bits+jd.output_scanline*jd.output_width*jd.output_components,
    883           samprow,
    884               jd.output_width*jd.output_components
     883              samprow,
     884              jd.output_width*jd.output_components
    885885      );
    886886    }
    887     bmi.biSize      = sizeof(bmi);
    888     bmi.biWidth     =  jd.output_width;
    889     bmi.biHeight    = -jd.output_height;
    890     bmi.biPlanes    = 1;
    891     bmi.biBitCount  = jd.output_components<<3;
    892     bmi.biCompression   = BI_RGB;
    893     bmi.biSizeImage = jd.output_height*jd.output_width*jd.output_components;
    894     bmi.biXPelsPerMeter = 0;
    895     bmi.biYPelsPerMeter = 0;
    896     bmi.biClrUsed   = 0;
    897     bmi.biClrImportant  = 0;
     887    bmi.biSize          = sizeof(bmi);
     888    bmi.biWidth         =  jd.output_width;
     889    bmi.biHeight        = -jd.output_height;
     890    bmi.biPlanes        = 1;
     891    bmi.biBitCount      = jd.output_components<<3;
     892    bmi.biCompression   = BI_RGB;
     893    bmi.biSizeImage     = jd.output_height*jd.output_width*jd.output_components;
     894    bmi.biXPelsPerMeter = 0;
     895    bmi.biYPelsPerMeter = 0;
     896    bmi.biClrUsed       = 0;
     897    bmi.biClrImportant  = 0;
    898898
    899899    HeapFree(GetProcessHeap(),0,samprow);
     
    902902    hdcref = GetDC(0);
    903903    This->desc.u.bmp.hbitmap=CreateDIBitmap(
    904         hdcref,
    905         &bmi,
    906         CBM_INIT,
    907         bits,
    908         (BITMAPINFO*)&bmi,
    909         DIB_RGB_COLORS
     904            hdcref,
     905            &bmi,
     906            CBM_INIT,
     907            bits,
     908            (BITMAPINFO*)&bmi,
     909            DIB_RGB_COLORS
    910910    );
    911911    DeleteDC(hdcref);
     
    921921  }
    922922  case 0x4d42: { /* Bitmap */
    923     BITMAPFILEHEADER    *bfh = (BITMAPFILEHEADER*)xbuf;
    924     BITMAPINFO      *bi = (BITMAPINFO*)(bfh+1);
    925     HDC         hdcref;
     923    BITMAPFILEHEADER    *bfh = (BITMAPFILEHEADER*)xbuf;
     924    BITMAPINFO          *bi = (BITMAPINFO*)(bfh+1);
     925    HDC                 hdcref;
    926926
    927927    /* Does not matter whether this is a coreheader or not, we only use
     
    930930    hdcref = GetDC(0);
    931931    This->desc.u.bmp.hbitmap = CreateDIBitmap(
    932     hdcref,
    933     &(bi->bmiHeader),
    934     CBM_INIT,
    935     xbuf+bfh->bfOffBits,
    936     bi,
    937     (bi->bmiHeader.biBitCount<=8)?DIB_PAL_COLORS:DIB_RGB_COLORS
     932        hdcref,
     933        &(bi->bmiHeader),
     934        CBM_INIT,
     935        xbuf+bfh->bfOffBits,
     936        bi,
     937        (bi->bmiHeader.biBitCount<=8)?DIB_PAL_COLORS:DIB_RGB_COLORS
    938938    );
    939939    DeleteDC(hdcref);
     
    945945  case 0x0000: { /* ICON , first word is dwReserved */
    946946    HICON hicon;
    947     CURSORICONFILEDIR   *cifd = (CURSORICONFILEDIR*)xbuf;
    948     int i;
     947    CURSORICONFILEDIR   *cifd = (CURSORICONFILEDIR*)xbuf;
     948    int i;
    949949
    950950    /*
     
    954954
    955955    for (i=0;i<cifd->idCount;i++) {
    956     FIXME("[%d] width %d\n",i,cifd->idEntries[i].bWidth);
    957     FIXME("[%d] height %d\n",i,cifd->idEntries[i].bHeight);
    958     FIXME("[%d] bColorCount %d\n",i,cifd->idEntries[i].bColorCount);
    959     FIXME("[%d] bReserved %d\n",i,cifd->idEntries[i].bReserved);
    960     FIXME("[%d] xHotspot %d\n",i,cifd->idEntries[i].xHotspot);
    961     FIXME("[%d] yHotspot %d\n",i,cifd->idEntries[i].yHotspot);
    962     FIXME("[%d] dwDIBSize %d\n",i,cifd->idEntries[i].dwDIBSize);
    963     FIXME("[%d] dwDIBOffset %d\n",i,cifd->idEntries[i].dwDIBOffset);
     956        FIXME("[%d] width %d\n",i,cifd->idEntries[i].bWidth);
     957        FIXME("[%d] height %d\n",i,cifd->idEntries[i].bHeight);
     958        FIXME("[%d] bColorCount %d\n",i,cifd->idEntries[i].bColorCount);
     959        FIXME("[%d] bReserved %d\n",i,cifd->idEntries[i].bReserved);
     960        FIXME("[%d] xHotspot %d\n",i,cifd->idEntries[i].xHotspot);
     961        FIXME("[%d] yHotspot %d\n",i,cifd->idEntries[i].yHotspot);
     962        FIXME("[%d] dwDIBSize %d\n",i,cifd->idEntries[i].dwDIBSize);
     963        FIXME("[%d] dwDIBOffset %d\n",i,cifd->idEntries[i].dwDIBOffset);
    964964    }
    965965    */
     
    969969     */
    970970    if (cifd->idCount!=1) {
    971     for (i=0;i<cifd->idCount;i++) {
    972         if (cifd->idEntries[i].bWidth == 32)
    973         break;
     971        for (i=0;i<cifd->idCount;i++) {
     972            if (cifd->idEntries[i].bWidth == 32)
     973                break;
     974        }
     975        if (i==cifd->idCount) i=0;
    974976    }
    975     if (i==cifd->idCount) i=0;
    976     }
    977977
    978978    hicon = CreateIconFromResourceEx(
    979         xbuf+cifd->idEntries[i].dwDIBOffset,
    980         cifd->idEntries[i].dwDIBSize,
    981         TRUE, /* is icon */
    982         0x00030000,
    983         cifd->idEntries[i].bWidth,
    984         cifd->idEntries[i].bHeight,
    985         0
     979                xbuf+cifd->idEntries[i].dwDIBOffset,
     980                cifd->idEntries[i].dwDIBSize,
     981                TRUE, /* is icon */
     982                0x00030000,
     983                cifd->idEntries[i].bWidth,
     984                cifd->idEntries[i].bHeight,
     985                0
    986986    );
    987987    if (!hicon) {
    988     FIXME("CreateIcon failed.\n");
    989     hr = E_FAIL;
     988        FIXME("CreateIcon failed.\n");
     989        hr = E_FAIL;
    990990    } else {
    991     This->desc.picType = PICTYPE_ICON;
    992     This->desc.u.icon.hicon = hicon;
    993     hr = S_OK;
     991        This->desc.picType = PICTYPE_ICON;
     992        This->desc.u.icon.hicon = hicon;
     993        hr = S_OK;
    994994    }
    995995    break;
     
    10741074 */
    10751075static HRESULT WINAPI OLEPictureImpl_GetTypeInfoCount(
    1076   IDispatch*    iface,
     1076  IDispatch*    iface, 
    10771077  unsigned int* pctinfo)
    10781078{
     
    10881088 */
    10891089static HRESULT WINAPI OLEPictureImpl_GetTypeInfo(
    1090   IDispatch*  iface,
     1090  IDispatch*  iface, 
    10911091  UINT      iTInfo,
    1092   LCID        lcid,
     1092  LCID        lcid, 
    10931093  ITypeInfo** ppTInfo)
    10941094{
     
    11051105static HRESULT WINAPI OLEPictureImpl_GetIDsOfNames(
    11061106  IDispatch*  iface,
    1107   REFIID      riid,
    1108   LPOLESTR* rgszNames,
    1109   UINT      cNames,
     1107  REFIID      riid, 
     1108  LPOLESTR* rgszNames, 
     1109  UINT      cNames, 
    11101110  LCID        lcid,
    11111111  DISPID*     rgDispId)
     
    11231123static HRESULT WINAPI OLEPictureImpl_Invoke(
    11241124  IDispatch*  iface,
    1125   DISPID      dispIdMember,
    1126   REFIID      riid,
    1127   LCID        lcid,
     1125  DISPID      dispIdMember, 
     1126  REFIID      riid, 
     1127  LCID        lcid, 
    11281128  WORD        wFlags,
    11291129  DISPPARAMS* pDispParams,
    1130   VARIANT*    pVarResult,
     1130  VARIANT*    pVarResult, 
    11311131  EXCEPINFO*  pExepInfo,
    11321132  UINT*     puArgErr)
     
    12021202 */
    12031203HRESULT WINAPI OleCreatePictureIndirect(LPPICTDESC lpPictDesc, REFIID riid,
    1204                     BOOL fOwn, LPVOID *ppvObj )
     1204                            BOOL fOwn, LPVOID *ppvObj )
    12051205{
    12061206  OLEPictureImpl* newPict = NULL;
     
    12441244 */
    12451245HRESULT WINAPI OleLoadPicture( LPSTREAM lpstream, LONG lSize, BOOL fRunmode,
    1246                     REFIID riid, LPVOID *ppvObj )
     1246                            REFIID riid, LPVOID *ppvObj )
    12471247{
    12481248  LPPERSISTSTREAM ps;
    1249   IPicture  *newpic;
     1249  IPicture      *newpic;
    12501250  HRESULT hr;
    12511251
    12521252  TRACE("(%p,%ld,%d,%s,%p), partially implemented.\n",
    1253     lpstream, lSize, fRunmode, debugstr_guid(riid), ppvObj);
     1253        lpstream, lSize, fRunmode, debugstr_guid(riid), ppvObj);
    12541254
    12551255  hr = OleCreatePictureIndirect(NULL,riid,!fRunmode,(LPVOID*)&newpic);
     
    12761276 */
    12771277HRESULT WINAPI OleLoadPictureEx( LPSTREAM lpstream, LONG lSize, BOOL fRunmode,
    1278                     REFIID reed, DWORD xsiz, DWORD ysiz, DWORD flags, LPVOID *ppvObj )
     1278                            REFIID reed, DWORD xsiz, DWORD ysiz, DWORD flags, LPVOID *ppvObj )
    12791279{
    12801280  FIXME("(%p,%ld,%d,%p,%lx,%lx,%lx,%p), not implemented\n",
    1281     lpstream, lSize, fRunmode, reed, xsiz, ysiz, flags, ppvObj);
     1281        lpstream, lSize, fRunmode, reed, xsiz, ysiz, flags, ppvObj);
    12821282  return S_OK;
    12831283}
    1284 
     1284 
    12851285#ifdef __WIN32OS2__
    12861286
     
    13081308// ----------------------------------------------------------------------
    13091309HRESULT WIN32API OleLoadPicturePath
    1310    (LPOLESTR        szURLorPath,
    1311     LPUNKNOWN       punkCaller,
    1312     DWORD           dwReserved,
    1313     OLE_COLOR       clrReserved,
    1314     REFIID          riid,
    1315     LPVOID *        ppvRet )
     1310   (LPOLESTR            szURLorPath,
     1311    LPUNKNOWN           punkCaller,
     1312    DWORD               dwReserved,
     1313    OLE_COLOR           clrReserved,
     1314    REFIID              riid,
     1315    LPVOID *            ppvRet )
    13161316{
    13171317    dprintf(("OLEAUT32: OleLoadPicturePath - stub"));
Note: See TracChangeset for help on using the changeset viewer.