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_XVBAMacroResolver_idl__
25#define __com_sun_star_script_vba_XVBAMacroResolver_idl__
26
27#include <com/sun/star/lang/IllegalArgumentException.idl>
28
29//=============================================================================
30
31module com {  module sun {  module star {  module script { module vba {
32
33//=============================================================================
34
35/** Converts VBA macro names to script URLs and vice versa.
36 */
37interface XVBAMacroResolver
38{
39    //-------------------------------------------------------------------------
40
41    /** Returns the script URL representing the passed VBA macro name.
42
43        @param aVBAMacroName
44            The VBA macro name to be resolved to a script URL. The macro name
45            may consist of up to three parts, divided by periods. The first two
46            parts are optional. The first part represents the VBA project name.
47            The second part represents the module name. The third part
48            represents the procedure name. Example: All the VBA macro names
49            "VBAProject.Module1.TestMacro", "Module1.TestMacro",
50            "VBAProject.TestMacro", and "TestMacro" may refer to the same VBA
51            procedure located in "Module" of the project "VBAProject". If the
52            module name is missing, then all modules are searched for a macro
53            with the specified name.
54
55        @return
56            The script URL referring to the passed VBA macro.
57
58        @throws <type scope="::com::sun::star::lang">IllegalArgumentException</type>
59            if a macro with the passed name does not exist.
60    **/
61    string resolveVBAMacroToScriptURL( [in] string aVBAMacroName )
62        raises (::com::sun::star::lang::IllegalArgumentException);
63
64    //-------------------------------------------------------------------------
65
66    /** Returns the VBA macro name for a macro with the passed script URL.
67
68        @param aScriptURL
69            The script URL to be resolved to a VBA macro name. Must be a
70            document-local script.
71
72        @return
73            The VBA macro name referring to a macro with the passed script URL.
74
75        @throws <type scope="::com::sun::star::lang">IllegalArgumentException</type>
76            if a macro with the passed name does not exist.
77    **/
78    string resolveScriptURLtoVBAMacro( [in] string aScriptURL )
79        raises (::com::sun::star::lang::IllegalArgumentException);
80
81    //-------------------------------------------------------------------------
82};
83
84//=============================================================================
85
86}; }; }; }; };
87
88//=============================================================================
89
90#endif
91