Bug 97166 - Fileopen: .docx: Some formulas with wrong syntax aren't correctly imported (OK in Word)
Summary: Fileopen: .docx: Some formulas with wrong syntax aren't correctly imported (O...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Formula Editor (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, filter:docx
Depends on:
Blocks: DOCX-Formula
  Show dependency treegraph
 
Reported: 2016-01-16 04:09 UTC by Rolle
Modified: 2022-12-14 23:08 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
MSWord2010.docx (26.44 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2016-01-16 04:09 UTC, Rolle
Details
Comparison Word/Writer (155.44 KB, image/png)
2016-01-16 04:11 UTC, Rolle
Details
IA.docx (16.46 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2016-09-25 11:26 UTC, opensuse.lietuviu.kalba
Details
IA.png - Word/Writer comparison (84.22 KB, image/png)
2016-09-25 11:27 UTC, opensuse.lietuviu.kalba
Details
IA.docx with corrected brackets (14.23 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-04-02 22:34 UTC, Regina Henschel
Details
Corrected Brackets (28.24 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-04-02 22:35 UTC, Regina Henschel
Details
MSWord2010.docx compared MSO LO (132.64 KB, image/png)
2020-09-17 10:30 UTC, Timur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rolle 2016-01-16 04:09:45 UTC
Created attachment 121974 [details]
MSWord2010.docx

A MS Word 2010 document with formulas aren't alsway correctly imported. See attachment with 2 wrong formulas and 1 correctly imported formula.
Comment 1 Rolle 2016-01-16 04:11:00 UTC
Created attachment 121975 [details]
Comparison Word/Writer
Comment 2 raal 2016-01-17 16:48:35 UTC
I can confirm with Version: 5.2.0.0.alpha0+
Build ID: 75f0f9d5538577e0d4923b4d46ba6f88b6199814
CPU Threads: 4; OS Version: Linux 4.2; UI Render: GL; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2016-01-12_14:23:15
and Version: 4.3.0.0.alpha0+
Comment 3 opensuse.lietuviu.kalba 2016-09-25 11:26:00 UTC
Created attachment 127620 [details]
IA.docx

One more example: formula in DOCX (created and saved with MS Word) looks distorted in LibreOffice 5.2.1.2
Comment 4 opensuse.lietuviu.kalba 2016-09-25 11:27:37 UTC
Created attachment 127621 [details]
IA.png - Word/Writer comparison

Picture shows, that it looks different in text procesors.
Comment 5 Cor Nouws 2016-09-25 14:34:04 UTC
the formulas are not at all shown in version 3.3.0.4, so we're almost there.

I think Formula editor (Math) is the correct component.

@regina/ all: is there a meta bug gathering Math errors?
Comment 6 QA Administrators 2017-12-10 16:38:44 UTC Comment hidden (obsolete)
Comment 7 Regina Henschel 2018-04-02 22:33:19 UTC
I think, that in both documents the formulas are wrong. If you move through the formulas with the arrow key in Word, you will notice, that the brackets are not balanced. One bracket is inside the area with gray background and the other bracket is outside. LibreOffice always needs balanced brackets. I will attache corrected files.
For me it is not a bug of LibreOffice.
Comment 8 Regina Henschel 2018-04-02 22:34:09 UTC
Created attachment 141042 [details]
IA.docx with corrected brackets
Comment 9 Regina Henschel 2018-04-02 22:35:11 UTC
Created attachment 141043 [details]
Corrected Brackets
Comment 10 Roman Kuznetsov 2018-07-25 18:49:01 UTC
last file from Regina opens fine in LO 6.1.0.2. 
There is a problem with rendering, but we don't have red question marks.

For me it's WFM (if first docx from Rolle is really bad by default)
Comment 11 Timur 2018-07-30 15:36:53 UTC Comment hidden (obsolete)
Comment 12 QA Administrators 2019-07-31 02:53:56 UTC Comment hidden (obsolete)
Comment 13 Timur 2020-09-17 10:30:29 UTC
Created attachment 165618 [details]
MSWord2010.docx compared MSO LO

Repro in 7.1+ for MSWord2010.docx, also if resaved in MSO to new version.
Per screenshot, old behavior was up to LO 5.3 and new behavior id from LO 5.4 to LO 7.1+.
Comment 14 Timur 2020-09-17 11:13:52 UTC
Bibisected in 6.4 to find the change, adding Takeshi to CC, please see.
 3c2379bcd160794f6c9c4f5a308e35d857b2a6c9 is the first bad commit
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Tue Apr 4 03:26:03 2017 +0200

    source 1a1d1a86e9129ec3885610b641179b30f9bf5e79
    previous source 646e52adf4a84ca5beab7bae1e1fae4e793c4896

author	Takeshi Abe <tabe@fixedpoint.jp>	2017-03-25 17:52:46 +0900
committer	Takeshi Abe <tabe@fixedpoint.jp>	2017-04-04 01:24:31 +0000
commit 1a1d1a86e9129ec3885610b641179b30f9bf5e79 (patch)
tree 850c593a0777617d4f744c202a3a9a087b82c0fc
parent 646e52adf4a84ca5beab7bae1e1fae4e793c4896 (diff)
starmath: Simplify code parsing nospace
This also comes with its unit test.

Source commit wasn't found as mentioned in Bugzilla.
Comment 15 QA Administrators 2022-09-18 04:09:44 UTC Comment hidden (obsolete)
Comment 16 Rajasekaran Karunanithi 2022-12-14 23:08:37 UTC
Still reproducable in LO 7.5 Dev alpha under Windows 10(x64).I opened in https://onlinedocumentviewer.com/ and the formulas appears fine but LO opens incorrectly.

Version: 7.5.0.0.alpha1 (X86_64) / LibreOffice Community
Build ID: 2b4d136b65bc79a1248876160e85fab79d52d5d6
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: en-IN (en_IN); UI: en-US
Calc: threaded