Bug 148024 - Footnotes in sections with certain numbering types convert to Arabic numbering on ODF import
Summary: Footnotes in sections with certain numbering types convert to Arabic numberin...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:odf
Depends on:
Blocks: Footnote-Endnote Section
  Show dependency treegraph
 
Reported: 2022-03-16 08:51 UTC by Antonio
Modified: 2024-09-19 17:37 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
Two sections with wrong numbering (18.41 KB, application/vnd.oasis.opendocument.text)
2022-03-17 11:45 UTC, Antonio
Details
menu for change footnote in a section (44.91 KB, image/jpeg)
2022-03-17 15:26 UTC, gmolleda
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Antonio 2022-03-16 08:51:46 UTC
Creo una sección, que incluye notas al pie. 

Activo las notas al pie dentro de la sección y las personalizo con una numeración distinta. 

Grabo el documento, lo cierro, y cuando lo vuelvo a abrir ha desaparecido esa numeración diferente y me ha colocado la predeterminada. 

Entro en la configuración de la sección y me ha desactivado la numeración personalizada.
Comment 1 gmolleda 2022-03-16 20:41:16 UTC
Translated with Google:
I create a section, which includes footnotes.

I activate the footnotes within the section and customize them with a different numbering.

I save the document, close it, and when I reopen it, that different numbering has disappeared and the default has been placed.

I go into the section settings and the custom numbering has been disabled.

LO 7.3.0.3 LinuxMint 19.3
Comment 2 Timur 2022-03-17 11:32:59 UTC
Please attach a minimal sample file.
Comment 3 Antonio 2022-03-17 11:45:37 UTC
Created attachment 178940 [details]
Two sections with wrong numbering

The sections that appear in the text should have another type of numbering. But when you save and close the document and open it again, the initially chosen numbering has gone.
Comment 4 gmolleda 2022-03-17 15:26:31 UTC
Created attachment 178942 [details]
menu for change footnote in a section

See the screenshot with the menu where to change the character type: menu Format - Sections... select Section1 and push the button Options... then activate [v] Custom format and select the characters: *, ♱, ...

If save, close and open the file, that option "Custom format" is deactivated.
Comment 5 raal 2022-05-27 22:26:25 UTC
I cannot confirm with Version: 7.4.0.0.alpha1+ / LibreOffice Community
Build ID: b6e0ae1b1bad5e222e21bbb4b2a158c1fc6f9779
CPU threads: 4; OS: Linux 5.13; UI render: default; VCL: x11
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded Jumbo
Comment 6 Michael Stahl (allotropia) 2022-05-30 10:22:26 UTC
note the attachment ODT doesn't actually demonstrate the bug, it only contains style:num-format="1" which is the *result* of the bug.

this is not a regression and due to the following in SwFormatFootnoteEndAtTextEnd::PutValue()

        case MID_NUM_TYPE    :
        {
            sal_Int16 nVal = 0;
            rVal >>= nVal;
            if(nVal >= 0 &&
                (nVal <= SVX_NUM_ARABIC ||
                    SVX_NUM_CHARS_UPPER_LETTER_N == nVal ||
                        SVX_NUM_CHARS_LOWER_LETTER_N == nVal ))
                m_aFormat.SetNumberingType(static_cast<SvxNumType>(nVal));
            else
                bRet = false;
        }


this allows a few different numbering types on ODF import (and DOCX/RTF), but everything else is converted to SVX_NUM_ARABIC.

this code apparently exists since year 2000 and i have no idea why, does anybody know why would some formats be excluded?

note there is a different bug 145178 which is a regression in 7.1 that causes *every* number format to be converted to SVX_NUM_ARABIC.
Comment 7 Miklos Vajna 2022-05-30 12:07:41 UTC
The UI seems to also exclude some types of numberings, e.g. SVX_NUM_BITMAP. Perhaps the intention was something similar, just the UI & API are not in sync?
Comment 8 Eyal Rozenberg 2022-08-05 12:53:03 UTC
I can't reproduce this. Can someone post exact reproduction instructions?
Comment 9 gmolleda 2022-08-06 06:49:14 UTC
Steps:
1- Open Writer
2- Create section: menu Insert - Section...
3- Choose: Footnotes/Endnotes
4- Active: "Collect at end of text
5- Active: "Restart numbering"
6- Active: "Custom format"
7- Change 1,2,3... -> other numbering system: a,b,c... for example.
8- Press "Insert" button
9- Go to first line in the document, it is into the section
10- Write a text, for example "xxx"
11- Insert a footnote: menu Insert - Footnote and Endnote - Footnote
12- Appears the numbering system chose in the foot of page.
13- Write a text: "saluton" for example.
14- Save the document
15- Close the document or close writer
16- Open the document other time
17- The numbering system is 1,2,3...

My LO is:Version: 7.3.0.3 / LibreOffice Community
Build ID: 0f246aa12d0eee4a0f7adcefbf7c878fc2238db3
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: es-ES (es_ES.UTF-8); UI: en-US
Calc: threaded