Apache OpenOffice (AOO) Bugzilla – Issue 128190
Tooltip for SUMIFS has wrong syntax
Last modified: 2020-12-22 12:04:09 UTC
Created attachment 86733 [details] Tool tip with syntax error Tooltip for SUMIFS contains commas in the syntax which should be semicolons. Attached a screen capture from 4.2.0 dev build 9820. This has also been observed in 4.1.5 and 4.1.6. This topic https://forum.openoffice.org/en/forum/viewtopic.php?f=9&t=99254 on the AOO forum has a little more information.
Helpfile[1] seems to be good: SUMIFS( Reference R ; Reference R1 ; Criterion C1 [ ; Reference R2 ; Criterion C2 ]... ) I don't see where this tooltip is localized. [1] https://github.com/apache/openoffice/blob/trunk/main/helpcontent2/source/text/scalc/01/04060106.xhp
Comment by RusselB in topic "[Solved] SUMIFS not working for me" (link provided in the bug report): "I've noticed this problem in the tooltip text for a few functions, but it seems to me that it's always a *IFS function..." These *IFS functions are: AVERAGEIFS, COUNTIFS, and SUMIFS 1. Obviously tooltip (shown in the input line / in the cell) does not employ the entry in the corresponding AOO Help topic (.xhp file). Instead it is assembled from entries stored in file "scfuncs.src". Process of creating the data structure (full information on all functions) and using it are quite complex. Files of interest i.a.: - global.cxx http://openoffice-vm1-he-de.apache.org/xref/trunk/main/sc/source/core/data/global.cxx?r=86e1cf34 - scfuncs.src http://openoffice-vm1-he-de.apache.org/xref/trunk/main/sc/source/ui/src/scfuncs.src?r=4e5ac204 - formulabase.cxx http://openoffice-vm1-he-de.apache.org/xref/trunk/main/oox/source/xls/formulabase.cxx?r=39c2db0b - funcdesc.hxx http://openoffice-vm1-he-de.apache.org/xref/trunk/main/sc/inc/funcdesc.hxx?r=38d50f7b - inputhdl.cxx http://openoffice-vm1-he-de.apache.org/xref/trunk/main/sc/source/ui/app/inputhdl.cxx?r=4d7c9de0 2. Whether commas are added or not depends on what type of arguments a particular function has. A method in the source code - ScFuncDesc::GetParamList() composes the string. http://openoffice-vm1-he-de.apache.org/xref/trunk/main/sc/source/core/data/global.cxx?r=86e1cf34#1469 Part reponsible for paired variable arguments (PAIRED_VAR_ARGS) 1528 { 1529 sal_uInt16 nFix = nArgCount - PAIRED_VAR_ARGS; 1530 for ( sal_uInt16 nArg = 0; nArg < nFix; nArg++ ) 1531 { 1532 if (!pDefArgFlags[nArg].bSuppress) 1533 { 1534 aSig += *(ppDefArgNames[nArg]); 1535 aSig.Append(sep); 1536 aSig.AppendAscii(RTL_CONSTASCII_STRINGPARAM( " " )); 1537 } 1538 } 1539 1540 aSig += *(ppDefArgNames[nFix]); 1541 aSig += '1'; 1542 aSig.AppendAscii(RTL_CONSTASCII_STRINGPARAM( ", " )); 1543 aSig += *(ppDefArgNames[nFix+1]); 1544 aSig += '1'; 1545 aSig.Append(sep); 1546 aSig.AppendAscii(RTL_CONSTASCII_STRINGPARAM( " " )); 1547 aSig += *(ppDefArgNames[nFix]); 1548 aSig += '2'; 1549 aSig.AppendAscii(RTL_CONSTASCII_STRINGPARAM( ", " )); 1550 aSig += *(ppDefArgNames[nFix+1]); 1551 aSig += '2'; 1552 aSig.Append(sep); 1553 aSig.AppendAscii(RTL_CONSTASCII_STRINGPARAM( " ... " )); 1554 } Notice that the code in Line 1542 and 1549 adds _a comma sign_ to the string. Let's take - as an example - SUMIFS functions. Relevant information is in file "scfuncs.src". http://openoffice-vm1-he-de.apache.org/xref/trunk/main/sc/source/ui/src/scfuncs.src?r=4e5ac204#2936 Resource SC_OPCODE_SUM_IFS Extra Data: PAIRED_VAR_ARGS+1 Name of Parameter 1: "sum_range" Name of Parameter 2: "range " Name of Parameter 3: "criteria " Parameter 1 is fixed. Parameters 2 and 3 are paired variables. Therefore the code produces: "sum_range; range 1, criteria 1; range 2, criteria 2; ..." 3. As pointed out in the bug report: "tooltip for SUMIFS contains commas in the syntax which should be semicolons". The same holds true for any *IFS functions. The proper sign - a semicolon - one can see in AOO Help, in sections: "Syntax" and "Example" (cf. the attached file "IFs.jpeg"). 4. Issue confirmed in AOO 4.1.8 and AOO 4.2.-dev 5. Help vs User Interface Compare, for example: AOO Help: SUMIFS( Reference R ; Reference R1 ; Criterion C1 [ ; Reference R2 ; Criterion C2 ]... ) User Interface: SUMIFS(► sum_range; range 1, criteria 1; range 2, criteria 2; ... ) Lack of uniformity in the naming convention is evident. 6. The Unicode character used in the tooltip i.e. ► is BLACK RIGHT-POINTING POINTER, code U+25BA. Query with search term "0x25ba" http://openoffice-vm1-he-de.apache.org/search?project=trunk&full=0x25ba&defs=&refs=&path=&hist=&type=&si=full yields 3 results. Of interest is file: /trunk/main/sc/source/ui/app/inputhdl.cxx (cf. point 1. above) 7. Pootle: string identifier has one of the prefixes: RID_SC_FUNCTION_DESCRIPTIONS1 or RID_SC_FUNCTION_DESCRIPTIONS2 and internal code of function for example, SUMIFS function: "sum_range" ---> scfuncs.src#RID_SC_FUNCTION_DESCRIPTIONS1.SC_OPCODE_SUM_IFS.2.string.text https://translate.apache.org/pl/translate/#search=scfuncs.src%23RID_SC_FUNCTION_DESCRIPTIONS1.SC_OPCODE_SUM_IFS.2.string.text&sfields=locations XOR function: "Number 1" ---> scfuncs.src#RID_SC_FUNCTION_DESCRIPTIONS2.SC_OPCODE_BITXOR.2.string.text https://translate.apache.org/pl/translate/#search=scfuncs.src%23RID_SC_FUNCTION_DESCRIPTIONS2.SC_OPCODE_BITXOR.2.string.text&sfields=locations 8. Entries in file "scfuncs.src" are also used in: - the Function Wizard ('Insert > Function') - the Function List ('Insert > Functions' or via the Sidebar). FINAL NOTE (lbl): I don't know C++ so I might be utterly wrong.
Created attachment 86994 [details] Screenshots for functions: AVERAGEIFS, COUNTIFS, SUMIFS