1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23
24#ifndef __com_sun_star_script_vba_XVBAEventProcessor_idl__
25#define __com_sun_star_script_vba_XVBAEventProcessor_idl__
26
27#include <com/sun/star/uno/XInterface.idl>
28#include <com/sun/star/lang/IllegalArgumentException.idl>
29#include <com/sun/star/util/VetoException.idl>
30
31//=============================================================================
32
33module com {  module sun {  module star {  module script { module vba {
34
35//=============================================================================
36
37/** Executes VBA event handlers.
38 */
39interface XVBAEventProcessor
40{
41    //-------------------------------------------------------------------------
42
43    /** Returns whether a VBA event handler exists.
44
45        @param nEventId
46            The identifier of the event. Must be a constant from <type>VBAEventId</type>.
47
48        @param aArgs
49            Additional arguments needed to identify some event handlers, e.g. a
50            sheet index for spreadsheet events.
51
52        @return
53            <TRUE/>, if the VBA event handler exists.
54
55        @throws <type scope="::com::sun::star::lang">IllegalArgumentException</type>
56            if the passed event identifier is not supported, or if the passed
57            specifier is required but invalid.
58    **/
59    boolean hasVbaEventHandler( [in] long nEventId, [in] sequence< any > aArgs )
60        raises (::com::sun::star::lang::IllegalArgumentException);
61
62    //-------------------------------------------------------------------------
63
64    /** Executes a VBA event handler.
65
66        @param nEventId
67            The identifier of the event. Must be a constant from <type>VBAEventId</type>.
68
69        @param aArgs
70            The input arguments needed to create the argument list of the VBA
71            event handler.
72
73        @return
74            <TRUE/>, if event handing is enabled, and the event handler macro
75            exists and has been invoked.
76
77        @throws <type scope="::com::sun::star::lang">IllegalArgumentException</type>
78            if the passed event identifier is not supported, or if the passed
79            arguments do not conform to the arguments expected by the specified
80            event.
81
82        @throws <type scope="::com::sun::star::util">VetoException</type>
83            if the VBA event handler has indicated to veto the event.
84    **/
85    boolean processVbaEvent( [in] long nEventId, [in] sequence< any > aArgs )
86        raises (::com::sun::star::lang::IllegalArgumentException,
87                ::com::sun::star::util::VetoException);
88
89    //-------------------------------------------------------------------------
90};
91
92//=============================================================================
93
94}; }; }; }; };
95
96//=============================================================================
97
98#endif
99