Bug 167680 - Figure number in captions and references incorrectly contain chapter title
Summary: Figure number in captions and references incorrectly contain chapter title
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
25.8.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Caption
  Show dependency treegraph
 
Reported: 2025-07-26 16:17 UTC by Hossein
Modified: 2025-09-08 18:51 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file that shows the caption numbering problem (413.01 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2025-07-26 16:17 UTC, Hossein
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hossein 2025-07-26 16:17:52 UTC
Created attachment 202009 [details]
Example file that shows the caption numbering problem

Description:
Figure numbers can contain chapter number. In this case, LibreOffice incorrectly embeds chapter title in the number.

Steps to Reproduce:
1. Open the attachment and look into figure captions, for example figure caption and reference in page 16.

Actual Results:
Figure caption number incorrectly contains chapter title. For example:
شکل فصل اول مقدمه (دستور العمل)‑1. نحوه ساخت قسمت جدید
This also happens for the cross references to the

Expected Results:
Figure caption numbering should only contain chapter number, and not its title:
شکل 1‑1. نحوه ساخت قسمت جدید

Reproducible: Always


User Profile Reset: Yes


Additional Info:
Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 6ca12f6eac3f34a00edcd4ba7e2a29e31d879456
CPU threads: 12; OS: Linux 6.2; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 1 raal 2025-07-28 15:03:18 UTC
Confirm with Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 8b60950947e8017b1f0b30538b6ef9a3bab51bee
CPU threads: 4; OS: Linux 6.8; UI render: default; VCL: x11
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded

Works in Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)
Comment 2 raal 2025-07-28 15:13:54 UTC
This seems to have begun at the below commit in bibisect repository/OS XXXX.
Adding Cc: to Michael Stahl ; Could you possibly take a look at this one?
Thanks
 a54d327fe32cc8323ce4f3b3d17357276eb36f98 is the first bad commit
commit a54d327fe32cc8323ce4f3b3d17357276eb36f98
Author: Jenkins Build User <tdf@maggie.tdf>
Date:   Tue Jun 11 14:31:19 2024 +0200

    source c48ed74eb6d269fb921bbfa808cc08b5892d4caa

168554: sw: evaluate undocumented STYLEREF field heading switch | https://gerrit.libreoffice.org/c/core/+/168554