- Added IOleDocumentView interface.
- Added implementation of DoVerb and CreateView.
diff --git a/dlls/mshtml/view.c b/dlls/mshtml/view.c
new file mode 100644
index 0000000..b64fc92
--- /dev/null
+++ b/dlls/mshtml/view.c
@@ -0,0 +1,207 @@
+/*
+ * Copyright 2005 Jacek Caban
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include "config.h"
+
+#include <stdarg.h>
+#include <stdio.h>
+
+#define COBJMACROS
+
+#include "windef.h"
+#include "winbase.h"
+#include "winuser.h"
+#include "ole2.h"
+#include "docobj.h"
+
+#include "mshtml.h"
+
+#include "wine/debug.h"
+
+#include "mshtml_private.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
+
+/**********************************************************
+ * IOleDocumentView implementation
+ */
+
+#define DOCVIEW_THIS \
+ HTMLDocument* const This=(HTMLDocument*)((char*)(iface)-offsetof(HTMLDocument,lpOleDocumentViewVtbl));
+
+static HRESULT WINAPI OleDocumentView_QueryInterface(IOleDocumentView *iface, REFIID riid, void **ppvObject)
+{
+ DOCVIEW_THIS
+ return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppvObject);
+}
+
+static ULONG WINAPI OleDocumentView_AddRef(IOleDocumentView *iface)
+{
+ DOCVIEW_THIS
+ return IHTMLDocument2_AddRef(HTMLDOC(This));
+}
+
+static ULONG WINAPI OleDocumentView_Release(IOleDocumentView *iface)
+{
+ DOCVIEW_THIS
+ return IHTMLDocument2_Release(HTMLDOC(This));
+}
+
+static HRESULT WINAPI OleDocumentView_SetInPlaceSite(IOleDocumentView *iface, IOleInPlaceSite *pIPSite)
+{
+ DOCVIEW_THIS
+ TRACE("(%p)->(%p)\n", This, pIPSite);
+
+ if(!pIPSite)
+ return E_INVALIDARG;
+
+ if(pIPSite)
+ IOleInPlaceSite_AddRef(pIPSite);
+
+ if(This->ipsite)
+ IOleInPlaceSite_Release(This->ipsite);
+
+ This->ipsite = pIPSite;
+ return S_OK;
+}
+
+static HRESULT WINAPI OleDocumentView_GetInPlaceSite(IOleDocumentView *iface, IOleInPlaceSite **ppIPSite)
+{
+ DOCVIEW_THIS
+ TRACE("(%p)->(%p)\n", This, ppIPSite);
+
+ if(!ppIPSite)
+ return E_INVALIDARG;
+
+ if(This->ipsite)
+ IOleInPlaceSite_AddRef(This->ipsite);
+
+ *ppIPSite = This->ipsite;
+ return S_OK;
+}
+
+static HRESULT WINAPI OleDocumentView_GetDocument(IOleDocumentView *iface, IUnknown **ppunk)
+{
+ DOCVIEW_THIS
+ TRACE("(%p)->(%p)\n", This, ppunk);
+
+ if(!ppunk)
+ return E_INVALIDARG;
+
+ IHTMLDocument2_AddRef(HTMLDOC(This));
+ *ppunk = (IUnknown*)HTMLDOC(This);
+ return S_OK;
+}
+
+static HRESULT WINAPI OleDocumentView_SetRect(IOleDocumentView *iface, LPRECT prcView)
+{
+ DOCVIEW_THIS
+ FIXME("(%p)->(%p)\n", This, prcView);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI OleDocumentView_GetRect(IOleDocumentView *iface, LPRECT prcView)
+{
+ DOCVIEW_THIS
+ FIXME("(%p)->(%p)\n", This, prcView);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI OleDocumentView_SetRectComplex(IOleDocumentView *iface, LPRECT prcView,
+ LPRECT prcHScroll, LPRECT prcVScroll, LPRECT prcSizeBox)
+{
+ DOCVIEW_THIS
+ FIXME("(%p)->(%p %p %p %p)\n", This, prcView, prcHScroll, prcVScroll, prcSizeBox);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI OleDocumentView_Show(IOleDocumentView *iface, BOOL fShow)
+{
+ DOCVIEW_THIS
+ FIXME("(%p)->(%x)\n", This, fShow);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI OleDocumentView_UIActivate(IOleDocumentView *iface, BOOL fUIActivate)
+{
+ DOCVIEW_THIS
+ FIXME("(%p)->(%x)\n", This, fUIActivate);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI OleDocumentView_Open(IOleDocumentView *iface)
+{
+ DOCVIEW_THIS
+ FIXME("(%p)\n", This);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI OleDocumentView_CloseView(IOleDocumentView *iface, DWORD dwReserved)
+{
+ DOCVIEW_THIS
+ FIXME("(%p)->(%lx)\n", This, dwReserved);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI OleDocumentView_SaveViewState(IOleDocumentView *iface, LPSTREAM pstm)
+{
+ DOCVIEW_THIS
+ FIXME("(%p)->(%p)\n", This, pstm);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI OleDocumentView_ApplyViewState(IOleDocumentView *iface, LPSTREAM pstm)
+{
+ DOCVIEW_THIS
+ FIXME("(%p)->(%p)\n", This, pstm);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI OleDocumentView_Clone(IOleDocumentView *iface, IOleInPlaceSite *pIPSiteNew,
+ IOleDocumentView **ppViewNew)
+{
+ DOCVIEW_THIS
+ FIXME("(%p)->(%p %p)\n", This, pIPSiteNew, ppViewNew);
+ return E_NOTIMPL;
+}
+
+static IOleDocumentViewVtbl OleDocumentViewVtbl = {
+ OleDocumentView_QueryInterface,
+ OleDocumentView_AddRef,
+ OleDocumentView_Release,
+ OleDocumentView_SetInPlaceSite,
+ OleDocumentView_GetInPlaceSite,
+ OleDocumentView_GetDocument,
+ OleDocumentView_SetRect,
+ OleDocumentView_GetRect,
+ OleDocumentView_SetRectComplex,
+ OleDocumentView_Show,
+ OleDocumentView_UIActivate,
+ OleDocumentView_Open,
+ OleDocumentView_CloseView,
+ OleDocumentView_SaveViewState,
+ OleDocumentView_ApplyViewState,
+ OleDocumentView_Clone
+};
+
+void HTMLDocument_View_Init(HTMLDocument *This)
+{
+ This->lpOleDocumentViewVtbl = &OleDocumentViewVtbl;
+
+ This->ipsite = NULL;
+}