Jacek Caban : shdocvw: Revert "Added Support for the IViewObjectEx" with tests.

Alexandre Julliard julliard at winehq.org
Wed Nov 12 07:18:38 CST 2008


Module: wine
Branch: master
Commit: a43adb40af440cee59e0a091554dcfe11a957482
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=a43adb40af440cee59e0a091554dcfe11a957482

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Tue Nov 11 19:57:49 2008 +0100

shdocvw: Revert "Added Support for the IViewObjectEx" with tests.

---

 dlls/shdocvw/shdocvw.h          |    3 +-
 dlls/shdocvw/tests/webbrowser.c |    6 +++
 dlls/shdocvw/view.c             |   67 +++++++--------------------------------
 dlls/shdocvw/webbrowser.c       |    3 --
 4 files changed, 19 insertions(+), 60 deletions(-)

diff --git a/dlls/shdocvw/shdocvw.h b/dlls/shdocvw/shdocvw.h
index 57d2577..0005143 100644
--- a/dlls/shdocvw/shdocvw.h
+++ b/dlls/shdocvw/shdocvw.h
@@ -115,7 +115,7 @@ struct WebBrowser {
     const IPersistMemoryVtbl            *lpPersistMemoryVtbl;
     const IPersistStreamInitVtbl        *lpPersistStreamInitVtbl;
     const IProvideClassInfo2Vtbl        *lpProvideClassInfoVtbl;
-    const IViewObjectExVtbl             *lpViewObjectVtbl;
+    const IViewObject2Vtbl              *lpViewObjectVtbl;
     const IOleInPlaceActiveObjectVtbl   *lpOleInPlaceActiveObjectVtbl;
     const IOleCommandTargetVtbl         *lpOleCommandTargetVtbl;
     const IHlinkFrameVtbl               *lpHlinkFrameVtbl;
@@ -173,7 +173,6 @@ struct InternetExplorer {
 #define CONPTCONT(x)    ((IConnectionPointContainer*)   &(x)->lpConnectionPointContainerVtbl)
 #define VIEWOBJ(x)      ((IViewObject*)                 &(x)->lpViewObjectVtbl);
 #define VIEWOBJ2(x)     ((IViewObject2*)                &(x)->lpViewObjectVtbl);
-#define VIEWOBJEX(x)    ((IViewObjectEx*)               &(x)->lpViewObjectVtbl);
 #define ACTIVEOBJ(x)    ((IOleInPlaceActiveObject*)     &(x)->lpOleInPlaceActiveObjectVtbl)
 #define OLECMD(x)       ((IOleCommandTarget*)           &(x)->lpOleCommandTargetVtbl)
 #define HLINKFRAME(x)   ((IHlinkFrame*)                 &(x)->lpHlinkFrameVtbl)
diff --git a/dlls/shdocvw/tests/webbrowser.c b/dlls/shdocvw/tests/webbrowser.c
index a203ae1..3aa4bdd 100644
--- a/dlls/shdocvw/tests/webbrowser.c
+++ b/dlls/shdocvw/tests/webbrowser.c
@@ -1983,6 +1983,7 @@ static void test_QueryInterface(IUnknown *unk)
     IOleInPlaceSite *inplace = (void*)0xdeadbeef;
     IOleCache *cache = (void*)0xdeadbeef;
     IObjectWithSite *site = (void*)0xdeadbeef;
+    IViewObjectEx *viewex = (void*)0xdeadbeef;
     HRESULT hres;
 
     hres = IUnknown_QueryInterface(unk, &IID_IQuickActivate, (void**)&qa);
@@ -2008,6 +2009,11 @@ static void test_QueryInterface(IUnknown *unk)
     hres = IUnknown_QueryInterface(unk, &IID_IObjectWithSite, (void**)&site);
     ok(hres == E_NOINTERFACE, "QueryInterface returned %08x, expected E_NOINTERFACE\n", hres);
     ok(site == NULL, "inplace=%p, ezpected NULL\n", runnable);
+
+    hres = IUnknown_QueryInterface(unk, &IID_IViewObjectEx, (void**)&viewex);
+    ok(hres == E_NOINTERFACE, "QueryInterface returned %08x, expected E_NOINTERFACE\n", hres);
+    ok(viewex == NULL, "viewex=%p, ezpected NULL\n", runnable);
+
 }
 
 static void test_WebBrowser(void)
diff --git a/dlls/shdocvw/view.c b/dlls/shdocvw/view.c
index 0bae877..d2e5857 100644
--- a/dlls/shdocvw/view.c
+++ b/dlls/shdocvw/view.c
@@ -23,25 +23,25 @@ WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
 
 #define VIEWOBJ_THIS(iface) DEFINE_THIS(WebBrowser, ViewObject, iface)
 
-static HRESULT WINAPI ViewObject_QueryInterface(IViewObjectEx *iface, REFIID riid, void **ppv)
+static HRESULT WINAPI ViewObject_QueryInterface(IViewObject2 *iface, REFIID riid, void **ppv)
 {
     WebBrowser *This = VIEWOBJ_THIS(iface);
     return IWebBrowser2_QueryInterface(WEBBROWSER(This), riid, ppv);
 }
 
-static ULONG WINAPI ViewObject_AddRef(IViewObjectEx *iface)
+static ULONG WINAPI ViewObject_AddRef(IViewObject2 *iface)
 {
     WebBrowser *This = VIEWOBJ_THIS(iface);
     return IWebBrowser2_AddRef(WEBBROWSER(This));
 }
 
-static ULONG WINAPI ViewObject_Release(IViewObjectEx *iface)
+static ULONG WINAPI ViewObject_Release(IViewObject2 *iface)
 {
     WebBrowser *This = VIEWOBJ_THIS(iface);
     return IWebBrowser2_Release(WEBBROWSER(This));
 }
 
-static HRESULT WINAPI ViewObject_Draw(IViewObjectEx *iface, DWORD dwDrawAspect,
+static HRESULT WINAPI ViewObject_Draw(IViewObject2 *iface, DWORD dwDrawAspect,
         LONG lindex, void *pvAspect, DVTARGETDEVICE *ptd, HDC hdcTargetDev,
         HDC hdcDraw, LPCRECTL lprcBounds, LPCRECTL lprcWBounds,
         BOOL (STDMETHODCALLTYPE *pfnContinue)(ULONG_PTR),
@@ -54,7 +54,7 @@ static HRESULT WINAPI ViewObject_Draw(IViewObjectEx *iface, DWORD dwDrawAspect,
     return E_NOTIMPL;
 }
 
-static HRESULT WINAPI ViewObject_GetColorSet(IViewObjectEx *iface, DWORD dwAspect,
+static HRESULT WINAPI ViewObject_GetColorSet(IViewObject2 *iface, DWORD dwAspect,
         LONG lindex, void *pvAspect, DVTARGETDEVICE *ptd, HDC hicTargetDev,
         LOGPALETTE **ppColorSet)
 {
@@ -64,7 +64,7 @@ static HRESULT WINAPI ViewObject_GetColorSet(IViewObjectEx *iface, DWORD dwAspec
     return E_NOTIMPL;
 }
 
-static HRESULT WINAPI ViewObject_Freeze(IViewObjectEx *iface, DWORD dwDrawAspect, LONG lindex,
+static HRESULT WINAPI ViewObject_Freeze(IViewObject2 *iface, DWORD dwDrawAspect, LONG lindex,
                                         void *pvAspect, DWORD *pdwFreeze)
 {
     WebBrowser *This = VIEWOBJ_THIS(iface);
@@ -72,14 +72,14 @@ static HRESULT WINAPI ViewObject_Freeze(IViewObjectEx *iface, DWORD dwDrawAspect
     return E_NOTIMPL;
 }
 
-static HRESULT WINAPI ViewObject_Unfreeze(IViewObjectEx *iface, DWORD dwFreeze)
+static HRESULT WINAPI ViewObject_Unfreeze(IViewObject2 *iface, DWORD dwFreeze)
 {
     WebBrowser *This = VIEWOBJ_THIS(iface);
     FIXME("(%p)->(%d)\n", This, dwFreeze);
     return E_NOTIMPL;
 }
 
-static HRESULT WINAPI ViewObject_SetAdvise(IViewObjectEx *iface, DWORD aspects, DWORD advf,
+static HRESULT WINAPI ViewObject_SetAdvise(IViewObject2 *iface, DWORD aspects, DWORD advf,
         IAdviseSink *pAdvSink)
 {
     WebBrowser *This = VIEWOBJ_THIS(iface);
@@ -87,7 +87,7 @@ static HRESULT WINAPI ViewObject_SetAdvise(IViewObjectEx *iface, DWORD aspects,
     return E_NOTIMPL;
 }
 
-static HRESULT WINAPI ViewObject_GetAdvise(IViewObjectEx *iface, DWORD *pAspects,
+static HRESULT WINAPI ViewObject_GetAdvise(IViewObject2 *iface, DWORD *pAspects,
         DWORD *pAdvf, IAdviseSink **ppAdvSink)
 {
     WebBrowser *This = VIEWOBJ_THIS(iface);
@@ -95,7 +95,7 @@ static HRESULT WINAPI ViewObject_GetAdvise(IViewObjectEx *iface, DWORD *pAspects
     return E_NOTIMPL;
 }
 
-static HRESULT WINAPI ViewObject_GetExtent(IViewObjectEx *iface, DWORD dwAspect, LONG lindex,
+static HRESULT WINAPI ViewObject_GetExtent(IViewObject2 *iface, DWORD dwAspect, LONG lindex,
         DVTARGETDEVICE *ptd, LPSIZEL lpsizel)
 {
     WebBrowser *This = VIEWOBJ_THIS(iface);
@@ -103,45 +103,7 @@ static HRESULT WINAPI ViewObject_GetExtent(IViewObjectEx *iface, DWORD dwAspect,
     return E_NOTIMPL;
 }
 
-static HRESULT WINAPI ViewObject_GetRect(IViewObjectEx *iface, DWORD dwAspect, LPRECTL pRect)
-{
-    WebBrowser *This = VIEWOBJ_THIS(iface);
-    FIXME("(%p)->(%d %p)\n", This, dwAspect, pRect);
-    return E_NOTIMPL;
-}
-
-static HRESULT WINAPI ViewObject_GetViewStatus(IViewObjectEx *iface, DWORD *pdwStatus)
-{
-    WebBrowser *This = VIEWOBJ_THIS(iface);
-    FIXME("(%p)->(%p)\n", This, pdwStatus);
-    return E_NOTIMPL;
-}
-
-static HRESULT WINAPI ViewObject_QueryHitPoint(IViewObjectEx *iface, DWORD dwAspect, LPCRECT pRectBounds,
-        POINT ptlLoc, LONG lCloseHint, DWORD *pHitResult)
-{
-    WebBrowser *This = VIEWOBJ_THIS(iface);
-    FIXME("(%p)->(%d %p %p %d %p)\n", This, dwAspect, pRectBounds, pRectBounds, lCloseHint, pHitResult);
-    return E_NOTIMPL;
-}
-
-static HRESULT WINAPI ViewObject_QueryHitRect(IViewObjectEx * iface, DWORD dwAspect, LPCRECT pRectBounds,
-        LPCRECT pRectLoc, LONG lCloseHint, DWORD *pHitResult)
-{
-    WebBrowser *This = VIEWOBJ_THIS(iface);
-    FIXME("(%p)->(%d %p %p %p %d %p)\n", This, dwAspect, pRectBounds, pRectLoc, pRectBounds, lCloseHint, pHitResult);
-    return E_NOTIMPL;
-}
-
-static HRESULT WINAPI ViewObject_GetNaturalExtent(IViewObjectEx *iface, DWORD dwAspect, LONG lindex,
-        DVTARGETDEVICE *ptd, HDC hicTargetDev, DVEXTENTINFO *pExtentInfo, LPSIZEL pSizel)
-{
-    WebBrowser *This = VIEWOBJ_THIS(iface);
-    FIXME("(%p)->(%d %d %p %p %p)\n", This, dwAspect, lindex, ptd, pExtentInfo, pSizel);
-    return E_NOTIMPL;
-}
-
-static const IViewObjectExVtbl ViewObjectVtbl = {
+static const IViewObject2Vtbl ViewObjectVtbl = {
     ViewObject_QueryInterface,
     ViewObject_AddRef,
     ViewObject_Release,
@@ -151,12 +113,7 @@ static const IViewObjectExVtbl ViewObjectVtbl = {
     ViewObject_Unfreeze,
     ViewObject_SetAdvise,
     ViewObject_GetAdvise,
-    ViewObject_GetExtent,
-    ViewObject_GetRect,
-    ViewObject_GetViewStatus,
-    ViewObject_QueryHitPoint,
-    ViewObject_QueryHitRect,
-    ViewObject_GetNaturalExtent
+    ViewObject_GetExtent
 };
 
 #undef VIEWOBJ_THIS
diff --git a/dlls/shdocvw/webbrowser.c b/dlls/shdocvw/webbrowser.c
index f8cc7c7..3699239 100644
--- a/dlls/shdocvw/webbrowser.c
+++ b/dlls/shdocvw/webbrowser.c
@@ -93,9 +93,6 @@ static HRESULT WINAPI WebBrowser_QueryInterface(IWebBrowser2 *iface, REFIID riid
     }else if(IsEqualGUID(&IID_IViewObject2, riid)) {
         TRACE("(%p)->(IID_IViewObject2 %p)\n", This, ppv);
         *ppv = VIEWOBJ2(This);
-    }else if(IsEqualGUID(&IID_IViewObjectEx, riid)) {
-        TRACE("(%p)->(IID_IViewObjectEx %p)\n", This, ppv);
-        *ppv = VIEWOBJEX(This);
     }else if(IsEqualGUID(&IID_IOleInPlaceActiveObject, riid)) {
         TRACE("(%p)->(IID_IOleInPlaceActiveObject %p)\n", This, ppv);
         *ppv = ACTIVEOBJ(This);




More information about the wine-cvs mailing list