wine/dlls/ole32 defaulthandler.c
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Nov 28 05:00:16 CST 2005
ChangeSet ID: 21451
CVSROOT: /opt/cvs-commit
Module name: wine
Changes by: julliard at winehq.org 2005/11/28 05:00:16
Modified files:
dlls/ole32 : defaulthandler.c
Log message:
Robert Shearman <rob at codeweavers.com>
Call the equivalent delegate function for all of the simple
functions.
Patch: http://cvs.winehq.org/patch.py?id=21451
Old revision New revision Changes Path
1.35 1.36 +44 -2 wine/dlls/ole32/defaulthandler.c
Index: wine/dlls/ole32/defaulthandler.c
diff -u -p wine/dlls/ole32/defaulthandler.c:1.35 wine/dlls/ole32/defaulthandler.c:1.36
--- wine/dlls/ole32/defaulthandler.c:1.35 28 Nov 2005 11: 0:16 -0000
+++ wine/dlls/ole32/defaulthandler.c 28 Nov 2005 11: 0:16 -0000
@@ -307,9 +307,13 @@ static HRESULT WINAPI DefaultHandler_Set
IOleClientSite* pClientSite)
{
DefaultHandler *This = impl_from_IOleObject(iface);
+ HRESULT hr = S_OK;
TRACE("(%p, %p)\n", iface, pClientSite);
+ if (This->pOleDelegate)
+ hr = IOleObject_SetClientSite(This->pOleDelegate, pClientSite);
+
/*
* Make sure we release the previous client site if there
* was one.
@@ -371,6 +375,9 @@ static HRESULT WINAPI DefaultHandler_Set
debugstr_w(szContainerApp),
debugstr_w(szContainerObj));
+ if (This->pOleDelegate)
+ IOleObject_SetHostNames(This->pOleDelegate, szContainerApp, szContainerObj);
+
/* Be sure to cleanup before re-assinging the strings. */
HeapFree( GetProcessHeap(), 0, This->containerApp );
This->containerApp = NULL;
@@ -452,11 +459,16 @@ static HRESULT WINAPI DefaultHandler_Set
DWORD dwWhichMoniker,
IMoniker* pmk)
{
+ DefaultHandler *This = impl_from_IOleObject(iface);
+
TRACE("(%p, %ld, %p)\n",
iface,
dwWhichMoniker,
pmk);
+ if (This->pOleDelegate)
+ return IOleObject_SetMoniker(This->pOleDelegate, dwWhichMoniker, pmk);
+
return S_OK;
}
@@ -478,6 +490,11 @@ static HRESULT WINAPI DefaultHandler_Get
TRACE("(%p, %ld, %ld, %p)\n",
iface, dwAssign, dwWhichMoniker, ppmk);
+ if (This->pOleDelegate)
+ return IOleObject_GetMoniker(This->pOleDelegate, dwAssign, dwWhichMoniker,
+ ppmk);
+
+ /* FIXME: dwWhichMoniker == OLEWHICHMK_CONTAINER only? */
if (This->clientSite)
{
return IOleClientSite_GetMoniker(This->clientSite,
@@ -503,9 +520,14 @@ static HRESULT WINAPI DefaultHandler_Ini
BOOL fCreation,
DWORD dwReserved)
{
+ DefaultHandler *This = impl_from_IOleObject(iface);
+
TRACE("(%p, %p, %d, %ld)\n",
iface, pDataObject, fCreation, dwReserved);
+ if (This->pOleDelegate)
+ return IOleObject_InitFromData(This->pOleDelegate, pDataObject, fCreation,
+ dwReserved);
return OLE_E_NOTRUNNING;
}
@@ -521,9 +543,15 @@ static HRESULT WINAPI DefaultHandler_Get
DWORD dwReserved,
IDataObject** ppDataObject)
{
+ DefaultHandler *This = impl_from_IOleObject(iface);
+
TRACE("(%p, %ld, %p)\n",
iface, dwReserved, ppDataObject);
+ if (This->pOleDelegate)
+ return IOleObject_GetClipboardData(This->pOleDelegate, dwReserved,
+ ppDataObject);
+
return OLE_E_NOTRUNNING;
}
@@ -650,8 +678,14 @@ static HRESULT WINAPI DefaultHandler_Set
DWORD dwDrawAspect,
SIZEL* psizel)
{
+ DefaultHandler *This = impl_from_IOleObject(iface);
+
TRACE("(%p, %lx, (%ld x %ld))\n", iface,
dwDrawAspect, psizel->cx, psizel->cy);
+
+ if (This->pOleDelegate)
+ IOleObject_SetExtent(This->pOleDelegate, dwDrawAspect, psizel);
+
return OLE_E_NOTRUNNING;
}
@@ -676,8 +710,10 @@ static HRESULT WINAPI DefaultHandler_Get
TRACE("(%p, %lx, %p)\n", iface, dwDrawAspect, psizel);
- hres = IUnknown_QueryInterface(This->dataCache, &IID_IViewObject2, (void**)&cacheView);
+ if (This->pOleDelegate)
+ return IOleObject_GetExtent(This->pOleDelegate, dwDrawAspect, psizel);
+ hres = IUnknown_QueryInterface(This->dataCache, &IID_IViewObject2, (void**)&cacheView);
if (FAILED(hres))
return E_UNEXPECTED;
@@ -824,7 +860,7 @@ static HRESULT WINAPI DefaultHandler_Get
}
/************************************************************************
- * DefaultHandler_SetExtent (IOleObject)
+ * DefaultHandler_SetColorScheme (IOleObject)
*
* This method is meaningless if the server is not running
*
@@ -834,7 +870,13 @@ static HRESULT WINAPI DefaultHandler_Set
IOleObject* iface,
struct tagLOGPALETTE* pLogpal)
{
+ DefaultHandler *This = impl_from_IOleObject(iface);
+
TRACE("(%p, %p))\n", iface, pLogpal);
+
+ if (This->pOleDelegate)
+ return IOleObject_SetColorScheme(This->pOleDelegate, pLogpal);
+
return OLE_E_NOTRUNNING;
}
More information about the wine-cvs
mailing list