Accessing code for Calc functions

Winfried Donkers winfried.libreoffice at gmail.com
Tue Nov 26 16:02:50 UTC 2019


Hi Steve,
> On 26.11.2019 17:15, Steve Fanning wrote:
>> I am currently working as a member of the Documentation Team, updating
>> Chapter 18 of the Calc Guide (Description of Functions). From time to
>> time during this task, I would benefit from viewing the code that
>> implements individual functions but have not been able to find that
>> code. Could somebody give me some hints please?

The code of most Calc functions is in sc/source/core/tool/interpr#.cxx, 
with # ranging from 1 to 8.

In sc/source/core/tool/interpr4.cxx is a function 
ScInterpreter::Interpret() with a large switch statement which handles 
the function calls. E.g. 'case ocSum :  ScSum(); break;' shows that the 
SUM function is ScSum, which git grep (or opengrok) tells you is in 
sc/source/core/tool/interpr6.cxx.

Some functions belong to a group 'Add-in functions' and are essentially 
functions that Excel had as a special package. These are handled quite 
differently and in scaddins/source/analysis and scaddins/source/financial.

HTH,

Winfried




More information about the LibreOffice mailing list