summaryrefslogtreecommitdiff
path: root/embedserv
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2004-02-25 16:09:20 +0000
committerKurt Zenker <kz@openoffice.org>2004-02-25 16:09:20 +0000
commitab2bcfc2b9aa43bac0533d086d2b2f37d257de4e (patch)
treebd94d43eb9510cd52a6bff2db8d252b7b2851e30 /embedserv
parentf3e7cb64cbfbe4edba10ec36524eaf4709b238e8 (diff)
INTEGRATION: CWS layoutmanager (1.1.2); FILE ADDED
2003/11/20 12:54:52 abi 1.1.2.3: resizing of frame 2003/11/18 15:05:26 abi 1.1.2.2: recycling Frame,Window and Document 2003/10/29 13:40:50 abi 1.1.2.1: new files for inplace activation
Diffstat (limited to 'embedserv')
-rw-r--r--embedserv/source/embed/iipaobj.cxx94
1 files changed, 94 insertions, 0 deletions
diff --git a/embedserv/source/embed/iipaobj.cxx b/embedserv/source/embed/iipaobj.cxx
new file mode 100644
index 000000000000..52e790a7699a
--- /dev/null
+++ b/embedserv/source/embed/iipaobj.cxx
@@ -0,0 +1,94 @@
+#include "iipaobj.hxx"
+#include "embeddoc.hxx"
+
+
+
+CIIAObj::CIIAObj(EmbedDocument_Impl *pEmbDoc,DocumentHolder* pDocHolder)
+ : m_cRef(0),
+ m_pEmbDoc(pEmbDoc),
+ m_pDocHolder(pDocHolder)
+{
+}
+
+
+CIIAObj::~CIIAObj()
+{
+ return;
+}
+
+/* IUnknown methods */
+
+STDMETHODIMP CIIAObj::QueryInterface(REFIID riid, LPVOID FAR *ppv)
+{
+ *ppv=NULL;
+
+ if(IID_IUnknown==riid ||
+ IID_IOleWindow==riid ||
+ IID_IOleInPlaceActiveObject==riid)
+ *ppv=this;
+
+ //AddRef any interface we'll return.
+ if (NULL!=*ppv)
+ {
+ ((LPUNKNOWN)*ppv)->AddRef();
+ return NOERROR;
+ }
+
+ return ResultFromScode(E_NOINTERFACE);
+}
+
+
+STDMETHODIMP_(ULONG) CIIAObj::AddRef(void)
+{
+ ++m_cRef;
+ return m_pEmbDoc->AddRef();
+}
+
+STDMETHODIMP_(ULONG) CIIAObj::Release(void)
+{
+ --m_cRef;
+ return m_pEmbDoc->Release();
+}
+
+
+
+/* IOleInPlaceActiveObject methods*/
+
+STDMETHODIMP CIIAObj::GetWindow(HWND *)
+{
+ return NOERROR;
+}
+
+STDMETHODIMP CIIAObj::ContextSensitiveHelp(BOOL)
+{
+ return NOERROR;
+}
+
+STDMETHODIMP CIIAObj::TranslateAccelerator(LPMSG)
+{
+ return NOERROR;
+}
+
+STDMETHODIMP CIIAObj::OnFrameWindowActivate(BOOL)
+{
+ return NOERROR;
+}
+
+STDMETHODIMP CIIAObj::OnDocWindowActivate(BOOL)
+{
+ return NOERROR;
+}
+
+STDMETHODIMP CIIAObj::ResizeBorder(
+ LPCRECT pRect,LPOLEINPLACEUIWINDOW,BOOL bFrame)
+{
+ if(!bFrame) return NOERROR;
+
+ return m_pDocHolder->SetContRects(pRect);
+}
+
+
+STDMETHODIMP CIIAObj::EnableModeless(BOOL)
+{
+ return NOERROR;
+}