Bug 159382 - DOCX import: Large space between footnote number and following text, when paragraph has hanging indent
Summary: DOCX import: Large space between footnote number and following text, when par...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:24.8.0 target:24.2.1
Keywords:
Depends on:
Blocks: DOCX-Footnote-Endnote
  Show dependency treegraph
 
Reported: 2024-01-26 10:03 UTC by Mike Kaganski
Modified: 2024-05-07 05:23 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
A footnote with paragraph having a hanging indent (13.93 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2024-01-26 10:03 UTC, Mike Kaganski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2024-01-26 10:03:01 UTC
Created attachment 192176 [details]
A footnote with paragraph having a hanging indent

The attached document is created from scratch in Word; it has a footnote. The single change of formatting was making footnote's paragraph style to use a hanging indent.

In Word, the footnote number is immediately followed by the text. In Writer, it is followed by a space (up to the 0.5" position of the hanging indent), after which the footnote text starts.

The problem is caused by the code in SwNumberPortion::Format, which explicitly checks if the portion is a footnote numbering; and then increases the portion's width to the difference between the first line indent and left indent. This check was added in commit 5a42d33f51c7e29ed1f0cefc13458c71aca11060 (INTEGRATION: CWS swqbugfixes05 (1.45.110); FILE MERGED, 2004-09-20) for #i32902#. So it is required, at least for (existing) ODF.

Hence, a new compat option is needed (set in Word documents import), which would be checked in the code, too.
Comment 1 Commit Notification 2024-01-27 04:02:44 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2e41b639fc4056e4f944bb2272735d9daddfb521

tdf#159382: introduce a Word compat flag for hanging footnote number spacing

It will be available in 24.8.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.
Comment 2 Commit Notification 2024-01-27 04:02:46 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/830a3894ac98179fb78d6f1fdb409a51faab0c95

tdf#159382: add NoSpaceAfterHangingFootnoteNumbering compat option to dialog

It will be available in 24.8.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.
Comment 3 Commit Notification 2024-01-28 03:34:45 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/d3f0e7867555dbf55a3e6be48e6c7bf957ef8907

tdf#159382: make edits of compat option in dialog apply immediately

It will be available in 24.8.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.
Comment 4 Commit Notification 2024-01-28 11:15:24 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/a93dbb720c981cf48284ccbabda6db67d4be930b

Related: tdf#159382 Naming is hard: make initial monster shorter

It will be available in 24.8.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.
Comment 5 Commit Notification 2024-01-30 09:58:18 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

https://git.libreoffice.org/core/commit/87f11c2961cd4bb8be6bc8f62442a706da0420b7

tdf#159382: introduce a Word compat flag for hanging footnote number spacing

It will be available in 24.2.1.

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.
Comment 6 Commit Notification 2024-01-30 09:59:21 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

https://git.libreoffice.org/core/commit/dbb8a9c01fd6693df32f0a9c023b7be2c623cf7a

Related: tdf#159382 Naming is hard: make initial monster shorter

It will be available in 24.2.1.

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.