Bug 89146 - Formulas in Writer losing some formatting in docx and rtf files, compared to odt file
Summary: Formulas in Writer losing some formatting in docx and rtf files, compared to ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected) release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
Keywords: filter:docx, filter:rtf
Depends on:
Blocks: RTF DOCX-Formula
  Show dependency treegraph
Reported: 2015-02-05 20:16 UTC by mrk.signup
Modified: 2022-11-14 03:32 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:

odt format formula test file (13.81 KB, application/vnd.oasis.opendocument.text)
2015-02-05 20:16 UTC, mrk.signup
ODT compared LO MSO (144.81 KB, image/png)
2020-11-13 08:28 UTC, Timur

Note You need to log in before you can comment on or make changes to this bug.
Description mrk.signup 2015-02-05 20:16:53 UTC
Created attachment 113156 [details]
odt format formula test file

Expected behaviour: Formulas remain unchanged when saved into different file formats

Observed behaviour: Formulas that work as expected in odt format are losing some formatting when used in other formats.  It does not matter whether the forumlas are originally created as part of an odt file and then resaved into other file formats, or created as part of a fresh file of those other formats.

Exiting and reloading is necessary to see the changes.  Upon the first save of the document, and while keeping Writer open, the document appears as normal.

The attached odt format file includes two example formulas.  The "bold" is lost in both formulas when saved to docx or rtf format, and the subscript is lost on the "lint" entry in the second formula.  The "cdot" is usually lost, but not every time.
Comment 1 Buovjaga 2015-02-07 19:02:38 UTC
(In 3.5.0 the formula disappears completely when saving to docx)

Win 7 Pro 64-bit, LibO Version:
Build ID: de093506bcdc5fafd9023ee680b8c60e3e0645d7
Locale: fi_FI

Build ID: 99c00b090533da9818444be2831b8da0e713e5f9
TinderBox: Win-x86@62-TDF, Branch:MASTER, Time: 2015-02-04_06:38:53
Locale: fi_FI

Ubuntu 14.10 64-bit
LibreOffice 3.5.0rc3 
Build ID: 7e68ba2-a744ebf-1f241b7-c506db1-7d53735

Build ID: 40m0(Build:3)
Locale: en_US
Comment 2 Yousuf Philips (jay) (retired) 2015-02-13 08:52:13 UTC
With RTF, in 3.3.0 the formula is exported as a graphic, in 3.6.7 its exported as an OLE and in 4.0.6 and above its a formula.

With DOCX, in 3.3.0 the formula isnt found and in 3.6.7 and above it shows as a formula.

Tested on linux and confirmed that the formula doesnt retain all its features and formatting.
Comment 3 Robinson Tryon (qubit) 2015-12-14 06:02:57 UTC Comment hidden (obsolete)
Comment 4 Telesto 2016-12-21 12:39:49 UTC
Repro with:
Build ID: 9cfb2f2f03b5ec086487fd483298466db0b09010
CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2016-12-20_23:58:02
Locale: nl-NL (nl_NL); Calc: CL
Comment 5 Anton 2017-12-19 15:04:33 UTC

Build ID: 1:5.1.6~rc2-0ubuntu1~xenial2
CPU Threads: 1; OS Version: Linux 4.4; UI Render: default; 
Locale: ru-RU (ru_RU.UTF-8); Calc: group

Additional information.

A document with three formulas has been created with LibO Writer. I set different font sizes for each of them using "size 30", "size 20" and "size 10" tags.

Then the document has been saved to three different formats: odt, docx and rtf. All files were opened in LibO Writer and MSO Word.

In LibreOffice:
- odt looks just like it should: three formulas with different font sizes (30, 20, 10);
- docx contains three formulas with default fontsize (12);
- rtf contains three formulas with default fontsize (12).

In MS Office:
- odt contains three formulas with default fontsize (12);
- docx contains three formulas with default fontsize (12);
- rtf looks just like it should: three formulas with different font size (30, 20, 10).

So currently there is no file format to save a document with font settings in formulas for future work with both LibO and MSO.
Comment 6 QA Administrators 2018-12-20 03:55:58 UTC Comment hidden (obsolete)
Comment 7 Olf Mombach 2020-11-06 13:54:07 UTC
Reproduced (still!!)

Version: (x64)
Build ID: 639b8ac485750d5696d7590a72ef1b496725cfb5
CPU threads: 8; OS: Windows 10.0 Build 18363; UI render: GL; VCL: win; 
Locale: en-US (en_DE); UI-Language: en-US
Calc: threaded

Additional info:
This bug didn't only affect general formatting for me, but actually completely destroyed the bigger formulas I created in a document which rendered me unable to continue development on that paper. Luckily I never reopened that document until finishing and saved it as a .pdf file in order to hand it in, all before ever closing and reopening the program, which would have destroyed my complete progress. IMO this is a very important and urgent bug to assess.
Comment 8 Timur 2020-11-13 08:28:35 UTC
Created attachment 167250 [details]
ODT compared LO MSO

Repro 7.1+ for DOCX, RTF, DOC. This is filesave bug. So far, all formats are here. Should some be fixed, it's easy to open another bug.
Comment 9 QA Administrators 2022-11-14 03:32:37 UTC
Dear mrk.signup,

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://web.libera.chat/?settings=#libreoffice-qa

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

Warm Regards,
QA Team