Bug 142293 - Spreadsheet functions implemented as AddIn may get saved with their programmatic name to OOXML Excel .xlsx instead of the function name (cause in comment 21)
Summary: Spreadsheet functions implemented as AddIn may get saved with their programma...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.1.3.2 release
Hardware: All All
: medium normal
Assignee: Eike Rathke
URL:
Whiteboard: target:7.5.0 target:7.4.0.0.beta2 tar...
Keywords: bibisectRequest, filter:xlsx, regression
: 141495 148229 150733 (view as bug list)
Depends on:
Blocks: Calc-Function
  Show dependency treegraph
 
Reported: 2021-05-14 23:54 UTC by Yan Fiz
Modified: 2022-10-08 11:26 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
File saved with excel (8.93 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2022-08-31 21:24 UTC, m_a_riosv
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yan Fiz 2021-05-14 23:54:08 UTC
Description:
If you save the spreadsheet as Excel format while your text language is Turkish, EDATE function will be converted to a function like com.sun.star.sheet.addİn.analysİs.getedate.

If EDATE is used as an single formula, it will continue to display the correct date.

https://i.postimg.cc/3wF3JQ1V/Single.png

But, if EDATE is used in a nested formula, it will give #NAME? error.

https://i.postimg.cc/43gJgx6p/Nested.png



(My surmise : Something in LibreOffice text language engines, makes some faults when converting cases to upper or lower?!)

Steps to Reproduce:
1. Open Calc.
2. Select text language as Turkish from the lowest bar.
3. Make a formula that used EDATE function in it.
4. Save the file as Excel format.
5. Close file and reopen it.

Actual Results:
EDATE turns into com.sun.star.sheet.addİn.analysİs.getedate.

Expected Results:
EDATE should be stay as EDATE.


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
Version: 7.1.3.2 (x64) / LibreOffice Community
Build ID: 47f78053abe362b9384784d31a6e56f8511eb1c1
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: tr-TR (en_US); UI: en-US
Calc: CL
Comment 1 Roman Kuznetsov 2021-05-15 16:06:07 UTC
no repro for RU locale

Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: dbd4110cc36011042c98549d997daa79e8065aba
CPU threads: 4; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: ru-RU
Calc: CL
Comment 2 raal 2022-01-25 22:55:27 UTC
I can confirm with Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: 0c3b8792b712e939d2ad524d554f96616b4844be
CPU threads: 4; OS: Linux 5.11; UI render: default; VCL: gtk3
Locale: tr-TR (cs_CZ.UTF-8); UI: en-US
Calc: threaded Jumbo

but not in Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)
Comment 3 Eike Rathke 2022-06-15 16:11:37 UTC
*** Bug 148229 has been marked as a duplicate of this bug. ***
Comment 4 Eike Rathke 2022-06-15 16:18:36 UTC
Note the capital İ U+0130 in the programmatic function name and in a tr-TR locale

capital İ U+0130 transliterates to small i U+0069
capital I U+0049 transliterates to small ı U+0131
Comment 5 Eike Rathke 2022-06-17 14:40:36 UTC
The odd thing is, I could identify how the upper-casing of the programmatic Add-In functions' names goes wrong, but I could not reproduce that such programmatic name gets saved to the document instead of the English function name, not even when using a tr-TR locale.
Comment 6 Commit Notification 2022-06-18 09:43:20 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/36cb12bce80836a29e5124167b588490b3f7700d

Related: tdf#142293 Do not use locale's uppercase for Add-In programmatic name

It will be available in 7.5.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 7 Commit Notification 2022-06-18 09:43:28 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/994d517a48f7e092ec57d179abb855ef5a86eacb

Related: tdf#142293 Use the same locale to lowercase as was to uppercase

It will be available in 7.5.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 2022-06-18 11:51:03 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/9aab475e221e1abee2108b21545f2bdaa48552e6

Related: tdf#142293 tdf#141495 Allow additional symbols in externals map

It will be available in 7.5.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 Eike Rathke 2022-06-18 11:59:08 UTC
The last commit 9aab475e221e1abee2108b21545f2bdaa48552e6 allows reading and repairing such broken documents, but the cause why those programmatic names were written is unidentified.
Comment 10 Commit Notification 2022-06-18 17:58:49 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/9f7ab29857a552be0f7141a7e49e3dd5291f19a6

Related: tdf#142293 Do not use locale's uppercase for Add-In programmatic name

It will be available in 7.4.0.0.beta2.

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 11 Commit Notification 2022-06-18 17:59:57 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/0c44a7b29c7ee393fa209b7fdf4c940cbace0fb5

Related: tdf#142293 Use the same locale to lowercase as was to uppercase

It will be available in 7.4.0.0.beta2.

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 Commit Notification 2022-06-18 18:00:05 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

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

Related: tdf#142293 tdf#141495 Allow additional symbols in externals map

It will be available in 7.4.0.0.beta2.

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 13 Commit Notification 2022-06-21 08:02:14 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/5d30e9e101ae8167c33fe24ca12d8d0685f9f8fb

tdf#142293, tdf#141495: sc_subsequent_filters_test2: Add unittest

It will be available in 7.5.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 2022-06-21 11:30:30 UTC Comment hidden (off-topic)
Comment 15 Commit Notification 2022-06-21 12:21:41 UTC Comment hidden (off-topic)
Comment 16 Eike Rathke 2022-06-21 12:23:58 UTC Comment hidden (off-topic)
Comment 17 Commit Notification 2022-06-21 22:24:17 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/086055b0d7e44d1d07b3f23af55503e6a3924d87

Related: tdf#142293 Consider bAsciiUpper for matching CharClass to lowercase

It will be available in 7.5.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 18 Commit Notification 2022-06-21 23:19:36 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/9f3bce835e81dbdf07da9850a5157f4403819417

Related: tdf#142293 Consider bAsciiUpper for matching CharClass to lowercase

It will be available in 7.4.0.0.beta2.

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 19 Eike Rathke 2022-08-31 21:15:59 UTC
*** Bug 150733 has been marked as a duplicate of this bug. ***
Comment 20 m_a_riosv 2022-08-31 21:24:56 UTC
Created attachment 182130 [details]
File saved with excel

File working and saved with excel: Microsoft® Excel® para Microsoft 365 MSO (versión 2207 compilación 16.0.15427.20182) de 64 bits
Comment 21 Eike Rathke 2022-09-01 00:06:22 UTC
I can finally reproduce the programmatic names of AddIns getting saved, it happens only if an OOXML .xlsx Excel document was loaded before any OOXML save and a FormulaCompiler base class OpCodeMap without AddIn mappings was instantiated and became permanent instead of the derived ScCompiler's final map.
Comment 22 Eike Rathke 2022-09-01 13:14:11 UTC
Fwiw, the culprit this time (we had such already with bug 135993 at a different place) was formula::FormulaCompiler::GetOpCodeMap() in TokenStringContext::TokenStringContext(). Eliminating this trap once and for all..
Comment 23 Eike Rathke 2022-09-01 13:14:44 UTC
*** Bug 141495 has been marked as a duplicate of this bug. ***
Comment 24 Commit Notification 2022-09-01 13:18:06 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/603f9ce4f39a59bd84b5c08e3d725e0ee664991f

Related: tdf#142293 Introduce a protected FormulaCompiler::GetFinalOpCodeMap()

It will be available in 7.5.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 25 Commit Notification 2022-09-01 14:30:53 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

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

Related: tdf#142293 Use FormulaCompiler::GetFinalOpCodeMap() in ScCompiler

It will be available in 7.5.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 26 Commit Notification 2022-09-01 15:43:24 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/5aaa0cda74de4170972b7988d8fca16a560b8500

Resolves: tdf#142293 Implement the temporariness of GetOpCodeMap()

It will be available in 7.5.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 27 Commit Notification 2022-09-01 16:02:38 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/15acaddb54c3e14a49b0d26d879c4436d34933e1

Related: tdf#142293 Remove temporariness now implemented at GetOpCodeMap()

It will be available in 7.5.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 28 Commit Notification 2022-09-01 16:02:48 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/033e98dbe6aafd6719eb83ea4d2fc68110e195c9

Related: tdf#142293 Have ScCompiler::GetOpCodeMap() overwrite

It will be available in 7.5.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 29 Eike Rathke 2022-09-01 18:13:40 UTC
Pending review https://gerrit.libreoffice.org/c/core/+/139230 for 7-4
Comment 30 Commit Notification 2022-09-05 14:21:36 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

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

Resolves: tdf#142293 Implement the temporariness of GetOpCodeMap()

It will be available in 7.4.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.
Comment 31 Eric 2022-09-12 16:43:55 UTC
Confirming the 9/11/22 Dev build does fix the EDATE function when saved in XLSX format and opened in MSO2016.
Comment 32 Martin Terry 2022-10-08 11:26:54 UTC
I very much look forward to this problem being fixed in LO 7.4. I have just encountered this again in 7.3.6.2 when all my EOMONTH formula were again corrupted as I described in bug 141495 (now closed as a duplicate). THis seems to happen "randomly" (i.e not reproducible at will) and the only choice is then to manually edit all the corrupted cells to remove the extra text string. In this particular spreadsheet, which I update weekly for my energy generation from solar panels and for my usage, I have now had to do this several times. At least there is good news that the issue has been isolated by Eike Rathke and a fix is in the pipeline. Thanks