1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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
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
57 Sequence of names to be mapped. These can be function names,
58 operators, separators and other symbols the formula compiler
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
68 a sequence of FormulaToken matching the input
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
87 <li>Add-in names: the programmatic name. The OpCode value used
88 for add-ins can be queried with the #OpCodeExternal
92 sequence
< FormulaToken
> getMappings
(
93 [in] sequence
< string > Names
,
95 raises
( com
::sun
::star
::lang
::IllegalArgumentException
);
98 /** returns a sequence of map entries for all available elements of
99 a given formula 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
108 Group of mappings to be returned, a bit mask of
109 FormulaMapGroup constants.
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
);
132 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */