Bug 166044 - When Japanese is set in the end of footnote, two page numbers are inserted.
Summary: When Japanese is set in the end of footnote, two page numbers are inserted.
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.6.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected
Depends on:
Blocks: CJK Footnote-Endnote
  Show dependency treegraph
 
Reported: 2025-04-05 08:31 UTC by Saburo
Modified: 2025-04-07 20:06 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
end_of_footnote-test (54.95 KB, application/vnd.oasis.opendocument.text)
2025-04-05 08:32 UTC, Saburo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Saburo 2025-04-05 08:31:20 UTC
Description:
If you set Latin letters at the end of the footnote, there will be one page number, but if you set Japanese, two will be inserted.

Steps to Reproduce:
1.Open the attached file.

Actual Results:
Two page numbers will be inserted.

Expected Results:
A page number will be inserted.


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 25.2.2.2 (X86_64) / LibreOffice Community
Build ID: 7370d4be9e3cf6031a51beef54ff3bda878e3fac
CPU threads: 12; OS: Windows 11 X86_64 (10.0 build 26100); UI render: Skia/Vulkan; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: CL threaded

Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: a22f83249699b41317f2d6923878c369e0344598
CPU threads: 12; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Raster; VCL: win
Locale: ja-JP (ja_JP); UI: en-US
Calc: CL threaded

bibisected with win64-7.6
commit 6c0105307efa15837e9e5287103995312f373b67
author	Michael Stahl <michael.stahl@allotropia.de>	Wed Mar 08 13:10:55 2023 +0100
sw: fix stale SwNumberPortion follow flag

Somehow a SwNumberPortion can be split into 2 SwNumberPortions and the
2nd one ends up with a '\t' character that is then removed from the
portion and via some HookChar thing converted to a SwTabLeftPortion.

To add further insult, the SwTabLeftPortion is inserted between the
first SwNumberPortion and the empty SwNumberPortion, and then
SwLineLayout::CalcLine() deletes the empty one but the first one still
has the m_bHasFollow flag set.
Comment 1 Saburo 2025-04-05 08:32:20 UTC
Created attachment 200176 [details]
end_of_footnote-test
Comment 2 Nam 2025-04-07 18:17:12 UTC
Reproducible in latest stable:
Version: 25.2.2.2 (X86_64) / LibreOffice Community
Build ID: 7370d4be9e3cf6031a51beef54ff3bda878e3fac
CPU threads: 12; OS: Windows 10 X86_64 (10.0 build 19045); UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded

Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 22ef238e820955f6f8ac84781289b8a1d8e477b9
CPU threads: 12; OS: Windows 10 X86_64 (build 19045); UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded

Other Notes:
- Bug is locale independent (tested with locale ja-JP and en-US).
- Bug can also be produced with Arabic characters.
- Bug cannot be produced with Khmer or Korean characters.
- The bug is still present after adding a space after the end of footnote continuation notice.

Actions taken:
- Set status to NEW.