Bug 137091 - XLSX: Error 507 when opened with Turkish locale
Summary: XLSX: Error 507 when opened with Turkish locale
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.0 all versions
Hardware: All All
: medium normal
Assignee: Eike Rathke
URL:
Whiteboard: target:7.1.0 target:7.0.3
Keywords:
Depends on:
Blocks: XLSX-DataRange
  Show dependency treegraph
 
Reported: 2020-09-28 09:17 UTC by Yusuf Keten
Modified: 2020-12-09 09:21 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
error507-TR-locale (113.18 KB, image/png)
2020-09-28 09:18 UTC, Yusuf Keten
Details
no-error-507-EN-locale (110.27 KB, image/png)
2020-09-28 09:18 UTC, Yusuf Keten
Details
Error507 (6.21 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2020-09-28 09:19 UTC, Yusuf Keten
Details
The example file in Excel 13 and LO7.1 nightly (59.33 KB, image/png)
2020-09-28 13:05 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuf Keten 2020-09-28 09:17:34 UTC
Description:
Steps to reproduce:
1- Tools > Options > Lang Settings > Languages > Locale setting: Turkish
2- Open the attached file
3- Observe Err:507 on the third column

Tested on master:

Version: 7.1.0.0.alpha0+
Build ID: 58937aa4a50ecd681382f03331340da4c843b01e
CPU threads: 16; OS: Linux 5.7; UI render: default; VCL: gtk3
Locale: tr-TR (en_US.UTF-8); UI: en-US
Calc: threaded

Actual Results:
 

Expected Results:
 


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Yusuf Keten 2020-09-28 09:18:19 UTC
Created attachment 165909 [details]
error507-TR-locale
Comment 2 Yusuf Keten 2020-09-28 09:18:47 UTC
Created attachment 165910 [details]
no-error-507-EN-locale
Comment 3 Yusuf Keten 2020-09-28 09:19:02 UTC
Created attachment 165911 [details]
Error507
Comment 4 Eike Rathke 2020-09-28 10:25:08 UTC
Note that the [#this row] table reference part is displayed all lower case, which indicates an unrecognized keyword there; editing the formula (appending and removing blank and Enter) compiles it again, after which it works and the table reference part displays [#This Row].

My first guess is that on the initial import a [#This Row] of the original formula is upper cased and compared against an upper case [#THIS ROW] but that somehow happens in a tr-TR locale where it results in [#THİS ROW] (note upper case letter İ with dot above) so does not match [#THIS ROW].

A recompile of the formula expression then uses the correct en-US locale to compare keywords.
Comment 5 NISZ LibreOffice Team 2020-09-28 13:05:53 UTC
Created attachment 165919 [details]
The example file in Excel 13 and LO7.1 nightly

No repro in:

Version: 7.1.0.0.alpha0+ (x64)
Build ID: dec9a123867dcd0fea4683beeb3b4b6659f926f3
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: tr-TR
Calc: CL
Comment 6 NISZ LibreOffice Team 2020-09-28 13:08:09 UTC
But repro in:

Version: 7.1.0.0.alpha0+ (x64)
Build ID: dec9a123867dcd0fea4683beeb3b4b6659f926f3
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: tr-TR (hu_HU); UI: tr-TR
Calc: CL
Comment 7 Commit Notification 2020-09-28 22:55:26 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/3c6177be2705303044e3de262689d593f3d0f282

Resolves: tdf#137091 Use CharClass matching the formula language

It will be available in 7.1.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 8 Commit Notification 2020-09-29 00:23:10 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/d41c45a522c5e973d7043d36bc6c82e77735ab9b

Current sytem locale's CharClass for user defined names, tdf#137091 follow-up

It will be available in 7.1.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 9 Xisco Faulí 2020-09-29 08:41:22 UTC
Issue reproduced back to

Version: 5.4.0.0.alpha1+
Build ID: 9feb7f7039a3b59974cbf266922177e961a52dd1
CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: gtk3; 
Locale: tr-TR (en_US.UTF-8); Calc: group
Comment 10 Xisco Faulí 2020-09-29 08:43:21 UTC
Verified in

Version: 7.1.0.0.alpha0+
Build ID: cd85546a2fbdade42f80fd3b6bd650791db9f32d
CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: gtk3
Locale: tr-TR (en_US.UTF-8); UI: en-US
Calc: threaded

@Eike, thanks for fixing this issue!!
Comment 11 Commit Notification 2020-09-29 19:45:47 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/1acf517906b7cdc4931dd26319d467dff53ae7d2

Determine CharClass difference once, tdf#137091 follow-up

It will be available in 7.1.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 12 Eike Rathke 2020-09-29 20:30:16 UTC
Pending review https://gerrit.libreoffice.org/c/core/+/103598 for 7-0
Comment 13 Commit Notification 2020-09-30 12:04:21 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/7672ac2e8764d9e4fcb5a896ef6210077907dcd0

tdf#137091: sc_subsequent_filters_test: Add unittest

It will be available in 7.1.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 14 Commit Notification 2020-09-30 12:05:34 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/30d3ae0268290e6244e58c78b8f45ae7373c47ea

Resolves: tdf#137091 Use CharClass matching the formula language

It will be available in 7.0.3.

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 15 Commit Notification 2020-09-30 13:15:54 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/91de839547719b7177518386f9b39bd9e4b1cf73

tdf#137091: sc_subsequent_filters_test: Add unittest

It will be available in 7.0.3.

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.