Bug 109310 - Footnote number format changes after conversion to .docx and opening in Microsoft Word
Summary: Footnote number format changes after conversion to .docx and opening in Micro...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.5 all versions
Hardware: All All
: medium normal
Assignee: Justin L
URL:
Whiteboard: target:6.0.0 target:6.3.0
Keywords: filter:docx
Depends on:
Blocks: Footnote-Endnote
  Show dependency treegraph
 
Reported: 2017-07-24 13:29 UTC by maartenpelgrim
Modified: 2019-04-12 04:22 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
footnote_superscript.odt: save as .docx and open in MSWord - no superscript (9.87 KB, application/vnd.oasis.opendocument.text)
2017-09-06 20:20 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description maartenpelgrim 2017-07-24 13:29:12 UTC
Linux Mint 18.2

Installed Libreoffice and Dutch language package via the following PPA:
http://ppa.launchpad.net/libreoffice/ppa/ubuntu xenial main

I am using LO 5.3.4.2. and working with Writer. My thesis advisor is a Microsoft Office user. This means that I have to convert my work to .docx files. It is not an option to let her open .odt files; she uses office 2010.

The number format of the footnote is not properly converted, however, leaving me with footnotes that do not begin with a superscripted number when opened in Microsoft Word.

The steps:

1) Open Libreoffice Writer
2) Click on 'File> New> TextDocument
3) write some text
4) Click on Insert (invoegen in Dutch)> footnote- endnote> footnote.
5) Add text to the footnote
6) press F11, click characterstyles> right-click on footnotecharacters> click modify. The stylemenu for footnote characters is now opened
7) click on position> superscript. The footnote numbers (in Writer) are now superscripted
6) Click File> save> to save as a normal .odt file
7) Click File> save as> choose the .docx format. 
7) Press CTRL+q to close Libreoffice Writer
9) Open Microsoft Word
10) open the new .docx in (any version of) Microsoft Word.
11)expected behavior: footnote numbers in the footnote are superscripted.
12) observed behavior: footnote numbers in the footnote are in basic format.

Saving it as a .docx file in the first place results in the same behavior.

The problem seems to be that the footnote numbers are made-up with a character style. The problem, however, is that this character style is not converted properly when saved in Writer to a .docx file and then opened in Microsoft word.

The expected behavior, in my opinion, should be that the footnote number character style is properly converted to a .docx file in such a way that it is also visible in Microsoft Word.
Comment 1 Justin L 2017-09-06 20:13:52 UTC
Confirmed using MSWord 2003 and LO6.0dev. Bibisect43all also reproduces this, so likely inherited from OOo, but marking as 3.5 because that is the oldest I can get on bibisect.

See bug 82173 for related issues that were fixed for LO 6.0.

For some reason, Microsoft Word is not importing the "Footnote Characters" character style applied to the footnote number.

P.S. It works fine in .doc format. And it all looks fine in LibreOffice for .docx too.  Only in Word is the character style missing. So if this is a LO bug, it is likely in .docx export code.
Comment 2 Justin L 2017-09-06 20:20:39 UTC
Created attachment 136077 [details]
footnote_superscript.odt: save as .docx and open in MSWord - no superscript
Comment 3 Justin L 2017-09-06 23:40:26 UTC
proposed fix at https://gerrit.libreoffice.org/42035
Comment 4 Commit Notification 2017-09-18 09:26:50 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=ac1081170c5bc2234b14ce99b7ea8e583bac82b5

tdf#109310 ooxmlexport: write Xnote character style

It will be available in 6.0.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 maartenpelgrim 2017-09-18 09:54:40 UTC
First of all, many, many, many thanks for this fix!

I know that you are going to make a lot of people very happy with this. And I know it seems like Libreoffice will not benefit directly from this, and to a certain extent I can agree to that. But at least from now on, whenever I share an academic text with someone in the field who uses MS-word, they will have the same markup as I do which, I am sure, means a lot to many of those who are using Libreoffice in Academia. 

I am running Libreoffice 5.4 at the moment, so if I've understood it correctly I won't be able to install the latest 6.0 build alongside it, so I can't tell you right away if it works as desired, but be assured that I will check and give you some feedback. 

Just one more thing. This is my first serious bug report, and the outcome of all of this has been a super positive one for me, so my sincerest compliments for that as well!

All the best,

MPE
Comment 6 Justin L 2017-09-18 14:24:59 UTC
(In reply to maartenpelgrim from comment #5)
> I am running Libreoffice 5.4 at the moment, so if I've understood it
> correctly I won't be able to install the latest 6.0 build alongside it...
I've never tried this myself yet, but browsing through the documentation sounded daunting for Linux. LibreOffice 6 should be available for beta testing in early December (https://wiki.documentfoundation.org/ReleasePlan).

A better option for computer buffs would be to download the 5GB bibisect build (daily builds stored in git) from https://wiki.documentfoundation.org/QA/Bibisect - but that again is fairly technical and a huge download. 
> 
> Just one more thing. This is my first serious bug report, and the outcome of
> all of this has been a super positive one for me, so my sincerest
> compliments for that as well!

I'm glad that you reported it, and that it was relatively easy to fix. There have been a number of other footnote fixes recently, but still lots more that need attention.  See bug 109195 and bug 103164.
Comment 7 maartenpelgrim 2018-02-10 13:16:35 UTC
Dear people at Libreoffice,

I have just installed Libreoffice 6, and of course tested the new footnote conversion capability. Everything seems to work perfectly now, a million thanks for that!

MPE
Comment 8 Commit Notification 2019-04-12 04:22:35 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/735964c39097ff952fcaffee6b35c79e210c019c%5E%21
 f315fee54eee57e6e55e5fcacf2522534682c2ce follow-up: fix tdf#109310 unit test

It will be available in 6.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.