fdo75264 incorrect function name tips, suggestions wanted
Winfried Donkers
W.Donkers at dci-electronics.nl
Fri Feb 21 01:11:39 PST 2014
Hi Kohei, all,
While typing a function name in a Calc cell (e.g. "=GC"), a tip (sometimes) appears above the cell with the first fitting function name.
However, when the function name contains a '_' or a '.' (e.g. GCD_ADD or PERCENTRANK.EXC),
the tip doesn't show (cell content "=GCD_") or shows the wrong function name (cell content "=GCD_A" produces tip AVERAGE()).
This is because in sc/source/input/app/inputhdl.cxx, function ScInputHandler::UseFormulaData() the call in line
OUString aText = pEngine->GetWord( 0, asel.nEndpos-1 );
breaks the function name as '_' and '.' are seen as word separators.
Also, there are 2 tips: one above the cell (showing just function name, with the behaviour as above) and one below the cell (showing function name plus arguments, for which I submitted a patch (https://gerrit.libreoffice.org/#/c/8143/).
The list (ScFormulaHandler::pFormulaData) used for the tip above seems to contain only function names for which 'extended' names also exists, e.g. GCD and GCD_ADD, GCD is in the list), whereas the list used for the tip below (ScFormulaHandler::pFormulaDataPara) seems to contain all functions.
When the function name has no 'extended' versions (e.g. AND), no tip shows.
Why is this?
I don't want to break things when trying to fix bug fdo75264 and I am a bit confused about the current ScInputHandler::UseFormulaData() code.
Winfried
More information about the LibreOffice
mailing list