Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / offapi / com / sun / star / sheet / XFormulaOpCodeMapper.idl
blob90fe048dd1ea7465695e630f138670ff968b55e1
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef __com_sun_star_sheet_XFormulaOpCodeMapper_idl__
21 #define __com_sun_star_sheet_XFormulaOpCodeMapper_idl__
23 #include <com/sun/star/sheet/FormulaOpCodeMapEntry.idl>
24 #include <com/sun/star/lang/IllegalArgumentException.idl>
27 module com { module sun { module star { module sheet {
30 /** gives access to spreadsheet compiler token interns.
32 interface XFormulaOpCodeMapper
35 /** OpCode value used for external Add-In functions.
37 <p>Needed to be able to identify which of the function names map to an
38 Add-In implementation where this OpCode is used in the returned
39 mapping and the programmatic name is available as additional
40 information.</p>
42 [attribute, readonly] long OpCodeExternal;
45 /** OpCode value used for unknown functions.
47 <p>Used to identify which of the function names queried with
48 getMappings() are unknown to the implementation.</p>
50 [attribute, readonly] long OpCodeUnknown;
53 /** returns a sequence of tokens matching the input sequence of
54 strings in order.
56 @param Names
57 Sequence of names to be mapped. These can be function names,
58 operators, separators and other symbols the formula compiler
59 knows.
61 @param Language
62 Formula language to be used, one of FormulaLanguage
63 constants. If a constant unknown to the implementation is passed,
64 com::sun::star::lang::IllegalArgumentException
65 is thrown.
67 @returns
68 a sequence of FormulaToken matching the input
69 sequence in order.
71 <p>Each string element in parameter Names according to the formula
72 language in parameter Language is mapped to a FormulaToken
73 containing the internal OpCode used by the spreadsheet
74 application in FormulaToken::OpCode and by
75 contract maybe additional information in
76 FormulaToken::Data.</p>
78 <p>The order of the FormulaToken sequence returned matches the
79 input order of the string sequence.</p>
81 <p>An unknown Name string gets the OpCode value of
82 #OpCodeUnknown assigned.</p>
84 <p>Additional information in FormulaToken::Data
85 is returned for:
86 <ul>
87 <li>Add-in names: the programmatic name. The OpCode value used
88 for add-ins can be queried with the #OpCodeExternal
89 getter method.</li>
90 </ul></p>
92 sequence< FormulaToken > getMappings(
93 [in] sequence< string > Names,
94 [in] long Language )
95 raises( com::sun::star::lang::IllegalArgumentException );
98 /** returns a sequence of map entries for all available elements of
99 a given formula language.
101 @param Language
102 Formula language to be used, one of FormulaLanguage
103 constants. If a constant unknown to the implementation is passed,
104 com::sun::star::lang::IllegalArgumentException
105 is thrown.
107 @param Groups
108 Group of mappings to be returned, a bit mask of
109 FormulaMapGroup constants.
111 @returns
112 Sequence of FormulaOpCodeMapEntry.
114 <p>Each element of the formula language in parameter Language is
115 mapped to a FormulaToken containing the internal
116 OpCode used by the spreadsheet application in
117 FormulaToken::OpCode and by contract maybe additional
118 information in FormulaToken::Data. See
119 getMappings() for more details.</p>
121 sequence< FormulaOpCodeMapEntry > getAvailableMappings(
122 [in] long Language, [in] long Groups )
123 raises( com::sun::star::lang::IllegalArgumentException );
128 }; }; }; };
130 #endif
132 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */