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
Context
- fdo75264 incorrect function name tips, suggestions wanted · Winfried Donkers
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.