Calc Add-in Java extension: assign function to a new category

Eike Rathke erack at redhat.com
Wed Aug 5 03:47:34 PDT 2015


Hi Mikhail,

On Monday, 2015-08-03 00:53:40 +0300, Mikhail Zemlyanukha wrote:

> In LibO Calc Java extension, in XAddIn interface there're 2 functions:
> getProgrammaticCategoryName() and getDisplayCategoryName(). From
> Javadoc I see that getProgrammaticCategoryName must return one of
> existing categories, while I would like to have a new one.
> 
> It is not clear if getDisplayCategoryName can return a new category.
> But it is not called anyway, as I can see from logs.

getProgrammaticCategoryName() is called though, if you take a look at
the existing Add-Ins, for example scaddins/source/datefunc/datefunc.cxx,
you'll see that getDisplayCategoryName() calls
getProgrammaticCategoryName(), or returns identical names as in
scaddins/source/analysis/analysis.cxx

The getDisplayCategoryName() probably was meant to return translated
category names for localized Add-Ins, but..

The categories are maintained in Calc and are translated for localized
UI languages. If an unknown category is returned, the categorization
falls back to the general Add-In category.

> Is it possible to create a new category?

Only if Calc and the Function Wizard are adapted to handle yet unknown
categories. What category do you have in mind anyway?

> I posted this question at stackoverflow too:
> http://stackoverflow.com/q/31777014/1028256

Btw, we have our own Ask instance running at http://ask.libreoffice.org/

  Eike

-- 
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
GPG key "ID" 0x65632D3A - 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 2D3A
Better use 64-bit 0x6A6CD5B765632D3A here is why: https://evil32.com/
Care about Free Software, support the FSFE https://fsfe.org/support/?erack
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20150805/731b014d/attachment.sig>


More information about the LibreOffice mailing list