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 <embeddoc.hxx>
21 #include <osl/diagnose.h>
23 COM_DECLSPEC_NOTHROW STDMETHODIMP
EmbedDocument_Impl::GetWindow(HWND
* hWnd
)
25 OSL_ENSURE(m_pDocHolder
, "no document for inplace activation");
27 *hWnd
= m_pDocHolder
->GetTopMostWinHandle();
34 COM_DECLSPEC_NOTHROW STDMETHODIMP
EmbedDocument_Impl::ContextSensitiveHelp(BOOL
) { return NOERROR
; }
36 COM_DECLSPEC_NOTHROW STDMETHODIMP
EmbedDocument_Impl::InPlaceDeactivate()
38 // no locking is used since the OLE must use the same thread always
39 if (m_bIsInVerbHandling
)
42 BooleanGuard_Impl
aGuard(m_bIsInVerbHandling
);
44 m_pDocHolder
->InPlaceDeactivate();
46 // the inplace object needs the notification after the storing ( on deactivating )
47 // if it happens before the storing the replacement might not be updated
53 COM_DECLSPEC_NOTHROW STDMETHODIMP
EmbedDocument_Impl::UIDeactivate()
55 // no locking is used since the OLE must use the same thread always
56 if (m_bIsInVerbHandling
)
59 BooleanGuard_Impl
aGuard(m_bIsInVerbHandling
);
61 m_pDocHolder
->UIDeactivate();
63 // the inplace object needs the notification after the storing ( on deactivating )
64 // if it happens before the storing the replacement might not be updated
70 COM_DECLSPEC_NOTHROW STDMETHODIMP
EmbedDocument_Impl::SetObjectRects(LPCRECT aRect
, LPCRECT aClip
)
72 OSL_ENSURE(m_pDocHolder
, "no document for inplace activation");
74 return m_pDocHolder
->SetObjectRects(aRect
, aClip
);
77 COM_DECLSPEC_NOTHROW STDMETHODIMP
EmbedDocument_Impl::ReactivateAndUndo() { return E_NOTIMPL
; }
79 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */