Bug 99602 - FILESAVE: subscript in character style not converted into docx
Summary: FILESAVE: subscript in character style not converted into docx
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, filter:docx, regression
Depends on:
Blocks: DOCX-Character
  Show dependency treegraph
 
Reported: 2016-05-01 09:14 UTC by Jelle
Modified: 2019-04-15 04:41 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
File with subscripted texts using different mechanisms (11.06 KB, application/vnd.oasis.opendocument.text)
2016-05-01 09:14 UTC, Jelle
Details
resulting PDF in daily 20160502 (11.10 KB, application/pdf)
2016-05-03 12:29 UTC, Cor Nouws
Details
resulting PDF in 4.0.0.1 (11.42 KB, application/pdf)
2016-05-03 12:29 UTC, Cor Nouws
Details
Subscript test file with better descriptions saved in LibreOffice 6.0.5.2 (12.18 KB, application/vnd.oasis.opendocument.text)
2018-07-10 04:38 UTC, Jelle
Details
Screenshot of subscript test file saved and opened in LO 6.0 as .odt (138.51 KB, image/png)
2018-07-10 04:40 UTC, Jelle
Details
Screenshot of subscript test file saved and opened in LO 6.0 as .docx (137.43 KB, image/png)
2018-07-10 04:42 UTC, Jelle
Details
Screenshot of subscript test file saved and opened in LO 6.0 as .doc (139.92 KB, image/png)
2018-07-10 04:42 UTC, Jelle
Details
Screenshot of subscript test file saved and opened in LO 3.3 as .odt (89.20 KB, image/png)
2018-07-10 04:43 UTC, Jelle
Details
Screenshot of subscript test file saved and opened in LO 3.3 as .docx (91.94 KB, image/png)
2018-07-10 04:44 UTC, Jelle
Details
Screenshot of subscript test file saved and opened in LO 3.3 as .doc (89.79 KB, image/png)
2018-07-10 04:44 UTC, Jelle
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jelle 2016-05-01 09:14:12 UTC
Created attachment 124759 [details]
File with subscripted texts using different mechanisms

When a subscript is defined as part of a character style it is lost upon conversion into a docx file. It is kep when converting into a doc file, but with potential changes to relative size and positioning.

The attached file is my test file with subscripted text added in different ways. Check out the paragraph styles used for the different subscript formats.

I have only tested this on an Intel PC under Xubuntu 14.04 Linux (64bit).

When I convert this into a docx file then all the subscripts applied through a character style are lost. When I convert it into a doc file it tries to apply subscript formatting from the character style, but relative font size and positioning are wrong. The subscript formatting is only retained when it is applied without using a character style.

Superscript gives the same problems, although I have not made a test file to try all the different permutations for this.

I do wonder if this is a regression because I do not recall having this problem in earlier version of LibreOffice, although I may simply not have been paying enough attention to what happened to subscripts on conversion to MS Word formats.
Comment 1 Cor Nouws 2016-05-03 12:28:08 UTC
Thanks for reporting Jelle,

(In reply to Jelle from comment #0)
> Created attachment 124759 [details]
> File with subscripted texts using different mechanisms

Nice.

I have converted the file to docx in recent daily build and in version 4.0.0.1.
Then reopened the file and exported to PDF.
There is no difference for me in these versions.
The positioning in 2nd, 3rd and 4th option is all lost: text is at base line. But the size looks ~OK.

I will attach my pdf files
Comment 2 Cor Nouws 2016-05-03 12:29:17 UTC
Created attachment 124809 [details]
resulting PDF in daily 20160502
Comment 3 Cor Nouws 2016-05-03 12:29:59 UTC
Created attachment 124810 [details]
resulting PDF in 4.0.0.1
Comment 4 raal 2016-05-03 12:56:50 UTC
I can confirm with Version: 5.2.0.0.alpha0+ and 4.5; win7

Cor, click on subscript text and you will see on the toolbar that "subscript button" is not "pressed" in docx.
Comment 5 QA Administrators 2018-06-26 02:44:50 UTC Comment hidden (obsolete)
Comment 6 Terrence Enger 2018-06-30 17:51:58 UTC
Working on debian-buster in daily Linux dbgutil bibisect repository
version 2018-06-30, I see that in the newly created .docx when
reopened in LO the line ...

   This is text with asubscript created with a character style with
   also different position

has the word "subscript" in a smaller font as expected, but its
baseline is raised to the baseline of the rest of the line.

I am deeming the bug still to be present.
Comment 7 Jelle 2018-07-01 09:53:53 UTC
As requested in e-mail from bugzilla-daemon@bugs.documentfoundation.org on 26 Jun 2018 I just tried it again in LibreOffice 6.0.

Info from Help - About LibreOffice is as follows:
Version: 6.0.5.2
Build ID: 1:6.0.5~rc2-0ubuntu0.18.04.1~lo1
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: en-NZ (en_NZ.UTF-8); Calc: group

I can confirm the bug is still present.

The .docx file does change the font size resulting from the character subscript style, but it does not change the position on the line. It still stays on the same height as regular characters.

The .doc file also changes the position of the subscripted characters, but to different levels of the original in the .odt file.
Comment 8 Jelle 2018-07-07 02:54:57 UTC
I have also just tried it in LibreOffice 3.3, as suggested by last e-mail I received. This is LibreOffice 3.3.0.4 in a virtual machine running Xubuntu Linux 16.04.

To some degree the bug already existed then, although its behaviour in 3.3 was better than it is now. As a result I have added 'regression' to the keywords, but also changed the version to 'inherited from OOo'.

The file saved in .doc format looks pretty much the same in version 3.3 as in 6.0. Subscript heights are different from the baseline, but also different from original .odt document.

The file saved in .docx format looks better in version 3.3 than in 6.0. The subscript height is different from the .odt original, and also different from the .doc version, but at least it is not on the baseline. 

All this relates to subscripts set with a character style. A subscript created with Ctrl-Shift-B looks OK in all versions.

I hope that provides some more info.
Comment 9 Xisco Faulí 2018-07-09 10:58:41 UTC
Hello Jelle,
Could you please add a screenshot comparing LibreOffice 3.3 and master to see what have changed and make it easier to investigate the regression ?
Comment 10 Jelle 2018-07-10 04:38:50 UTC
Created attachment 143414 [details]
Subscript test file with better descriptions saved in LibreOffice 6.0.5.2
Comment 11 Jelle 2018-07-10 04:40:56 UTC
Created attachment 143415 [details]
Screenshot of subscript test file saved and opened in LO 6.0 as .odt
Comment 12 Jelle 2018-07-10 04:42:06 UTC
Created attachment 143416 [details]
Screenshot of subscript test file saved and opened in LO 6.0 as .docx
Comment 13 Jelle 2018-07-10 04:42:44 UTC
Created attachment 143417 [details]
Screenshot of subscript test file saved and opened in LO 6.0 as .doc
Comment 14 Jelle 2018-07-10 04:43:23 UTC
Created attachment 143418 [details]
Screenshot of subscript test file saved and opened in LO 3.3 as .odt
Comment 15 Jelle 2018-07-10 04:44:14 UTC
Created attachment 143419 [details]
Screenshot of subscript test file saved and opened in LO 3.3 as .docx
Comment 16 Jelle 2018-07-10 04:44:52 UTC
Created attachment 143421 [details]
Screenshot of subscript test file saved and opened in LO 3.3 as .doc
Comment 17 Jelle 2018-07-10 04:47:10 UTC
(In reply to Xisco Faulí from comment #9)

Thank you for your interest. I have uploaded the screenshots I took from results in Libreoffice 6.0 and 3.3. I also uploaded the testfile itself, which I edited to have a bit more extended descriptions of what is going on. I hope that helps.
Comment 18 Justin L 2019-01-31 09:13:07 UTC
Using bibisect-43all, we found that docx subscripted characters moved to the baseline on Aug 8-9 2012, likely the result of
author	Lubos Lunák2012-08-08 16:32:56 +0200
commit	e70df84352d3670508a4666c97df44f82c1ce934
try somewhat harder to read w:position (bnc#773061)

This is the same range we found for bug 122421.