Bug 158023 - Incorrect recognition of ")" when importing formulas from docx
Summary: Incorrect recognition of ")" when importing formulas from docx
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Formula Editor (show other bugs)
Version:
(earliest affected)
7.6.2.1 release
Hardware: All All
: medium normal
Assignee: Amin Irgaliev
URL:
Whiteboard: target:24.8.0
Keywords: filter:docx
Depends on:
Blocks:
 
Reported: 2023-11-01 09:18 UTC by Amin Irgaliev
Modified: 2024-01-07 17:36 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
File with problematic formula (look at 3.a) (89.86 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2023-11-01 09:20 UTC, Amin Irgaliev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Amin Irgaliev 2023-11-01 09:18:35 UTC
Description:
MSO may sometimes write numbers along with closing bracket in the <m:t> tag. The MSO parser correctly recognizes formulas, while in LO a number with a bracket is wrapped on both sides in "{ }". This causes the formula to be output incorrectly (??? instead of the expected value).

Steps to Reproduce:
We were unable to identify the exact steps to reproduce this behavior in MSO. There is only a file containing the problematic markup and was created in MSO 2015.

Actual Results:
??? instead of the expected value

Expected Results:
Expected value is displayed


Reproducible: Always


User Profile Reset: No

Additional Info:
Comment 1 Amin Irgaliev 2023-11-01 09:20:48 UTC
Created attachment 190577 [details]
File with problematic formula (look at 3.a)
Comment 2 m_a_riosv 2023-11-01 19:01:54 UTC
Reproducible:
Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: d8326f1f54b2f4644b52fbfa7106eeeae6e5bb7b
CPU threads: 16; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US Calc: CL threaded

Resaving with:
Microsoft® Word para Microsoft 365 MSO (versión 2310 compilación 16.0.16924.20054) de 64 bits 
does not solve the issue.
Comment 3 Roman Kuznetsov 2023-11-29 09:37:16 UTC
https://gerrit.libreoffice.org/c/core/+/158794
Comment 4 Commit Notification 2023-12-25 17:35:26 UTC
Irgaliev Amin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/8148dd6ed3c61eaf5f9fe3a060ecda9d11611f39

tdf#158023 Add \ before parentheses if they are in the <t> tag.

It will be available in 24.8.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 Buovjaga 2024-01-07 16:25:37 UTC
Can this be closed as fixed or is there something to be done still?