Difference between revisions of "Documentation/DevGuide/Spreadsheets/Spreadsheet Add-Ins"
m (1 revision(s)) |
(Category:Calc Category:Add-In for DPL in Calc/Add-In) |
||
Line 34: | Line 34: | ||
{{PDL1}} | {{PDL1}} | ||
[[Category: Spreadsheet Documents]] | [[Category: Spreadsheet Documents]] | ||
+ | [[Category:Calc]] | ||
+ | [[Category:Add-In]] |
Revision as of 13:57, 4 April 2008
An add-in component is used to add new functions to the spreadsheet application that can be used in cell formulas, such as the built-in functions. A spreadsheet add-in is a UNO component. The chapter Writing UNO Components describes how to write and deploy a UNO component.
The functions that the add-in component exports to the spreadsheet application have to be defined in a new interface. The function names in the interface, together with the component's service name, are used internally to identify an add-in function. For a list of the supported types for function arguments and return values, see the com.sun.star.sheet.AddIn service description. An example interface that defines two functions is similar to the following code:
#include <com/sun/star/uno/XInterface.idl> #include <com/sun/star/sheet/XVolatileResult.idl> module com { module sun { module star { module sheet { module addin { interface XExampleAddIn : com::sun::star::uno::XInterface { /// Sample function that just increments a value. long getIncremented( [in] long nValue ); /// Sample function that returns a volatile result. com::sun::star::sheet::XVolatileResult getCounter( [in] string aName ); }; }; }; }; }; };
In addition to this interface, the add-in has to implement the interfaces from the com.sun.star.sheet.AddIn service and the usual interfaces every component has to support.
Content on this page is licensed under the Public Documentation License (PDL). |