Hallo Daniel,

Daniel Rentz schrieb:
Hello,

Regina Henschel schrieb:

== A ==

I have added SEC, CSC, SECH, and CSCH, to saFuncTable_Odf. All four
new functions have op-codes. Tests look good:

Reloading directly is correct for ods, xls, sdc, and sxc.
Loading and resaving with StarOffice8 (for ods, sdc, and sxc) and
Excel2010 (for xls) and then loading in my build is correct too.

Good! Did you add them to the sc and oox modules?

I have added them only to saFuncTable_Odf in sc/.../xlformula.cxx. They get the prefix "_xlfnodf.", I see it in the xls file.



== B ==

But I have still questions concerning the new imaginary functions.
Those functions have no op-code. Need I to add them to
saFuncTable_Odf? If yes, how can I do it?

Yes, the filters in sc are used for import/export of the XLS format. On
export, the current behaviour is:
If the function is an add-in function, the XCompatibilityNames interface
is used to retrieve its name used in the XLS file format (see in file
sc/source/filter/excel/xeformula.cxx, in function
XclExpFmlaCompImpl::AppendAddInCallToken(), call to GetExcelName()). So
I would suggest that this interface returns the "_xlfnodf.XYZ" function
names, to not get any name clashes with existing functions in Excel. The
import filter will try to convert these function names back to add-in
functions, again with the mentioned interface. But I do not know if this
will work out of the box. In file sc/source/filter/excel/xiroot.cxx,
there is a function XclImpRoot::GetScAddInName() that calls
GetCalcName() if you want to debug it.

I have added the imaginary functions to saFuncTable_Odf with opcode ocNoName now. The prefix "_xlfnodf." is not set. It does not work "out of the box". You do not notice the missing prefix in the test results, when testing the round trip mybuild -> Excel -> mybuild. There the cell entries are OK. But you see it in the round trip in xls format mybuild -> OOo243 -> mybuild, which results in #MACRO?, and if you look into the xls file with an editor.

 if you want to debug it

There is no hurry to implement the new functions. So I will try to make it correct and learn a little bit about the filters.

kind regards
Regina

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@sc.openoffice.org
For additional commands, e-mail: dev-h...@sc.openoffice.org

Reply via email to