Juergen Schmidt wrote:
i tried it with a OOo 3.1.1 and a development build dev300m61. Both
works as expected.
Have you used the NB plugin wizard to create your project? How does
your CalcAddins.xcu looks like?
Well i have no real idea what's going wrong in your case.
Juergen
Irné Barnard wrote:
Thanks I tried that. The compile worked fine, however testing in
OOo3.1 crashes if I use the formula wizard. Here's the code:
IDL: string Num2Eng([in] double nValue, [in] sequence< any > sFormat);
Java:
public String Num2Eng(double nValue, Object[] sFormat) {
String sResult = new String();
sResult = String.valueOf(nValue);
if (sFormat.length > 0) {
sResult.concat(", ");
sResult.concat(String.valueOf(sFormat.length));
sResult.concat(", ");
sResult.concat(sFormat.toString());
}
return sResult;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
Yes I'm using NetBeans 6.7.1 with the new OOoAPI Plugin 2.0.5. And my
OOo is version 3.1.1. I have modified the IDL & XCU since creating the
project using the wizard. Attached the XCU.
But I'm starting to think there's something else wrong, since the other
formulas (not using optional parameters) are also crashing OOo. I'll try
removing any code and / or modifications I made and see what it was.
--
Regards Irné Barnard
<?xml version='1.0' encoding='UTF-8'?>
<oor:component-data xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" oor:name="CalcAddIns" oor:package="org.openoffice.Office">
<node oor:name="AddInInfo">
<node oor:name="com.IrneOOoAddons.calc.Notations.IrneOOoCalcNotations" oor:op="replace">
<node oor:name="AddInFunctions">
<node oor:name="Num2Eng" oor:op="replace">
<prop oor:name="DisplayName">
<value xml:lang="en">Num2Eng</value>
</prop>
<prop oor:name="Description">
<value xml:lang="en">Formula to convert a number to engineering format, result is a string
Usage:
Num2Eng(10021.3) results in 10.0213E+3
Num2Eng(10021.3;"0.00+3E") results in 10.02E+3
Num2Eng(10021.3;"0+3E00") results in 1E+03</value>
</prop>
<prop oor:name="Category">
<value>Text</value>
</prop>
<prop oor:name="CompatibilityName">
<value xml:lang="en">Num2Eng</value>
</prop>
<node oor:name="Parameters">
<node oor:name="nValue" oor:op="replace">
<prop oor:name="DisplayName">
<value xml:lang="en">Value</value>
</prop>
<prop oor:name="Description">
<value xml:lang="en">Number to be converted</value>
</prop>
</node>
<node oor:name="sFormat" oor:op="replace">
<prop oor:name="DisplayName">
<value xml:lang="en">Format</value>
</prop>
<prop oor:name="Description">
<value xml:lang="en">Format string.</value>
</prop>
</node>
</node>
</node>
<node oor:name="Eng2Num" oor:op="replace">
<prop oor:name="DisplayName">
<value xml:lang="en">Eng2Num</value>
</prop>
<prop oor:name="Description">
<value xml:lang="en">Formula for converting engineering format text to a number for calculations. Works the same as the Value formula</value>
</prop>
<prop oor:name="Category">
<value>Text</value>
</prop>
<prop oor:name="CompatibilityName">
<value xml:lang="en">Eng2Num</value>
</prop>
<node oor:name="Parameters">
<node oor:name="sValue" oor:op="replace">
<prop oor:name="DisplayName">
<value xml:lang="en">Value</value>
</prop>
<prop oor:name="Description">
<value xml:lang="en">The string notation to be converted.</value>
</prop>
</node>
</node>
</node>
<node oor:name="Num2SI" oor:op="replace">
<prop oor:name="DisplayName">
<value xml:lang="en">Num2SI</value>
</prop>
<prop oor:name="Description">
<value xml:lang="en">Formula for converting a number to a string using SI notation
Usage:
Num2Si(102) results in 0.102k
Num2Si(102;"0.00SI") results in 0.10k
Num2Si(102;"0.00si") results in 1.02h</value>
</prop>
<prop oor:name="Category">
<value>Text</value>
</prop>
<prop oor:name="CompatibilityName">
<value xml:lang="en">Num2SI</value>
</prop>
<node oor:name="Parameters">
<node oor:name="nValue" oor:op="replace">
<prop oor:name="DisplayName">
<value xml:lang="en">Value</value>
</prop>
<prop oor:name="Description">
<value xml:lang="en">Number to be converted</value>
</prop>
</node>
<node oor:name="sFormat" oor:op="replace">
<prop oor:name="DisplayName">
<value xml:lang="en">Decimals</value>
</prop>
<prop oor:name="Description">
<value xml:lang="en">Format string.</value>
</prop>
</node>
</node>
</node>
<node oor:name="SI2Num" oor:op="replace">
<prop oor:name="DisplayName">
<value xml:lang="en">SI2Num</value>
</prop>
<prop oor:name="Description">
<value xml:lang="en">Formula for converting SI notation back to a number. Usage same as Value formula</value>
</prop>
<prop oor:name="Category">
<value>Add-In</value>
</prop>
<prop oor:name="CompatibilityName">
<value xml:lang="en">SI2Num</value>
</prop>
<node oor:name="Parameters">
<node oor:name="sValue" oor:op="replace">
<prop oor:name="DisplayName">
<value xml:lang="en">Value</value>
</prop>
<prop oor:name="Description">
<value xml:lang="en">The string notation to be converted.</value>
</prop>
</node>
</node>
</node>
</node>
</node>
</node>
</oor:component-data>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]