Apache OpenOffice (AOO) Bugzilla – Issue 87171
Create Names doesn't work properly for 'rho'
Last modified: 2017-05-20 11:41:59 UTC
1. create new spreadsheet. 2. In A1, enter 'rho'. 3. In B1, enter 1 4. Select A1 and B1 then Insert->Names->Create - Left column 5. Somewhere else in the spreadsheet enter '=rho' 6. Notice it shows 0 instead of 1 7. Look in Insert->Names->Define and notice it added '_rho' instead of 'rho' If this is done for some other text string eg 'bar' in Define it shows up as 'bar' not as '_bar'.
ping?
I can reproduce it, but don't know it is a bug or some special operations to 'rho'. So, Would you like telling me what it is? Li Meiying
how about to check if =sum(rho) works ? Remember, you define a named range
reopened as it is confirmed. Daniel, please have a look at this one. Frank
re-opened
and new
DR->ER: in ScRangeData::MakeValidName(), the string 'rho' is considered a valid cell address using address convention CONV_XL_R1C1 which is not the case.
Won't make it for 3.1, targeting to 3.2
to Eike, I find some problems. besides the string starts with 'r', 'R', 'c' or 'C', those string contains valid address will also be converted. for example, if I enter 'a1a' or 'a1:a2a' in A1, enter 1 in B1, and repeat the operations in the comment. the name is converted into '_a1a' or '_a1_a2a'. they are parsed as valid when the convertion is CONV_XL_A1. and there are conflicts in it. if I input name directly in "Define Names" dialog, then 'a1:a2a' is valid, and won't be converted. another thing is that, in Excel, ':' is a invalid symbol, our OOo don't treat ':' that way, should we be the same?
I'm sorry about my last comment, that is the phenomenon in old version, please ignore that comment.
Created attachment 61593 [details] patch 1.
another question is that in ScRangeData::IsNameValid(), why it check the name only with formula::FormulaGrammar::CONV_OOO? that means if we direct input a name "r1c1", it will be valid. I feel it confusing, do we need to change that?
As discussed on IRC: IsNameValid() IMHO should check all known address conventions.
Created attachment 61768 [details] patch 2.
In cws dr69: revision 275976 sc/inc/compiler.hxx sc/source/core/tool/address.cxx sc/source/core/tool/compiler.cxx sc/source/core/tool/rangenam.cxx sc/source/filter/ftools/ftools.cxx Reworked this quite a bit, the ScCompiler::IsWordChar() method allowed way too many characters, introduced new SC_COMPILER_C_CHAR_NAME and SC_COMPILER_C_NAME character flags, plus new ScCompiler::IsCharFlagAllConventions() method.
Created attachment 64644 [details] testcase, some names, select data and menu Insert->Names->Create
Reassigning to QA for verification. Note: we do currently have a problem with names such as Sheet1.xx that involve a valid sheet name followed by '.' separator but otherwise are not a valid reference. When using them in a formula expression they yield a #REF! error. This is nothing new though and was the case already before.
verified in internal build cws_dr69