Language:

The Free and Open Productivity Suite
Apache OpenOffice 4.1.4 released

Developer's Guide

API

SDK

Tips 'n' Tricks

Miscellaneous


:: com :: sun :: star :: sheet ::

interface XFormulaOpCodeMapper
Description
gives access to spreadsheet compiler token interns.

Methods' Summary
getMappings returns a sequence of tokens matching the input sequence of strings in order.  
getAvailableMappings returns a sequence of map entries for all available elements of a given formula language.  
Attributes' Summary
OpCodeExternal OpCode value used for external Add-In functions.  
OpCodeUnknown OpCode value used for unknown functions.  
Methods' Details
getMappings
sequence< FormulaToken >
getMappings( [in] sequence< string >  Names,
[in] long  Language )
raises( ::com::sun::star::lang::IllegalArgumentException );

Description
returns a sequence of tokens matching the input sequence of strings in order.
Parameter Names
Sequence of names to be mapped. These can be function names, operators, separators and other symbols the formula compiler knows.
Parameter Language
Formula language to be used, one of FormulaLanguage constants. If a constant unknown to the implementation is passed, ::com::sun::star::lang::IllegalArgumentException is thrown.
Returns
a sequence of FormulaToken matching the input sequence in order.

Each string element in parameter Names according to the formula language in parameter Language is mapped to a FormulaToken containing the internal OpCode used by the spreadsheet application in FormulaToken::OpCode and by contract maybe additional information in FormulaToken::Data.

The order of the FormulaToken sequence returned matches the input order of the string sequence.

An unknown Name string gets the OpCode value of OpCodeUnknown assigned.

Additional information in FormulaToken::Data is returned for:

  • Add-in names: the programmatical name. The OpCode value used for add-ins can be queried with the OpCodeExternal getter method.

getAvailableMappings
sequence< FormulaOpCodeMapEntry >
getAvailableMappings( [in] long  Language,
[in] long  Groups )
raises( ::com::sun::star::lang::IllegalArgumentException );

Description
returns a sequence of map entries for all available elements of a given formula language.
Parameter Language
Formula language to be used, one of FormulaLanguage constants. If a constant unknown to the implementation is passed, ::com::sun::star::lang::IllegalArgumentException is thrown.
Parameter Groups
Group of mappings to be returned, a bit mask of FormulaMapGroup constants.
Returns
Sequence of FormulaOpCodeMapEntry.

Each element of the formula language in parameter Language is mapped to a FormulaToken containing the internal OpCode used by the spreadsheet application in FormulaToken::OpCode and by contract maybe additional information in FormulaToken::Data. See getMappings for more details.

Attributes' Details
OpCodeExternal
[ readonly ] long OpCodeExternal;
Description
OpCode value used for external Add-In functions.

Needed to be able to identify which of the function names map to an Add-In implementation where this OpCode is used in the returned mapping and the programmatical name is available as additional information.

OpCodeUnknown
[ readonly ] long OpCodeUnknown;
Description
OpCode value used for unknown functions.

Used to identify which of the function names queried with getMappings are unknown to the implementation.

Top of Page

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache and the Apache feather logo are trademarks of The Apache Software Foundation. OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.