1 // SOActionsApproval.h: Definition of the SOActionsApproval class
3 //////////////////////////////////////////////////////////////////////
5 #if !defined __SODOCUMENTEVENTLISTENER_H_
6 #define __SODOCUMENTEVENTLISTENER_H_
10 #endif // _MSC_VER > 1000
12 #include "resource.h" // main symbols
17 #if defined(_MSC_VER) && (_MSC_VER >= 1300)
23 #include "so_activex.h"
25 /////////////////////////////////////////////////////////////////////////////
28 class SOActionsApproval
:
29 public IDispatchImpl
<ISOActionsApproval
, &IID_ISOActionsApproval
, &LIBID_SO_ACTIVEXLib
>,
30 public ISupportErrorInfo
,
31 public CComObjectRoot
,
32 public CComCoClass
<SOActionsApproval
,&CLSID_SOActionsApproval
>
35 SOActionsApproval() {}
36 virtual ~SOActionsApproval() {}
38 BEGIN_COM_MAP(SOActionsApproval
)
39 COM_INTERFACE_ENTRY(IDispatch
)
40 COM_INTERFACE_ENTRY(ISOActionsApproval
)
41 COM_INTERFACE_ENTRY(ISupportErrorInfo
)
43 DECLARE_NOT_AGGREGATABLE(SOActionsApproval
)
44 // Remove the comment from the line above if you don't want your object to
45 // support aggregation.
47 DECLARE_REGISTRY_RESOURCEID(IDR_SODOCUMENTEVENTLISTENER
)
50 STDMETHOD(InterfaceSupportsErrorInfo
)(REFIID riid
);
53 virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE
approveAction(
54 /* [in] */ long nActionID
,
55 /* [retval][out] */ boolean
*pbApproval
)
57 // only PreventClose is approved
59 *pbApproval
= ( nActionID
== 1 );
64 virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE
get_Bridge_implementedInterfaces(
65 /* [retval][out] */ SAFEARRAY __RPC_FAR
* __RPC_FAR
*pVal
)
67 *pVal
= SafeArrayCreateVector( VT_BSTR
, 0, 1 );
73 CComBSTR
aInterface( OLESTR( "com.sun.star.embed.XActionsApproval" ) );
74 SafeArrayPutElement( *pVal
, &ix
, aInterface
);
80 #endif // __SODOCUMENTEVENTLISTENER_H_