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 // SOActionsApproval.h: Definition of the SOActionsApproval class
22 #ifndef INCLUDED_EXTENSIONS_SOURCE_ACTIVEX_SOACTIONSAPPROVAL_H
23 #define INCLUDED_EXTENSIONS_SOURCE_ACTIVEX_SOACTIONSAPPROVAL_H
37 #pragma clang diagnostic push
38 #pragma clang diagnostic ignored "-Wnon-virtual-dtor"
40 #include <so_activex.h>
42 #pragma clang diagnostic pop
47 class SOActionsApproval
:
48 public IDispatchImpl
<ISOActionsApproval
, &IID_ISOActionsApproval
, &LIBID_SO_ACTIVEXLib
>,
49 public ISupportErrorInfo
,
50 public CComObjectRoot
,
51 public CComCoClass
<SOActionsApproval
,&CLSID_SOActionsApproval
>
54 SOActionsApproval() {}
55 virtual ~SOActionsApproval() {}
57 BEGIN_COM_MAP(SOActionsApproval
)
58 COM_INTERFACE_ENTRY(IDispatch
)
59 COM_INTERFACE_ENTRY(ISOActionsApproval
)
60 COM_INTERFACE_ENTRY(ISupportErrorInfo
)
62 #pragma clang diagnostic push
63 #pragma clang diagnostic ignored "-Winconsistent-missing-override"
67 #pragma clang diagnostic pop
69 DECLARE_NOT_AGGREGATABLE(SOActionsApproval
)
70 // Remove the comment from the line above if you don't want your object to
71 // support aggregation.
73 DECLARE_REGISTRY_RESOURCEID(IDR_SODOCUMENTEVENTLISTENER
)
76 STDMETHOD(InterfaceSupportsErrorInfo
)(REFIID riid
) override
;
79 virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE
approveAction(
80 /* [in] */ long nActionID
,
81 /* [retval][out] */ boolean
*pbApproval
) override
83 // only PreventClose is approved
85 *pbApproval
= ( nActionID
== 1 );
90 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_Bridge_implementedInterfaces(
91 /* [retval][out] */ SAFEARRAY __RPC_FAR
* __RPC_FAR
*pVal
) override
93 *pVal
= SafeArrayCreateVector( VT_BSTR
, 0, 1 );
99 CComBSTR
aInterface( OLESTR( "com.sun.star.embed.XActionsApproval" ) );
100 SafeArrayPutElement( *pVal
, &ix
, aInterface
);
106 #endif // INCLUDED_EXTENSIONS_SOURCE_ACTIVEX_SOACTIONSAPPROVAL_H
108 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */