Bug 123575 - Error 501 will be produced on loading an ods with formulas in which characters in sheet name is recognized as illegal Char, even if the file is loadable in Excel.
Summary: Error 501 will be produced on loading an ods with formulas in which character...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Eike Rathke
URL:
Whiteboard: target:6.3.0 target:6.2.2
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-19 17:00 UTC by himajin100000
Modified: 2019-02-21 09:31 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
file to be used in STR (10.82 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2019-02-19 17:01 UTC, himajin100000
Details

Note You need to log in before you can comment on or make changes to this bug.
Description himajin100000 2019-02-19 17:00:44 UTC
Description:
see steps to reproduce

Steps to Reproduce:
1. Open the attached file in Excel. You will see no Error in C1 cell.
2. Open the attached file in LibreOffice. The versions with fix for tdf#93951 would be better.
3. Click ok if you are asked whether you want to recalculate.

Actual Results:
You will see Error 501 in C1 cell.

Expected Results:
No Error in C1 cell


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 6.3.0.0.alpha0+ (x64)
Build ID: 82fb7f9f90a3ba9d53b3412124e513aa78ddca10
CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2019-02-05_23:41:03
Locale: ja-JP (ja_JP); UI-Language: en-US
Calc: threaded
Comment 1 himajin100000 2019-02-19 17:01:35 UTC
Created attachment 149424 [details]
file to be used in STR
Comment 2 Oliver Brinzing 2019-02-19 17:47:41 UTC
already reproducible with AOO 4.1.5
Comment 3 Eike Rathke 2019-02-19 18:25:23 UTC
Fwiw, it works if the sheet name is quoted as usual, i.e. ='Sheet1・2'.A1
Likely the U+30FB KATAKANA MIDDLE DOT punctuation character ends the "word" there.
Comment 4 Commit Notification 2019-02-20 15:25:22 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/a10df00bd4a2ae293b077701d32c720a63080ebf%5E%21

Resolves: tdf#123575 treat Katakana middle dots as midletter

It will be available in 6.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Eike Rathke 2019-02-20 15:29:27 UTC
Pending review https://gerrit.libreoffice.org/68096 for 6-2
Comment 6 himajin100000 2019-02-20 15:40:12 UTC
Thank you Eike.

Um, to tell the truth, I wrote this bug report based on the following post

https://ask.libreoffice.org/ja/question/183520/

and the reporter was also giving another examples like 

U+3010【
U+3011 】

and he was also thinking there could be more similar cases.

I too optimistically thought that not recognizing all these letters is from one cause, and for simplicity, I just gave MIDDLE DOT, without investigating the code.

Should I file a new bug report?
Comment 7 Eike Rathke 2019-02-20 19:43:15 UTC
I don't see why we should accept characters like
U+3010 LEFT BLACK LENTICULAR BRACKET
U+3011 RIGHT BLACK LENTICULAR BRACKET
as midletter characters, i.e. non-letter non-numeric characters that continue a word. Already the middle dots are a border case, where would that end if we'd introduce a whole bunch of exemptions for characters that are Unicode punctuation characters.

Alternatively we could only accept every Unicode character (>=0xA0) in a sheet name but that doesn't quite fit how the lexical analyzer works as it doesn't know in advance that it's running a sheet name (and shouldn't). However, nothing for a quick fix.
Comment 8 Commit Notification 2019-02-21 09:31:57 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/24e17b53b88dee234f23cf3fad3c7bc75b2d9ab7%5E%21

Resolves: tdf#123575 treat Katakana middle dots as midletter

It will be available in 6.2.2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.