Hi Daniel,

Regina Henschel schrieb:

== 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 I use ocExternal the prefix is set, but the functions are not distinct, only one name is written and on import the whole function name is stripped, so only =(z) remains from =_xlfnodf.IMSECH(z).

I see no way to add the imaginary functions to list saFuncTable_Odf, because they have no op-code.

Do I understand you right, that I should try to add the prefix in function GetExcelName in /sc/.../addincol.cxx?

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