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>
24 STDMETHODIMP
EmbedDocument_Impl::GetWindow(HWND
*hWnd
)
26 OSL_ENSURE(m_pDocHolder
,"no document for inplace activation");
28 *hWnd
= m_pDocHolder
->GetTopMostWinHandle();
35 STDMETHODIMP
EmbedDocument_Impl::ContextSensitiveHelp(BOOL
)
40 STDMETHODIMP
EmbedDocument_Impl::InPlaceDeactivate()
42 // no locking is used since the OLE must use the same thread always
43 if ( m_bIsInVerbHandling
)
46 BooleanGuard_Impl
aGuard( m_bIsInVerbHandling
);
48 m_pDocHolder
->InPlaceDeactivate();
50 // the inplace object needs the notification after the storing ( on deactivating )
51 // if it happens before the storing the replacement might not be updated
57 STDMETHODIMP
EmbedDocument_Impl::UIDeactivate()
59 // no locking is used since the OLE must use the same thread always
60 if ( m_bIsInVerbHandling
)
63 BooleanGuard_Impl
aGuard( m_bIsInVerbHandling
);
66 m_pDocHolder
->UIDeactivate();
68 // the inplace object needs the notification after the storing ( on deactivating )
69 // if it happens before the storing the replacement might not be updated
75 STDMETHODIMP
EmbedDocument_Impl::SetObjectRects(LPCRECT aRect
, LPCRECT aClip
)
77 OSL_ENSURE(m_pDocHolder
,"no document for inplace activation");
79 return m_pDocHolder
->SetObjectRects(aRect
,aClip
);
82 STDMETHODIMP
EmbedDocument_Impl::ReactivateAndUndo()
87 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */