Ignore:
Timestamp:
Jun 9, 2002, 6:37:22 PM (23 years ago)
Author:
sandervl
Message:

Resync with latest Wine

File:
1 edited

Legend:

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

    r8441 r8620  
    3131 *  -  This implementation of the datacache will let your application
    3232 *     load documents that have embedded OLE objects in them and it will
    33  *     also retrieve the metafile representation of those objects. 
     33 *     also retrieve the metafile representation of those objects.
    3434 *  -  This implementation of the datacache will also allow your
    3535 *     application to save new documents with OLE objects in them.
    36  *  -  The main thing that it doesn't do is allow you to activate 
     36 *  -  The main thing that it doesn't do is allow you to activate
    3737 *     or modify the OLE objects in any way.
    3838 *  -  I haven't found any good documentation on the real usage of
     
    4141 *     "\002OlePresXXX". It appears to just be a counter.
    4242 *  -  Also, I don't know the real content of the presentation stream
    43  *     header. I was able to figure-out where the extent of the object 
     43 *     header. I was able to figure-out where the extent of the object
    4444 *     was stored and the aspect, but that's about it.
    4545 */
     
    9595   * List all interface VTables here
    9696   */
    97   ICOM_VTABLE(IDataObject)*      lpvtbl1; 
     97  ICOM_VTABLE(IDataObject)*      lpvtbl1;
    9898  ICOM_VTABLE(IUnknown)*         lpvtbl2;
    9999  ICOM_VTABLE(IPersistStorage)*  lpvtbl3;
    100   ICOM_VTABLE(IViewObject2)*     lpvtbl4; 
     100  ICOM_VTABLE(IViewObject2)*     lpvtbl4;
    101101  ICOM_VTABLE(IOleCache2)*       lpvtbl5;
    102102  ICOM_VTABLE(IOleCacheControl)* lpvtbl6;
     
    133133
    134134/*
    135  * Here, I define utility macros to help with the casting of the 
     135 * Here, I define utility macros to help with the casting of the
    136136 * "this" parameter.
    137137 * There is a version to accomodate all of the VTables implemented
     
    139139 */
    140140#define _ICOM_THIS_From_IDataObject(class,name)       class* this = (class*)name;
    141 #define _ICOM_THIS_From_NDIUnknown(class, name)       class* this = (class*)(((char*)name)-sizeof(void*)); 
    142 #define _ICOM_THIS_From_IPersistStorage(class, name)  class* this = (class*)(((char*)name)-2*sizeof(void*)); 
    143 #define _ICOM_THIS_From_IViewObject2(class, name)     class* this = (class*)(((char*)name)-3*sizeof(void*)); 
    144 #define _ICOM_THIS_From_IOleCache2(class, name)       class* this = (class*)(((char*)name)-4*sizeof(void*)); 
    145 #define _ICOM_THIS_From_IOleCacheControl(class, name) class* this = (class*)(((char*)name)-5*sizeof(void*)); 
     141#define _ICOM_THIS_From_NDIUnknown(class, name)       class* this = (class*)(((char*)name)-sizeof(void*));
     142#define _ICOM_THIS_From_IPersistStorage(class, name)  class* this = (class*)(((char*)name)-2*sizeof(void*));
     143#define _ICOM_THIS_From_IViewObject2(class, name)     class* this = (class*)(((char*)name)-3*sizeof(void*));
     144#define _ICOM_THIS_From_IOleCache2(class, name)       class* this = (class*)(((char*)name)-4*sizeof(void*));
     145#define _ICOM_THIS_From_IOleCacheControl(class, name) class* this = (class*)(((char*)name)-5*sizeof(void*));
    146146
    147147/*
     
    171171            REFIID         riid,
    172172            void**         ppvObject);
    173 static ULONG WINAPI DataCache_NDIUnknown_AddRef( 
     173static ULONG WINAPI DataCache_NDIUnknown_AddRef(
    174174            IUnknown*      iface);
    175 static ULONG WINAPI DataCache_NDIUnknown_Release( 
     175static ULONG WINAPI DataCache_NDIUnknown_Release(
    176176            IUnknown*      iface);
    177177
     
    184184            REFIID           riid,
    185185            void**           ppvObject);
    186 static ULONG WINAPI DataCache_IDataObject_AddRef( 
     186static ULONG WINAPI DataCache_IDataObject_AddRef(
    187187            IDataObject*     iface);
    188 static ULONG WINAPI DataCache_IDataObject_Release( 
     188static ULONG WINAPI DataCache_IDataObject_Release(
    189189            IDataObject*     iface);
    190190static HRESULT WINAPI DataCache_GetData(
    191191            IDataObject*     iface,
    192             LPFORMATETC      pformatetcIn, 
     192            LPFORMATETC      pformatetcIn,
    193193            STGMEDIUM*       pmedium);
    194194static HRESULT WINAPI DataCache_GetDataHere(
    195             IDataObject*     iface, 
     195            IDataObject*     iface,
    196196            LPFORMATETC      pformatetc,
    197197            STGMEDIUM*       pmedium);
     
    200200            LPFORMATETC      pformatetc);
    201201static HRESULT WINAPI DataCache_GetCanonicalFormatEtc(
    202             IDataObject*     iface, 
    203             LPFORMATETC      pformatectIn, 
     202            IDataObject*     iface,
     203            LPFORMATETC      pformatectIn,
    204204            LPFORMATETC      pformatetcOut);
    205205static HRESULT WINAPI DataCache_IDataObject_SetData(
    206206            IDataObject*     iface,
    207             LPFORMATETC      pformatetc, 
    208             STGMEDIUM*       pmedium, 
     207            LPFORMATETC      pformatetc,
     208            STGMEDIUM*       pmedium,
    209209            BOOL             fRelease);
    210210static HRESULT WINAPI DataCache_EnumFormatEtc(
    211             IDataObject*     iface,       
     211            IDataObject*     iface,
    212212            DWORD            dwDirection,
    213213            IEnumFORMATETC** ppenumFormatEtc);
    214214static HRESULT WINAPI DataCache_DAdvise(
    215             IDataObject*     iface, 
    216             FORMATETC*       pformatetc, 
    217             DWORD            advf, 
    218             IAdviseSink*     pAdvSink, 
     215            IDataObject*     iface,
     216            FORMATETC*       pformatetc,
     217            DWORD            advf,
     218            IAdviseSink*     pAdvSink,
    219219            DWORD*           pdwConnection);
    220220static HRESULT WINAPI DataCache_DUnadvise(
     
    233233            REFIID           riid,
    234234            void**           ppvObject);
    235 static ULONG WINAPI DataCache_IPersistStorage_AddRef( 
     235static ULONG WINAPI DataCache_IPersistStorage_AddRef(
    236236            IPersistStorage* iface);
    237 static ULONG WINAPI DataCache_IPersistStorage_Release( 
     237static ULONG WINAPI DataCache_IPersistStorage_Release(
    238238            IPersistStorage* iface);
    239 static HRESULT WINAPI DataCache_GetClassID( 
     239static HRESULT WINAPI DataCache_GetClassID(
    240240            IPersistStorage* iface,
    241241            CLSID*           pClassID);
    242 static HRESULT WINAPI DataCache_IsDirty( 
     242static HRESULT WINAPI DataCache_IsDirty(
    243243            IPersistStorage* iface);
    244 static HRESULT WINAPI DataCache_InitNew(
    245             IPersistStorage* iface,
    246             IStorage*        pStg);
    247 static HRESULT WINAPI DataCache_Load(
     244static HRESULT WINAPI DataCache_InitNew(
    248245            IPersistStorage* iface,
    249246            IStorage*        pStg);
    250 static HRESULT WINAPI DataCache_Save(
     247static HRESULT WINAPI DataCache_Load(
    251248            IPersistStorage* iface,
    252             IStorage*        pStg,
     249            IStorage*        pStg);
     250static HRESULT WINAPI DataCache_Save(
     251            IPersistStorage* iface,
     252            IStorage*        pStg,
    253253            BOOL             fSameAsLoad);
    254 static HRESULT WINAPI DataCache_SaveCompleted( 
    255             IPersistStorage* iface, 
     254static HRESULT WINAPI DataCache_SaveCompleted(
     255            IPersistStorage* iface,
    256256            IStorage*        pStgNew);
    257257static HRESULT WINAPI DataCache_HandsOffStorage(
     
    266266            REFIID           riid,
    267267            void**           ppvObject);
    268 static ULONG WINAPI DataCache_IViewObject2_AddRef( 
     268static ULONG WINAPI DataCache_IViewObject2_AddRef(
    269269            IViewObject2* iface);
    270 static ULONG WINAPI DataCache_IViewObject2_Release( 
     270static ULONG WINAPI DataCache_IViewObject2_Release(
    271271            IViewObject2* iface);
    272272static HRESULT WINAPI DataCache_Draw(
     
    275275            LONG             lindex,
    276276            void*            pvAspect,
    277             DVTARGETDEVICE*  ptd, 
    278             HDC              hdcTargetDev, 
     277            DVTARGETDEVICE*  ptd,
     278            HDC              hdcTargetDev,
    279279            HDC              hdcDraw,
    280280            LPCRECTL         lprcBounds,
     
    283283            DWORD            dwContinue);
    284284static HRESULT WINAPI DataCache_GetColorSet(
    285             IViewObject2*   iface, 
    286             DWORD           dwDrawAspect, 
    287             LONG            lindex, 
    288             void*           pvAspect, 
    289             DVTARGETDEVICE* ptd, 
    290             HDC             hicTargetDevice, 
     285            IViewObject2*   iface,
     286            DWORD           dwDrawAspect,
     287            LONG            lindex,
     288            void*           pvAspect,
     289            DVTARGETDEVICE* ptd,
     290            HDC             hicTargetDevice,
    291291            LOGPALETTE**    ppColorSet);
    292292static HRESULT WINAPI DataCache_Freeze(
     
    294294            DWORD           dwDrawAspect,
    295295            LONG            lindex,
    296             void*           pvAspect, 
     296            void*           pvAspect,
    297297            DWORD*          pdwFreeze);
    298298static HRESULT WINAPI DataCache_Unfreeze(
     
    301301static HRESULT WINAPI DataCache_SetAdvise(
    302302            IViewObject2*   iface,
    303             DWORD           aspects, 
    304             DWORD           advf, 
     303            DWORD           aspects,
     304            DWORD           advf,
    305305            IAdviseSink*    pAdvSink);
    306306static HRESULT WINAPI DataCache_GetAdvise(
    307             IViewObject2*   iface, 
    308             DWORD*          pAspects, 
    309             DWORD*          pAdvf, 
     307            IViewObject2*   iface,
     308            DWORD*          pAspects,
     309            DWORD*          pAdvf,
    310310            IAdviseSink**   ppAdvSink);
    311311static HRESULT WINAPI DataCache_GetExtent(
    312             IViewObject2*   iface, 
    313             DWORD           dwDrawAspect, 
    314             LONG            lindex, 
    315             DVTARGETDEVICE* ptd, 
     312            IViewObject2*   iface,
     313            DWORD           dwDrawAspect,
     314            LONG            lindex,
     315            DVTARGETDEVICE* ptd,
    316316            LPSIZEL         lpsizel);
    317317
     
    324324            REFIID          riid,
    325325            void**          ppvObject);
    326 static ULONG WINAPI DataCache_IOleCache2_AddRef( 
     326static ULONG WINAPI DataCache_IOleCache2_AddRef(
    327327            IOleCache2*     iface);
    328 static ULONG WINAPI DataCache_IOleCache2_Release( 
     328static ULONG WINAPI DataCache_IOleCache2_Release(
    329329            IOleCache2*     iface);
    330330static HRESULT WINAPI DataCache_Cache(
     
    349349static HRESULT WINAPI DataCache_UpdateCache(
    350350            IOleCache2*     iface,
    351             LPDATAOBJECT    pDataObject, 
     351            LPDATAOBJECT    pDataObject,
    352352            DWORD           grfUpdf,
    353353            LPVOID          pReserved);
     
    364364            REFIID            riid,
    365365            void**            ppvObject);
    366 static ULONG WINAPI DataCache_IOleCacheControl_AddRef( 
     366static ULONG WINAPI DataCache_IOleCacheControl_AddRef(
    367367            IOleCacheControl* iface);
    368 static ULONG WINAPI DataCache_IOleCacheControl_Release( 
     368static ULONG WINAPI DataCache_IOleCacheControl_Release(
    369369            IOleCacheControl* iface);
    370370static HRESULT WINAPI DataCache_OnRun(
     
    461461 */
    462462HRESULT WINAPI CreateDataCache(
    463   LPUNKNOWN pUnkOuter, 
    464   REFCLSID  rclsid, 
    465   REFIID    riid, 
     463  LPUNKNOWN pUnkOuter,
     464  REFCLSID  rclsid,
     465  REFIID    riid,
    466466  LPVOID*   ppvObj)
    467467{
     
    485485   * IUnknown pointer can be returned to the outside.
    486486   */
    487   if ( (pUnkOuter!=NULL) && 
     487  if ( (pUnkOuter!=NULL) &&
    488488       (memcmp(&IID_IUnknown, riid, sizeof(IID_IUnknown)) != 0) )
    489489    return CLASS_E_NOAGGREGATION;
     
    492492   * Try to construct a new instance of the class.
    493493   */
    494   newCache = DataCache_Construct(rclsid, 
     494  newCache = DataCache_Construct(rclsid,
    495495                                 pUnkOuter);
    496496
     
    528528  if (newObject==0)
    529529    return newObject;
    530  
     530
    531531  /*
    532532   * Initialize the virtual function table.
     
    538538  newObject->lpvtbl5 = &DataCache_IOleCache2_VTable;
    539539  newObject->lpvtbl6 = &DataCache_IOleCacheControl_VTable;
    540  
    541   /*
    542    * Start with one reference count. The caller of this function 
     540
     541  /*
     542   * Start with one reference count. The caller of this function
    543543   * must release the interface pointer when it is done.
    544544   */
     
    547547  /*
    548548   * Initialize the outer unknown
    549    * We don't keep a reference on the outer unknown since, the way 
     549   * We don't keep a reference on the outer unknown since, the way
    550550   * aggregation works, our lifetime is at least as large as it's
    551551   * lifetime.
     
    593593 * DataCache_ReadPresentationData
    594594 *
    595  * This method will read information for the requested presentation 
     595 * This method will read information for the requested presentation
    596596 * into the given structure.
    597597 *
     
    796796 * DataCache_ReadPresentationData
    797797 *
    798  * This method will read information for the requested presentation 
     798 * This method will read information for the requested presentation
    799799 * into the given structure.
    800800 *
     
    822822   */
    823823  hres = DataCache_OpenPresStream(
    824            this, 
     824           this,
    825825           drawAspect,
    826826           &presStream);
     
    853853   * Allocate a buffer for the metafile bits.
    854854   */
    855   metafileBits = HeapAlloc(GetProcessHeap(), 
    856                            0, 
     855  metafileBits = HeapAlloc(GetProcessHeap(),
     856                           0,
    857857                           streamInfo.cbSize.s.LowPart);
    858858
     
    911911  if ( (this==0) || (ppvObject==0) )
    912912    return E_INVALIDARG;
    913  
     913
    914914  /*
    915915   * Initialize the return parameter.
     
    920920   * Compare the riid with the interface IDs implemented by this object.
    921921   */
    922   if (memcmp(&IID_IUnknown, riid, sizeof(IID_IUnknown)) == 0) 
     922  if (memcmp(&IID_IUnknown, riid, sizeof(IID_IUnknown)) == 0)
    923923  {
    924924    *ppvObject = iface;
    925925  }
    926   else if (memcmp(&IID_IDataObject, riid, sizeof(IID_IDataObject)) == 0) 
     926  else if (memcmp(&IID_IDataObject, riid, sizeof(IID_IDataObject)) == 0)
    927927  {
    928928    *ppvObject = (IDataObject*)&(this->lpvtbl1);
     
    943943    *ppvObject = (IOleCache2*)&(this->lpvtbl5);
    944944  }
    945   else if (memcmp(&IID_IOleCacheControl, riid, sizeof(IID_IOleCacheControl)) == 0) 
     945  else if (memcmp(&IID_IOleCacheControl, riid, sizeof(IID_IOleCacheControl)) == 0)
    946946  {
    947947    *ppvObject = (IOleCacheControl*)&(this->lpvtbl6);
     
    956956    return E_NOINTERFACE;
    957957  }
    958  
     958
    959959  /*
    960960   * Query Interface always increases the reference count by one when it is
    961    * successful. 
     961   * successful.
    962962   */
    963963  IUnknown_AddRef((IUnknown*)*ppvObject);
    964964
    965   return S_OK;
     965  return S_OK;
    966966}
    967967
     
    974974 * to the outer unknown.
    975975 */
    976 static ULONG WINAPI DataCache_NDIUnknown_AddRef( 
     976static ULONG WINAPI DataCache_NDIUnknown_AddRef(
    977977            IUnknown*      iface)
    978978{
     
    992992 * to the outer unknown.
    993993 */
    994 static ULONG WINAPI DataCache_NDIUnknown_Release( 
     994static ULONG WINAPI DataCache_NDIUnknown_Release(
    995995            IUnknown*      iface)
    996996{
     
    10111011    return 0;
    10121012  }
    1013  
     1013
    10141014  return this->ref;
    10151015}
     
    10321032  _ICOM_THIS_From_IDataObject(DataCache, iface);
    10331033
    1034   return IUnknown_QueryInterface(this->outerUnknown, riid, ppvObject); 
     1034  return IUnknown_QueryInterface(this->outerUnknown, riid, ppvObject);
    10351035}
    10361036
     
    10401040 * See Windows documentation for more details on IUnknown methods.
    10411041 */
    1042 static ULONG WINAPI DataCache_IDataObject_AddRef( 
     1042static ULONG WINAPI DataCache_IDataObject_AddRef(
    10431043            IDataObject*     iface)
    10441044{
    10451045  _ICOM_THIS_From_IDataObject(DataCache, iface);
    10461046
    1047   return IUnknown_AddRef(this->outerUnknown); 
     1047  return IUnknown_AddRef(this->outerUnknown);
    10481048}
    10491049
     
    10531053 * See Windows documentation for more details on IUnknown methods.
    10541054 */
    1055 static ULONG WINAPI DataCache_IDataObject_Release( 
     1055static ULONG WINAPI DataCache_IDataObject_Release(
    10561056            IDataObject*     iface)
    10571057{
    10581058  _ICOM_THIS_From_IDataObject(DataCache, iface);
    10591059
    1060   return IUnknown_Release(this->outerUnknown); 
     1060  return IUnknown_Release(this->outerUnknown);
    10611061}
    10621062
     
    10701070static HRESULT WINAPI DataCache_GetData(
    10711071            IDataObject*     iface,
    1072             LPFORMATETC      pformatetcIn, 
     1072            LPFORMATETC      pformatetcIn,
    10731073            STGMEDIUM*       pmedium)
    10741074{
     
    11681168
    11691169static HRESULT WINAPI DataCache_GetDataHere(
    1170             IDataObject*     iface, 
     1170            IDataObject*     iface,
    11711171            LPFORMATETC      pformatetc,
    11721172            STGMEDIUM*       pmedium)
     
    11921192 */
    11931193static HRESULT WINAPI DataCache_GetCanonicalFormatEtc(
    1194             IDataObject*     iface, 
    1195             LPFORMATETC      pformatectIn, 
     1194            IDataObject*     iface,
     1195            LPFORMATETC      pformatectIn,
    11961196            LPFORMATETC      pformatetcOut)
    11971197{
     
    12091209static HRESULT WINAPI DataCache_IDataObject_SetData(
    12101210            IDataObject*     iface,
    1211             LPFORMATETC      pformatetc, 
    1212             STGMEDIUM*       pmedium, 
     1211            LPFORMATETC      pformatetc,
     1212            STGMEDIUM*       pmedium,
    12131213            BOOL             fRelease)
    12141214{
     
    12271227  IOleCache2_Release(oleCache);
    12281228
    1229   return hres;;
     1229  return hres;
    12301230}
    12311231
     
    12381238 */
    12391239static HRESULT WINAPI DataCache_EnumFormatEtc(
    1240             IDataObject*     iface,       
     1240            IDataObject*     iface,
    12411241            DWORD            dwDirection,
    12421242            IEnumFORMATETC** ppenumFormatEtc)
     
    12541254 */
    12551255static HRESULT WINAPI DataCache_DAdvise(
    1256             IDataObject*     iface, 
    1257             FORMATETC*       pformatetc, 
    1258             DWORD            advf, 
    1259             IAdviseSink*     pAdvSink, 
     1256            IDataObject*     iface,
     1257            FORMATETC*       pformatetc,
     1258            DWORD            advf,
     1259            IAdviseSink*     pAdvSink,
    12601260            DWORD*           pdwConnection)
    12611261{
     
    13111311  _ICOM_THIS_From_IPersistStorage(DataCache, iface);
    13121312
    1313   return IUnknown_QueryInterface(this->outerUnknown, riid, ppvObject); 
     1313  return IUnknown_QueryInterface(this->outerUnknown, riid, ppvObject);
    13141314}
    13151315
     
    13191319 * See Windows documentation for more details on IUnknown methods.
    13201320 */
    1321 static ULONG WINAPI DataCache_IPersistStorage_AddRef( 
     1321static ULONG WINAPI DataCache_IPersistStorage_AddRef(
    13221322            IPersistStorage* iface)
    13231323{
    13241324  _ICOM_THIS_From_IPersistStorage(DataCache, iface);
    13251325
    1326   return IUnknown_AddRef(this->outerUnknown); 
     1326  return IUnknown_AddRef(this->outerUnknown);
    13271327}
    13281328
     
    13321332 * See Windows documentation for more details on IUnknown methods.
    13331333 */
    1334 static ULONG WINAPI DataCache_IPersistStorage_Release( 
     1334static ULONG WINAPI DataCache_IPersistStorage_Release(
    13351335            IPersistStorage* iface)
    13361336{
    13371337  _ICOM_THIS_From_IPersistStorage(DataCache, iface);
    13381338
    1339   return IUnknown_Release(this->outerUnknown); 
     1339  return IUnknown_Release(this->outerUnknown);
    13401340}
    13411341
     
    13471347 * See Windows documentation for more details on IPersistStorage methods.
    13481348 */
    1349 static HRESULT WINAPI DataCache_GetClassID( 
     1349static HRESULT WINAPI DataCache_GetClassID(
    13501350            IPersistStorage* iface,
    13511351            CLSID*           pClassID)
     
    13581358 * DataCache_IsDirty (IPersistStorage)
    13591359 *
    1360  * Until we actully connect to a running object and retrieve new 
     1360 * Until we actully connect to a running object and retrieve new
    13611361 * information to it, we never get dirty.
    13621362 *
    13631363 * See Windows documentation for more details on IPersistStorage methods.
    13641364 */
    1365 static HRESULT WINAPI DataCache_IsDirty( 
     1365static HRESULT WINAPI DataCache_IsDirty(
    13661366            IPersistStorage* iface)
    13671367{
     
    13791379 * See Windows documentation for more details on IPersistStorage methods.
    13801380 */
    1381 static HRESULT WINAPI DataCache_InitNew(
    1382             IPersistStorage* iface,
    1383             IStorage*        pStg)
    1384 {
    1385   TRACE("(%p, %p)\n", iface, pStg);
    1386 
    1387   return DataCache_Load(iface, pStg);
    1388 }
    1389 
    1390 /************************************************************************
    1391  * DataCache_Load (IPersistStorage)
    1392  *
    1393  * The data cache implementation of IPersistStorage_Load doesn't
    1394  * actually load anything. Instead, it holds on to the storage pointer
    1395  * and it will load the presentation information when the
    1396  * IDataObject_GetData or IViewObject2_Draw methods are called.
    1397  *
    1398  * See Windows documentation for more details on IPersistStorage methods.
    1399  */
    1400 static HRESULT WINAPI DataCache_Load(
     1381static HRESULT WINAPI DataCache_InitNew(
    14011382            IPersistStorage* iface,
    14021383            IStorage*        pStg)
    14031384{
     1385  TRACE("(%p, %p)\n", iface, pStg);
     1386
     1387  return DataCache_Load(iface, pStg);
     1388}
     1389
     1390/************************************************************************
     1391 * DataCache_Load (IPersistStorage)
     1392 *
     1393 * The data cache implementation of IPersistStorage_Load doesn't
     1394 * actually load anything. Instead, it holds on to the storage pointer
     1395 * and it will load the presentation information when the
     1396 * IDataObject_GetData or IViewObject2_Draw methods are called.
     1397 *
     1398 * See Windows documentation for more details on IPersistStorage methods.
     1399 */
     1400static HRESULT WINAPI DataCache_Load(
     1401            IPersistStorage* iface,
     1402            IStorage*        pStg)
     1403{
    14041404  _ICOM_THIS_From_IPersistStorage(DataCache, iface);
    14051405
     
    14231423 * DataCache_Save (IPersistStorage)
    14241424 *
    1425  * Until we actully connect to a running object and retrieve new 
     1425 * Until we actully connect to a running object and retrieve new
    14261426 * information to it, we never have to save anything. However, it is
    14271427 * our responsability to copy the information when saving to a new
     
    14301430 * See Windows documentation for more details on IPersistStorage methods.
    14311431 */
    1432 static HRESULT WINAPI DataCache_Save( 
     1432static HRESULT WINAPI DataCache_Save(
    14331433            IPersistStorage* iface,
    1434             IStorage*        pStg, 
     1434            IStorage*        pStg,
    14351435            BOOL             fSameAsLoad)
    14361436{
     
    14391439  TRACE("(%p, %p, %d)\n", iface, pStg, fSameAsLoad);
    14401440
    1441   if ( (!fSameAsLoad) && 
     1441  if ( (!fSameAsLoad) &&
    14421442       (this->presentationStorage!=NULL) )
    14431443  {
     
    14601460 * See Windows documentation for more details on IPersistStorage methods.
    14611461 */
    1462 static HRESULT WINAPI DataCache_SaveCompleted( 
    1463             IPersistStorage* iface, 
     1462static HRESULT WINAPI DataCache_SaveCompleted(
     1463            IPersistStorage* iface,
    14641464            IStorage*        pStgNew)
    14651465{
     
    15251525  _ICOM_THIS_From_IViewObject2(DataCache, iface);
    15261526
    1527   return IUnknown_QueryInterface(this->outerUnknown, riid, ppvObject); 
     1527  return IUnknown_QueryInterface(this->outerUnknown, riid, ppvObject);
    15281528}
    15291529
     
    15331533 * See Windows documentation for more details on IUnknown methods.
    15341534 */
    1535 static ULONG WINAPI DataCache_IViewObject2_AddRef( 
     1535static ULONG WINAPI DataCache_IViewObject2_AddRef(
    15361536            IViewObject2* iface)
    15371537{
    15381538  _ICOM_THIS_From_IViewObject2(DataCache, iface);
    15391539
    1540   return IUnknown_AddRef(this->outerUnknown); 
     1540  return IUnknown_AddRef(this->outerUnknown);
    15411541}
    15421542
     
    15461546 * See Windows documentation for more details on IUnknown methods.
    15471547 */
    1548 static ULONG WINAPI DataCache_IViewObject2_Release( 
     1548static ULONG WINAPI DataCache_IViewObject2_Release(
    15491549            IViewObject2* iface)
    15501550{
    15511551  _ICOM_THIS_From_IViewObject2(DataCache, iface);
    15521552
    1553   return IUnknown_Release(this->outerUnknown); 
     1553  return IUnknown_Release(this->outerUnknown);
    15541554}
    15551555
     
    15671567            LONG             lindex,
    15681568            void*            pvAspect,
    1569             DVTARGETDEVICE*  ptd, 
    1570             HDC              hdcTargetDev, 
     1569            DVTARGETDEVICE*  ptd,
     1570            HDC              hdcTargetDev,
    15711571            HDC              hdcDraw,
    15721572            LPCRECTL         lprcBounds,
     
    15861586        lindex,
    15871587        pvAspect,
    1588         hdcTargetDev, 
     1588        hdcTargetDev,
    15891589        hdcDraw,
    15901590        lprcBounds,
     
    16371637                   &oldWindowExt);
    16381638
    1639     SetViewportExtEx(hdcDraw, 
     1639    SetViewportExtEx(hdcDraw,
    16401640                     lprcBounds->right - lprcBounds->left,
    16411641                     lprcBounds->bottom - lprcBounds->top,
     
    16541654                   NULL);
    16551655
    1656     SetViewportExtEx(hdcDraw, 
     1656    SetViewportExtEx(hdcDraw,
    16571657                     oldViewportExt.cx,
    16581658                     oldViewportExt.cy,
     
    16731673
    16741674static HRESULT WINAPI DataCache_GetColorSet(
    1675             IViewObject2*   iface, 
    1676             DWORD           dwDrawAspect, 
    1677             LONG            lindex, 
    1678             void*           pvAspect, 
    1679             DVTARGETDEVICE* ptd, 
    1680             HDC             hicTargetDevice, 
     1675            IViewObject2*   iface,
     1676            DWORD           dwDrawAspect,
     1677            LONG            lindex,
     1678            void*           pvAspect,
     1679            DVTARGETDEVICE* ptd,
     1680            HDC             hicTargetDevice,
    16811681            LOGPALETTE**    ppColorSet)
    16821682{
     
    16891689            DWORD           dwDrawAspect,
    16901690            LONG            lindex,
    1691             void*           pvAspect, 
     1691            void*           pvAspect,
    16921692            DWORD*          pdwFreeze)
    16931693{
     
    17141714static HRESULT WINAPI DataCache_SetAdvise(
    17151715            IViewObject2*   iface,
    1716             DWORD           aspects, 
    1717             DWORD           advf, 
     1716            DWORD           aspects,
     1717            DWORD           advf,
    17181718            IAdviseSink*    pAdvSink)
    17191719{
     
    17291729    IAdviseSink_Release(this->sinkInterface);
    17301730    this->sinkInterface  = NULL;
    1731     this->sinkAspects    = 0; 
     1731    this->sinkAspects    = 0;
    17321732    this->sinkAdviseFlag = 0;
    17331733  }
     
    17391739  {
    17401740    this->sinkInterface  = pAdvSink;
    1741     this->sinkAspects    = aspects; 
    1742     this->sinkAdviseFlag = advf;   
     1741    this->sinkAspects    = aspects;
     1742    this->sinkAdviseFlag = advf;
    17431743
    17441744    IAdviseSink_AddRef(this->sinkInterface);
     
    17621762 * DataCache_GetAdvise (IViewObject2)
    17631763 *
    1764  * This method queries the current state of the advise sink 
     1764 * This method queries the current state of the advise sink
    17651765 * installed on the data cache.
    17661766 *
     
    17681768 */
    17691769static HRESULT WINAPI DataCache_GetAdvise(
    1770             IViewObject2*   iface, 
    1771             DWORD*          pAspects, 
    1772             DWORD*          pAdvf, 
     1770            IViewObject2*   iface,
     1771            DWORD*          pAspects,
     1772            DWORD*          pAdvf,
    17731773            IAdviseSink**   ppAdvSink)
    17741774{
     
    17881788  if (ppAdvSink!=NULL)
    17891789  {
    1790     IAdviseSink_QueryInterface(this->sinkInterface, 
    1791                                &IID_IAdviseSink, 
     1790    IAdviseSink_QueryInterface(this->sinkInterface,
     1791                               &IID_IAdviseSink,
    17921792                               (void**)ppAdvSink);
    17931793  }
     
    18041804 */
    18051805static HRESULT WINAPI DataCache_GetExtent(
    1806             IViewObject2*   iface, 
    1807             DWORD           dwDrawAspect, 
    1808             LONG            lindex, 
    1809             DVTARGETDEVICE* ptd, 
     1806            IViewObject2*   iface,
     1807            DWORD           dwDrawAspect,
     1808            LONG            lindex,
     1809            DVTARGETDEVICE* ptd,
    18101810            LPSIZEL         lpsizel)
    18111811{
     
    18151815  _ICOM_THIS_From_IViewObject2(DataCache, iface);
    18161816
    1817   TRACE("(%p, %lx, %ld, %p, %p)\n", 
     1817  TRACE("(%p, %lx, %ld, %p, %p)\n",
    18181818        iface, dwDrawAspect, lindex, ptd, lpsizel);
    18191819
     
    18421842  if (ptd!=NULL)
    18431843    FIXME("Unimplemented ptd = %p\n", ptd);
    1844  
    1845   /*
    1846    * Get the presentation information from the 
     1844
     1845  /*
     1846   * Get the presentation information from the
    18471847   * cache.
    18481848   */
     
    18841884  _ICOM_THIS_From_IOleCache2(DataCache, iface);
    18851885
    1886   return IUnknown_QueryInterface(this->outerUnknown, riid, ppvObject); 
     1886  return IUnknown_QueryInterface(this->outerUnknown, riid, ppvObject);
    18871887}
    18881888
     
    18921892 * See Windows documentation for more details on IUnknown methods.
    18931893 */
    1894 static ULONG WINAPI DataCache_IOleCache2_AddRef( 
     1894static ULONG WINAPI DataCache_IOleCache2_AddRef(
    18951895            IOleCache2*     iface)
    18961896{
    18971897  _ICOM_THIS_From_IOleCache2(DataCache, iface);
    18981898
    1899   return IUnknown_AddRef(this->outerUnknown); 
     1899  return IUnknown_AddRef(this->outerUnknown);
    19001900}
    19011901
     
    19051905 * See Windows documentation for more details on IUnknown methods.
    19061906 */
    1907 static ULONG WINAPI DataCache_IOleCache2_Release( 
     1907static ULONG WINAPI DataCache_IOleCache2_Release(
    19081908            IOleCache2*     iface)
    19091909{
    19101910  _ICOM_THIS_From_IOleCache2(DataCache, iface);
    19111911
    1912   return IUnknown_Release(this->outerUnknown); 
     1912  return IUnknown_Release(this->outerUnknown);
    19131913}
    19141914
     
    19591959static HRESULT WINAPI DataCache_UpdateCache(
    19601960            IOleCache2*     iface,
    1961             LPDATAOBJECT    pDataObject, 
     1961            LPDATAOBJECT    pDataObject,
    19621962            DWORD           grfUpdf,
    19631963            LPVOID          pReserved)
     
    19931993  _ICOM_THIS_From_IOleCacheControl(DataCache, iface);
    19941994
    1995   return IUnknown_QueryInterface(this->outerUnknown, riid, ppvObject); 
     1995  return IUnknown_QueryInterface(this->outerUnknown, riid, ppvObject);
    19961996}
    19971997
     
    20012001 * See Windows documentation for more details on IUnknown methods.
    20022002 */
    2003 static ULONG WINAPI DataCache_IOleCacheControl_AddRef( 
     2003static ULONG WINAPI DataCache_IOleCacheControl_AddRef(
    20042004            IOleCacheControl* iface)
    20052005{
    20062006  _ICOM_THIS_From_IOleCacheControl(DataCache, iface);
    20072007
    2008   return IUnknown_AddRef(this->outerUnknown); 
     2008  return IUnknown_AddRef(this->outerUnknown);
    20092009}
    20102010
     
    20142014 * See Windows documentation for more details on IUnknown methods.
    20152015 */
    2016 static ULONG WINAPI DataCache_IOleCacheControl_Release( 
     2016static ULONG WINAPI DataCache_IOleCacheControl_Release(
    20172017            IOleCacheControl* iface)
    20182018{
    20192019  _ICOM_THIS_From_IOleCacheControl(DataCache, iface);
    20202020
    2021   return IUnknown_Release(this->outerUnknown); 
     2021  return IUnknown_Release(this->outerUnknown);
    20222022}
    20232023
Note: See TracChangeset for help on using the changeset viewer.