merge the formfield patch from ooo-build
[ooovba.git] / offapi / com / sun / star / sheet / XFormulaOpCodeMapper.idl
blob2877c72b4440d3b8acc6ae6acedb80f100b6a61a
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XFormulaOpCodeMapper.idl,v $
10 * $Revision: 1.3 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef __com_sun_star_sheet_XFormulaOpCodeMapper_idl__
32 #define __com_sun_star_sheet_XFormulaOpCodeMapper_idl__
34 #ifndef __com_sun_star_sheet_FormulaOpCodeMapEntry_idl__
35 #include <com/sun/star/sheet/FormulaOpCodeMapEntry.idl>
36 #endif
38 #ifndef __com_sun_star_lang_IllegalArgumentException_idl__
39 #include <com/sun/star/lang/IllegalArgumentException.idl>
40 #endif
42 //=============================================================================
44 module com { module sun { module star { module sheet {
46 //=============================================================================
48 /** gives access to spreadsheet compiler token interns.
50 interface XFormulaOpCodeMapper
52 //-------------------------------------------------------------------------
54 /** OpCode value used for external Add-In functions.
56 <p>Needed to be able to identify which of the function names map to an
57 Add-In implementation where this OpCode is used in the returned
58 mapping and the programmatical name is available as additional
59 information.</p>
61 [attribute, readonly] long OpCodeExternal;
63 //-------------------------------------------------------------------------
65 /** OpCode value used for unknown functions.
67 <p>Used to identify which of the function names queried with
68 <member>getMappings</member> are unknown to the implementation.</p>
70 [attribute, readonly] long OpCodeUnknown;
72 //-------------------------------------------------------------------------
74 /** returns a sequence of tokens matching the input sequence of
75 strings in order.
77 @param Names
78 Sequence of names to be mapped. These can be function names,
79 operators, separators and other symbols the formula compiler
80 knows.
82 @param Language
83 Formula language to be used, one of <type>FormulaLanguage</type>
84 constants. If a constant unknown to the implementation is passed,
85 <type scope="com::sun::star::lang">IllegalArgumentException</type>
86 is thrown.
88 @returns
89 a sequence of <type>FormulaToken</type> matching the input
90 sequence in order.
92 <p>Each string element in parameter Names according to the formula
93 language in parameter Language is mapped to a <type>FormulaToken
94 </type> containing the internal OpCode used by the spreadsheet
95 application in <member>FormulaToken::OpCode</member> and by
96 contract maybe additional information in <member>
97 FormulaToken::Data</member>.</p>
99 <p>The order of the FormulaToken sequence returned matches the
100 input order of the string sequence.</p>
102 <p>An unknown Name string gets the OpCode value of <member>
103 OpCodeUnknown</member> assigned.</p>
105 <p>Additional information in <member>FormulaToken::Data</member>
106 is returned for:
107 <ul>
108 <li>Add-in names: the programmatical name. The OpCode value used
109 for add-ins can be queried with the <member>OpCodeExternal</member>
110 getter method.</li>
111 </ul></p>
113 sequence< FormulaToken > getMappings(
114 [in] sequence< string > Names,
115 [in] long Language )
116 raises( com::sun::star::lang::IllegalArgumentException );
118 //-------------------------------------------------------------------------
120 /** returns a sequence of map entries for all available elements of
121 a given formula language.
123 @param Language
124 Formula language to be used, one of <type>FormulaLanguage</type>
125 constants. If a constant unknown to the implementation is passed,
126 <type scope="com::sun::star::lang">IllegalArgumentException</type>
127 is thrown.
129 @param Groups
130 Group of mappings to be returned, a bit mask of <type>
131 FormulaMapGroup</type> constants.
133 @returns
134 Sequence of <type>FormulaOpCodeMapEntry</type>.
136 <p>Each element of the formula language in parameter Language is
137 mapped to a <type>FormulaToken</type> containing the internal
138 OpCode used by the spreadsheet application in <member>
139 FormulaToken::OpCode</member> and by contract maybe additional
140 information in <member>FormulaToken::Data</member>. See <member>
141 getMappings</member> for more details.</p>
143 sequence< FormulaOpCodeMapEntry > getAvailableMappings(
144 [in] long Language, [in] long Groups )
145 raises( com::sun::star::lang::IllegalArgumentException );
149 //=============================================================================
151 service FormulaOpCodeMapper : XFormulaOpCodeMapper;
153 //=============================================================================
155 }; }; }; };
157 #endif