Issue 95707 - addin function that has a ':' in the name doesn't work in OOo3.0
Summary: addin function that has a ':' in the name doesn't work in OOo3.0
Status: CLOSED NOT_AN_OOO_ISSUE
Alias: None
Product: Calc
Classification: Application
Component: programming (show other issues)
Version: OOo 3.0
Hardware: Sun All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: spreadsheet
QA Contact: issues@sc
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-31 15:58 UTC by randyjones
Modified: 2008-11-06 13:46 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Files needed to build a sample addin that demonstrates this issue. (15.37 KB, text/plain)
2008-10-31 16:03 UTC, randyjones
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description randyjones 2008-10-31 15:58:51 UTC
I have a calc addin created several years ago (circa 2000) using the xdfa.c and
xrot.c examples as starting points. The addin is "installed" by copying the
compiled shared lib to OOo_INSTALL_DIR/program/addin/ . After this the addin
will show up under the "Add-in" category in Calc by going to "Insert |
Function..." and then selecting "Add-in" for the category. To actually use the
addin an example would be in cell B1 "=pn_info:descr(A1)". This will then place
the description of the part number (contained in cell A1) into cell B1.

This addin has functioned perfectly over the years up to and including 00o2.4.1.
In OOo3.0 the addin appears in "Insert | Function..." "Add-in" category like it
should. However when attempting to actually use the addin [ie
=pn_info:descr(A1)] the cell contents read "#NAME?" as if you incorrectly
spelled a function name.

This addin creates several functions:
pn_info:descr(), pn_info:um(), pn_info:price_code(), and so on.

If I replace the ':' with a '_' so the function name goes from pn_info:descr()
to pn_info_descr() then the addin will function in OO 3.0. This is certainly a
workaround. However a very bad workaround because we have hundreds if not
thousands of existing OOo spreadsheets that currently use the 9 functions
provided by this addin. This would be a huge job to locate all the affected
spreadsheets and redo all the formulas.
Comment 1 randyjones 2008-10-31 16:03:42 UTC
Created attachment 57619 [details]
Files needed to build a sample addin that demonstrates this issue.
Comment 2 ooo 2008-11-06 13:46:03 UTC
The ':' colon is an invalid character for function names, it was mere luck that
it worked before. With OOo3.0 ':' is supported as the range operator, so what
the expression =pn_info:descr(A1) actually describes now is pn_info being a
named cell or cell range and descr(A1) returning a cell or range address, and
the result of the : operator would be a range encompassing the outer edges of both.

Stick with [A-Z][A-Z0-9_.]+ for function names to be on the safe side.
Comment 3 ooo 2008-11-06 13:46:32 UTC
Closing.