Bug 127146 - Footnotes "Before/After" text disappears while saving as DOC/X
Summary: Footnotes "Before/After" text disappears while saving as DOC/X
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:doc, filter:docx
Depends on:
Blocks: Footnote-Endnote-Properties
  Show dependency treegraph
 
Reported: 2019-08-25 09:30 UTC by cbogdanov
Modified: 2023-06-08 17:42 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Properly formatted ODF (9.46 KB, application/vnd.oasis.opendocument.text)
2019-08-25 09:31 UTC, cbogdanov
Details
The same document in DOC, with bug (9.50 KB, application/msword)
2019-08-25 09:32 UTC, cbogdanov
Details
Custom footnote.doc: made by Word 2016. LO opens poorly (same with DOCX) (23.00 KB, application/msword)
2021-08-26 11:55 UTC, Justin L
Details
beforeAfterFootnotes.odt: don't make this look dumb during emulation (11.63 KB, application/vnd.oasis.opendocument.text)
2021-08-26 15:50 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description cbogdanov 2019-08-25 09:30:37 UTC
Description:
While using a "Tools -> Footnotes and Endnotes -> After" to set a proper indent betwen footnote number and footnote itself, I found that it's not work for DOC.

When I save ny file as ODT, all looks quiet good. But when I save it as Word 97-2003 DOC, whatever characters set in "Tools -> Footnotes and Endnotes", completely disappears both from menu settings and from text itself.

Steps to Reproduce:
1. Set Tools -> Footnotes and Endnotes -> After and type whatever (some spaces, f.e.)
2. Enter a footnote in text
3. Save file as ODT
4. Reload ODT file. All looks good: there are "after" characters
5. Save file as Word 97-2003 DOC
6. Reload DOC file. "After" characters disappears both in Tools menu window and in document's footnotes 

Actual Results:
Characters set in "After" section disappears and not applied to text

Expected Results:
Characters from "After" section is saved and applied in text


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 cbogdanov 2019-08-25 09:31:47 UTC
Created attachment 153632 [details]
Properly formatted ODF
Comment 2 cbogdanov 2019-08-25 09:32:18 UTC
Created attachment 153633 [details]
The same document in DOC, with bug
Comment 3 Dieter 2019-08-30 12:37:10 UTC
I confirm it with

Version: 6.4.0.0.alpha0+ (x64)
Build ID: 3e64065612acec2eb29aa21e2b515953422256d7
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@62-TDF, Branch:master, Time: 2019-08-15_22:57:26
Locale: de-DE (de_DE); UI-Language: en-US
Calc: threaded
Comment 4 Xisco Faulí 2019-09-02 15:53:27 UTC
Also reproduced in

Version: 4.3.0.0.alpha1+
Build ID: c15927f20d4727c3b8de68497b6949e72f9e6e9e

and

Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)
Comment 5 Julien Nabet 2020-02-28 09:29:55 UTC
I gave a try at https://www.howtogeek.com/359187/how-to-use-footnotes-and-endnotes-in-microsoft-word/ to create a brand new doc in Word 365.
I don't see the options "Before" or "After" for "endnote" or "footnote" in Word.

Perhaps we lose "Before" and "After" info because doc and docx format don't have these notions?
Comment 6 Justin L 2021-08-23 05:45:43 UTC
(In reply to Julien Nabet from comment #5)
> Perhaps we lose "Before" and "After" info because doc and docx format don't
> have these notions?

It should be possible to emulate this. I managed to add a bunch of junk using Word's "Custom mark". It ends up just being a normal run of text using the FootnoteReference character style.

<w:r>
  <w:rPr>
    <w:rStyle w:val="FootnoteReference"/>
  </w:rPr>
  <w:t>before</w:t>
</w:r>
<w:bookmarkEnd w:id="0"/>
<w:r>
  <w:rPr>
    <w:rStyle w:val="FootnoteReference"/>
  </w:rPr>
  <w:footnoteRef/>
</w:r>
<w:r>
  <w:t xml:space="preserve"> Here is my footnote.</w:t>
</w:r>
Comment 7 Justin L 2021-08-26 11:55:42 UTC
Created attachment 174556 [details]
Custom footnote.doc: made by Word 2016. LO opens poorly (same with DOCX)

On import, we basically just treat this as part of the footnote itself. So that probably could fairly easily be emulated for AFTER, but not for BEFORE.

In Word, this can be entered just by putting the cursor before/after the footnote character and typing whatever you want. So it is easy to create something like this.
Comment 8 Justin L 2021-08-26 15:50:23 UTC
Created attachment 174564 [details]
beforeAfterFootnotes.odt: don't make this look dumb during emulation

This blew apart my grand idea of DocxAttributeOutput::FootnoteEndnoteRefTag()
    OUString sSuffix = rInfo.GetSuffix();
    if (!sSuffix.isEmpty())
    {
        RunText(sSuffix);
        m_rExport.m_bAddFootnoteTab = false;
    }
Comment 9 Jackson Sul 2023-03-15 22:55:37 UTC
There isn't any workaround until this is fixed, is there? Maybe some way to add a space automatically to the beginning of the footnote text, as opposed to appending a non-clickable character to the footnote numeral? (That doesn't help with needing to add characters before the footnote numeral, of course.)

Just tired of manually going to each footnote and hitting space when I need to send someone a decently-formatted docx.