Bug 59181

Summary: docx formulas with messed parentheses hierarchy don't show correctly in LibO
Product: LibreOffice Reporter: Ruslan Kabatsayev <b7.10110111>
Component: filters and storageAssignee: Not Assigned <libreoffice-bugs>
Status: NEW --- QA Contact:
Severity: normal    
Priority: medium CC: fdbugs, jmadero.dev, madanh2014, seba23393
Version: 3.5.6.2 release   
Hardware: Other   
OS: All   
Whiteboard: filter:docx
i915 platform: i915 features:
Attachments: Test file
How it's look like in Word for Mac 2011 (=Microsoft office word)
pdf created with Word for Mac 2011

Description Ruslan Kabatsayev 2013-01-09 21:38:29 UTC
Created attachment 72754 [details]
Test file

See test file. It has "(E" being subscripted by "g", and thus the closing parenthesis doesn't match anything, which results in lots of red question marks in formula rendering.
I'm not sure how this should be fixed, perhaps when such messed formula appears as result of parsing, parser should escape/quote nonmatching parentheses or something.
Comment 1 Jorendc 2013-01-10 15:29:57 UTC
Created attachment 72783 [details]
How it's look like in Word for Mac 2011 (=Microsoft office word)
Comment 2 Jorendc 2013-01-10 15:30:23 UTC
Created attachment 72784 [details]
pdf created with Word for Mac 2011
Comment 3 Joel Madero 2013-01-10 15:31:36 UTC
I see this problem in 3.6.3.2 as well so I'm changing version
@reporter - version represents oldest version that the bug is confirmed on. It looks different on 3.6.3.2 vs. on 4.1 master but both show the red question marks which seem to be incorrect :)

Marking as:
New (confirmed)
Normal - can prevent high quality work for those inserting formulas in writer and using docx format
Medium - default priority for normal bugs, no need to change this for this bug

Thanks for reporting.
Comment 4 Jorendc 2014-04-26 17:01:37 UTC
Still reproducible using Windows 8.1 with LibreOffice Version: 4.3.0.0.alpha1+
Build ID: f4a6837025a293312cbc43b9c527851362f11030
TinderBox: Win-x86@47-TDF, Branch:MASTER, Time: 2014-04-26_09:21:18

Kind regards,
Joren
Comment 5 Matthew Francis 2015-01-18 06:48:09 UTC
*** Bug 81840 has been marked as a duplicate of this bug. ***
Comment 6 Matthew Francis 2015-01-18 06:54:18 UTC
This looks to be more of an import filter issue than a Writer issue. There is some confusion between straight and curly brackets.

Changing the first formula in attachment 72754 [details] from

  {E} rsub {g} = {{E} rsub {g}} rsub {GaN} + {{(E} rsub {g}} rsub {AlN} {{-E} rsub {g}} rsub {GaN} )x-cx(1-x)
to

  {E} rsub {g} = {{E} rsub {g}} rsub {GaN} + {{{E} rsub {g}} rsub {AlN} {{-E} rsub {g}} rsub {GaN} }x-cx(1-x)

(replacing some straight brackets with curly brackets) makes it render more like the sample image


Setting:

Version -> 3.5.6.2 (3.3 doesn't render the formulae at all, so not inherited from OOo or a regression as such)
Component -> filters and storage
Whiteboard -> filter:docx
Comment 7 Matthew Francis 2015-01-19 05:20:35 UTC
*** Bug 82108 has been marked as a duplicate of this bug. ***

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.