Bug 42005 - Calc Add-In functions can not handle parameters of "hyper" type.
Summary: Calc Add-In functions can not handle parameters of "hyper" type.
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Extensions (show other bugs)
(earliest affected)
3.4.3 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
Depends on:
Reported: 2011-10-19 11:36 UTC by mgasdf111
Modified: 2011-10-21 06:42 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Note You need to log in before you can comment on or make changes to this bug.
Description mgasdf111 2011-10-19 11:36:33 UTC
Create Java Calc Add-In project in NetBeans. Create a Java function with a parameter of type "long". Map this parameter in IDL file using "hyper" type. Create and install an extension. Function doesn't work and parameter is not visible in Function Wizard:

Java function:

   public int fName2(long p1) {
      return 42;

IDL map:
   Java <=> IDL
   "int" <=> "long"
   "long" <=> "hyper"

   long fName2([in] hyper p1);


Use "Object"

   public int fName2(Object p1) {
      return 42;

and it map as "any":

   long fName2([in] any p1);

It's not perfect because "any" type is visible as "optional" parameter in Function Wizard.
Comment 1 Stephan Bergmann 2011-10-21 01:21:19 UTC
Calc add-ins by design do not support UNO type hyper, only UNO types long, double, etc.  See <http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Spreadsheets/Spreadsheet_Add-Ins> and the description of the com.sun.star.sheet.AddIn service linked from there.
Comment 2 mgasdf111 2011-10-21 06:42:06 UTC
Java "int" is mapped in IDL file as "long".
Java "long" is mapped in IDL file as "hyper".
IDL "unsigned hyper" works fine with Java "long" but "hyper" does not.

(table: Further with IDL)