<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
I think we're getting somewhere...!<br>
<br>
<div class="moz-cite-prefix">On 24/1/23 18:03, Stephan Bergmann
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:a1e289e5-6ff8-e39e-50a5-ad46b01982c1@redhat.com">I don't
know much about skeletonmaker or Calc add-ins, but <br>
<a moz-do-not-send="true"
href="<https://wiki.documentfoundation.org/Documentation/DevGuide/Spreadsheet_Documents#Spreadsheet_Add-Ins>"><https://wiki.documentfoundation.org/Documentation/DevGuide/Spreadsheet_Documents#Spreadsheet_Add-Ins>
</a> says "The functions that the add-in component exports to the
spreadsheet application have to be defined in a new interface." So
I would assume that -t must specify that interface type. And one
or more -l will be needed to make available that interface type
and all the other UNOIDL entities recursively referenced from it.
So if you have your own type com.example.XMyAddIn in your own
local mytypes.rdb, you'd probably need something like <br>
<blockquote type="cite">-t com.example.XMyAddIn -l
"$OFFICE_HOME"/program/types.rdb -l
"$OFFICE_HOME"/program/types/offapi.rdb -l mytypes.rdb </blockquote>
</blockquote>
<br>
Using the three '-l' options shown above and in the following test
command with <b>no</b><b> '-t' option</b> results in a
skeletonmaker error, presumably because '-t' and '-n' are mandatory
in the 'calc-add-in' command (BUG: the '-t' is displayed in upper
case, which can be misleading given case-sensitivity):<br>
<br>
david@anon:~> "$OFFICE_HOME"/sdk/bin/uno-skeletonmaker
calc-add-in --java5 -l "$OFFICE_PROGRAM_PATH"/types.rdb -l
"$OFFICE_HOME"/program/types/offapi.rdb -l
/home/david/<...path...>/XCalcDL1.rdb -n
org.openoffice.adl.util.CalcDL1 <br>
Error: no type is specified, use the -T option at least once<br>
<br>
Changing the last '-l' to '-t' results in:<br>
ERROR: Unknown entity
'/home/david/<...path...>/XCalcDL1.rdb'<span
style="font-family:monospace"><br>
<br>
</span>However treating the '-t' option as a service rather than an
interface, as follows, works. An <org/openoffice/adl/util>
directory tree is created in the directory where the skeletonmaker
CLI command was run, and a very plausible skeleton CalcDL1.java file
was created in <util> though I haven't been through it in
detail.<br>
<br>
david@anon:~> "$OFFICE_HOME"/sdk/bin/uno-skeletonmaker
calc-add-in --java5 -l "$OFFICE_PROGRAM_PATH"/types.rdb -l
"$OFFICE_HOME"/program/types/offapi.rdb -l
/home/david/<...path...>/XCalcDL1.rdb -n
org.openoffice.adl.util.CalcDL1 -t org.openoffice.adl.util.CalcDL1<br>
david@anon:~> <br>
<br>
<b>COMMENTS</b><br>
<br>
Your comment "[...] So I would assume that -t must specify that
interface type." is what I'd expect too. That's reinforced by the
HELP text which states: "-t <name> specifies a UNOIDL type
name, e.g. com.sun.star.text.XText (can be used more than once".
Not much doubt there...<br>
<br>
There's evidently a discrepancy between the LibreOffice Developer's
Guide, the skeletonmaker HELP text, introductory comments in the
skeletonmaker source code, all other API guides which repeat the
HELP text, and what actually works.<br>
<br>
Most of the initial command & option validation seems to be done
by 'skeletonmaker.cxx' which calls generatePackage() in
'javacompskeleton.cxx' to do the work. But as I mentioned in an
earlier email, I've come across a suggestion somewhere that '-t'
defines a service, not an interface; maybe a change was made which
hasn't been reflected in the Developer's Guide?<br>
<br>
I don't have the time and expertise in C to untangle the source code
and in any case the sources I've looked at are completely devoid of
comments (without which ongoing maintenance is far more difficult
and unreliable!) apart from the introduction to skeletonmaker.cxx.
Should I post another bug report in Bugzilla? - the first was
marked NOTABUG.<br>
<br>
Thanks for your help, Stephan.<br>
<br>
<u>David Lochrin<br>
<br>
</u>
</body>
</html>