1/*************************************************************************
2 *
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
6 *
7 * OpenOffice.org - a multi-platform office productivity suite
8 *
9 * This file is part of OpenOffice.org.
10 *
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
14 *
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
20 *
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org.  If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
25 *
26 ************************************************************************/
27
28#ifndef __com_sun_star_script_vba_XVBAMacroResolver_idl__
29#define __com_sun_star_script_vba_XVBAMacroResolver_idl__
30
31#include <com/sun/star/lang/IllegalArgumentException.idl>
32
33//=============================================================================
34
35module com {  module sun {  module star {  module script { module vba {
36
37//=============================================================================
38
39/** Converts VBA macro names to script URLs and vice versa.
40 */
41interface XVBAMacroResolver
42{
43    //-------------------------------------------------------------------------
44
45    /** Returns the script URL representing the passed VBA macro name.
46
47        @param aVBAMacroName
48            The VBA macro name to be resolved to a script URL. The macro name
49            may consist of up to three parts, divided by periods. The first two
50            parts are optional. The first part represents the VBA project name.
51            The second part represents the module name. The third part
52            represents the procedure name. Example: All the VBA macro names
53            "VBAProject.Module1.TestMacro", "Module1.TestMacro",
54            "VBAProject.TestMacro", and "TestMacro" may refer to the same VBA
55            procedure located in "Module" of the project "VBAProject". If the
56            module name is missing, then all modules are searched for a macro
57            with the specified name.
58
59        @return
60            The script URL referring to the passed VBA macro.
61
62        @throws <type scope="::com::sun::star::lang">IllegalArgumentException</type>
63            if a macro with the passed name does not exist.
64    **/
65    string resolveVBAMacroToScriptURL( [in] string aVBAMacroName )
66        raises (::com::sun::star::lang::IllegalArgumentException);
67
68    //-------------------------------------------------------------------------
69
70    /** Returns the VBA macro name for a macro with the passed script URL.
71
72        @param aScriptURL
73            The script URL to be resolved to a VBA macro name. Must be a
74            document-local script.
75
76        @return
77            The VBA macro name referring to a macro with the passed script URL.
78
79        @throws <type scope="::com::sun::star::lang">IllegalArgumentException</type>
80            if a macro with the passed name does not exist.
81    **/
82    string resolveScriptURLtoVBAMacro( [in] string aScriptURL )
83        raises (::com::sun::star::lang::IllegalArgumentException);
84
85    //-------------------------------------------------------------------------
86};
87
88//=============================================================================
89
90}; }; }; }; };
91
92//=============================================================================
93
94#endif
95