Bug 53358 - FILEOPEN Certain non-keyword formula literals in curly braces (e.g., "{*}") in imported DOCX document result in errors in LO
Summary: FILEOPEN Certain non-keyword formula literals in curly braces (e.g., "{*}") i...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
(earliest affected)
3.5.4 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
Keywords: filter:docx
Depends on:
Blocks: DOCX-Formula
  Show dependency treegraph
Reported: 2012-08-10 21:33 UTC by Stephan van den Akker
Modified: 2021-04-20 03:54 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:

Example MSO 2007 document containing formula with * (24.12 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2012-08-10 21:33 UTC, Stephan van den Akker
Screenshot of MSO 2007 showing the sample document (52.01 KB, image/png)
2012-08-10 21:35 UTC, Stephan van den Akker

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan van den Akker 2012-08-10 21:33:55 UTC
Created attachment 65407 [details]
Example MSO 2007 document containing formula with *

How to reproduce:
  - Import DOCX document (see attachement)
  - Both formula descriptions contain rsup {*} just before the equal sign. This is shown incorrectly as a upside-down question mark.
  Possible solution:
  - Import * as "*"
  Problem observed in: 
  Libreoffice 3.5.4 on openSuSE 11.4 (64-bit)
  Libreoffice-master version (Build ID: 769e2b5) on openSuSE 11.4 (32-bit)
  Libreoffice version (Build ID: 360m1(Build:104)) on openSuSE 11.4 (32-bit)
Comment 1 Stephan van den Akker 2012-08-10 21:35:32 UTC
Created attachment 65408 [details]
Screenshot of MSO 2007 showing the sample document
Comment 2 Kevin Ernst 2012-09-26 11:38:28 UTC
I ran into a similar problem with a Word .docx containing formulas with the literal "{gt}" (as in -1/2 g t^2 ...). It seems to be a conformance problem with the MSO input filter(s) not recognizing "{non-keyword}" as a formula literal string in the same manner as Word does. (It's a slippery slope, I realize, particularly if you have to make LO code more ugly to cope with Word's odd behavior, which I imagine happens all the time.)

Even though *my* issue doesn't conform to this bug report's description, strictly speaking, I'm making the (hopefully reasonable) assumption that the problem lies in the same branch of code.

Apparently "{gt}" is a legal literal character string for MS Word, but LibreOffice wants "gt" (with double quotes) or "{g t}" (no quotes). Otherwise it's interpreted as "{<?>} gt {<?>}"[1] with an error, hence the upside-down question mark.

Recommended solution: read in "{gt}"/"{lt}" as "gt"/"lt" (with quotes). It's a one-in-a-thousand case, maybe not even worth the two extra conditionals in the import code, I dunno.

I can confirm the OP's bug manifests in LibreOffice for Mac OS X version (Build ID: ba822cc).

[1] Greater than, which is strangely undocumented in https://wiki.documentfoundation.org/images/0/0e/MG34-MathGuide_LO.pdf
Comment 3 Stephan van den Akker 2012-12-24 21:23:00 UTC
Problem still present in 

- LOdev (Build-id: 4104d660979c57e1160b5135634f732918460a0) On Windows XP-SP3
- LO-Master Version (Build ID: 07c80d23fadcc2334fe7c6f9ce7b5dafeb88d62) on openSUSE 12.2 (32-bit)
Comment 4 Stephan van den Akker 2013-05-31 19:51:19 UTC
Problem still present in MASTER: 

Build ID: c2530b02311c46529eed53ee688bf6c83ce4b86

On Ubuntu 12.04 (32-bit)
Comment 5 QA Administrators 2015-03-04 02:19:16 UTC Comment hidden (obsolete)
Comment 6 Stephan van den Akker 2015-03-07 22:34:23 UTC
OP reproducible in recent MASTER:

Build ID: ca7f62c8262662c8f58a3fa3b298623f25b55eaa
Locale: en_US

on openSuSE 13.2 (x86_64)
Comment 7 tommy27 2016-04-16 07:26:18 UTC Comment hidden (obsolete)
Comment 8 Xisco Faulí 2017-03-30 07:51:40 UTC
Still reproducible in

Build ID: 6152bf9ee9b2e348dee854921a5a5db1cfc72995
CPU threads: 4; OS: Linux 4.8; UI render: default; VCL: gtk2; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group
Comment 9 eisa01 2018-03-18 09:44:27 UTC
Still present

Build ID: 8e8dd8f320a3ff59ff8a16c1a7a867888ce80700
CPU threads: 2; OS: Mac OS X 10.12.6; UI render: default; 
TinderBox: MacOSX-x86_64@49-TDF, Branch:master, Time: 2018-03-13_23:59:29
Locale: en-US (en_US.UTF-8); Calc: group
Comment 10 QA Administrators 2019-03-19 03:49:55 UTC Comment hidden (obsolete)
Comment 11 eisa01 2019-04-20 17:40:50 UTC
This is still present.

In 3.3 the equations don't show, so no regression or inheritance

Build ID: ea9c13be02ba731074fa4207944ff7df40a0fb5c
CPU threads: 2; OS: Mac OS X 10.13.6; UI render: default; VCL: osx; 
TinderBox: MacOSX-x86_64@49-TDF, Branch:master, Time: 2019-04-10_20:43:17
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded
Comment 12 QA Administrators 2021-04-20 03:54:43 UTC
Dear Stephan van den Akker,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)

If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword

Feel free to come ask questions or to say hello in our QA chat: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team