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: RESOLVED DUPLICATE of bug 162070
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
3.5.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:docx
Depends on:
Blocks: DOCX-Formula
  Show dependency treegraph
 
Reported: 2012-08-10 21:33 UTC by Stephan van den Akker
Modified: 2024-11-02 05:50 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
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
Details
Screenshot of MSO 2007 showing the sample document (52.01 KB, image/png)
2012-08-10 21:35 UTC, Stephan van den Akker
Details

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 3.7.0.0.alpha0+ (Build ID: 769e2b5) on openSuSE 11.4 (32-bit)
  Libreoffice version 3.6.0.4 (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 3.6.2.1 (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 4.0.0.0.beta2 (Build-id: 4104d660979c57e1160b5135634f732918460a0) On Windows XP-SP3
- LO-Master Version 4.1.0.0.alpha0+ (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: 

Version: 4.2.0.0.alpha0+
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:

Version: 4.5.0.0.alpha0+
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

Version: 5.4.0.0.alpha0+
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

Version: 6.1.0.0.alpha0+
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

Version: 6.3.0.0.alpha0+
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 Comment hidden (obsolete)
Comment 13 QA Administrators 2023-04-21 03:27:26 UTC Comment hidden (obsolete, spam)
Comment 14 Justin L 2023-06-02 10:20:16 UTC
repro 7.6+
Comment 15 Stephan van den Akker 2024-01-29 13:59:40 UTC
Replicated with new, different MSO-365 DOCX file with formula on:

OpenSUSE Tumbleweed:

Version: 7.6.4.1 (X86_64) / LibreOffice Community
Build ID: 60(Build:1)
CPU threads: 16; OS: Linux 6.7; UI render: default; VCL: kf5 (cairo+xcb)
Locale: en-GB (en_GB.UTF-8); UI: en-GB
Calc: threaded

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 6dbe164d730726b0a91fdef70ba16410f9d81dc4
CPU threads: 16; OS: Linux 6.7; UI render: default; VCL: kf5 (cairo+xcb)
Locale: en-GB (en_GB.UTF-8); UI: en-GB
Calc: threaded
Comment 16 Mike Kaganski 2024-11-02 05:50:40 UTC

*** This bug has been marked as a duplicate of bug 162070 ***