Daniel Rentz schrieb:
lvyue schrieb:
Hi Daniel,
I made the changes you suggested, but it doesn't work.
it is still "=NA()"
I'm tracing the code, but I didn't get any clue yet.
If you have findings, please tell me, thank you.
Try to find where compiling the formula breaks. The N/A error is an
indicator for an error while creating the formula. Then the result is
dropped, and the N/A error is written instead, to prevent broken
formulas that would confuse (and may crash) Excel. To correctly create
the formula, the following places have to be reached. The member mbOk
tracks the validity of the created formula. It has to remain true all
the time. otherwise there is an error somewhere.
** XclExpFmlaCompImpl::CreateFormula
The entry point.
** XclExpFmlaCompImpl::Expression
Starts compiling the entire expression.
** XclExpFmlaCompImpl::ProcessFunction
Processes the ocEuroConvert token. The call to
maFuncProv.GetFuncInfoFromOpCode( eOpCode ) should return the function
info for the EUROCONVERT function, check pFuncInfo.
A few lines below, the code
if( pFuncInfo->IsMacroFunc() )
aExtFuncData.Set( pFuncInfo->GetMacroFuncName(), false, true );
should be executed and should write the function name "EUROCONVERT" into
the aExtFuncData struct.
** XclExpFmlaCompImpl::ProcessParam
Starts processing the first parameter of the EUROCONVERT function. Here,
the filter should find that extra processing is needed for EUROCONVERT
(due to the EXC_FUNC_PAR_EXCELONLY flag) and should call...
** XclExpFmlaCompImpl::AppendDefaultParam
Should call your new "AppendEuroToolToken()" which should execute
without error (mbOk should be true afterwards). Check that the
"\001\010EUTOTOOL.XLA" link is created correctly (it should because it
already exists in the test file you sent me) :-)
Forgot one:
** XclExpFmlaCompImpl::FinishFunction
check that the parameter count is handled correctly. "nParamCount"
should contain the value 4, if the EUROCONVERT function has 3
parameters. "nXclFuncIdx" should contain 255. The "else" part with the
comment "variable number of parameters" should be executed.
** XclExpFmlaCompImpl::FinalizeFormula
Creates the N/A on any error (if mbOk is false).
Daniel
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Sun Microsystems GmbH
Nagelsweg 55
20097 Hamburg
Germany
Sitz der Gesellschaft: Sonnenallee 1, D-85551 Kirchheim-Heimstetten
Amtsgericht Muenchen: HRB 161028
Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels, Dr. Roland Boemer
Vorsitzender des Aufsichtsrates: Martin Haering
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]