1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <iipaobj.hxx>
21 #include <embeddoc.hxx>
24 CIIAObj::CIIAObj(DocumentHolder
* pDocHolder
)
26 m_rDocHolder( pDocHolder
)
36 /* IUnknown methods */
38 STDMETHODIMP
CIIAObj::QueryInterface(REFIID riid
, LPVOID
* ppv
)
42 if(IID_IUnknown
==riid
||
43 IID_IOleWindow
==riid
||
44 IID_IOleInPlaceActiveObject
==riid
)
47 //AddRef any interface we'll return.
50 static_cast<LPUNKNOWN
>(*ppv
)->AddRef();
54 return ResultFromScode(E_NOINTERFACE
);
58 STDMETHODIMP_(ULONG
) CIIAObj::AddRef()
60 return osl_atomic_increment( &m_refCount
);
63 STDMETHODIMP_(ULONG
) CIIAObj::Release()
65 sal_Int32 nCount
= osl_atomic_decrement( &m_refCount
);
72 /* IOleInPlaceActiveObject methods*/
74 STDMETHODIMP
CIIAObj::GetWindow(HWND
*)
79 STDMETHODIMP
CIIAObj::ContextSensitiveHelp(BOOL
)
84 STDMETHODIMP
CIIAObj::TranslateAccelerator(LPMSG
)
89 STDMETHODIMP
CIIAObj::OnFrameWindowActivate(BOOL
)
94 STDMETHODIMP
CIIAObj::OnDocWindowActivate(BOOL
)
99 STDMETHODIMP
CIIAObj::ResizeBorder(
100 LPCRECT pRect
,LPOLEINPLACEUIWINDOW
,BOOL bFrame
)
102 if(!bFrame
) return NOERROR
;
104 if ( !m_rDocHolder
.is() )
107 return m_rDocHolder
->SetContRects(pRect
);
111 STDMETHODIMP
CIIAObj::EnableModeless(BOOL
)
116 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */