Bug 153680 - Period [.] incorrectly formatting in cross-reference to outline numbering paragraph
Summary: Period [.] incorrectly formatting in cross-reference to outline numbering par...
Status: RESOLVED DUPLICATE of bug 149635
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.2.0.1 rc
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL: https://ask.libreoffice.org/t/unwante...
Whiteboard:
Keywords:
Depends on:
Blocks: Fields-Cross-Reference regressions-loext-num-list-format
  Show dependency treegraph
 
Reported: 2023-02-17 01:30 UTC by Andrew Conley
Modified: 2024-04-23 03:15 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Example (8.22 KB, application/vnd.oasis.opendocument.text)
2023-02-17 01:33 UTC, Andrew Conley
Details
Example Windows (8.27 KB, application/vnd.oasis.opendocument.text)
2023-02-17 01:41 UTC, Andrew Conley
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Conley 2023-02-17 01:30:27 UTC
Description:
Previously, if I had the following outline numbering paras:

1.
   (a)

— and then inserted a cross-reference to (a) using ‘Number (full context)’, Writer would insert:

1(a)

Since upgrading to 7.3.7.2, it now inserts:

1.(a)

Steps to Reproduce:
1. Insert two levels of outline numbered paragraphs where the first level has a period [.] following the paragraph number.
2. Insert a cross-reference to the second level using ‘Number (full context)’.

NOTE: The unwanted behaviour does not occur if you insert a cross-reference to the first level. I.e. it will insert just ‘1’ without a period [.] following.

Actual Results:
1.(a)

Expected Results:
1(a)


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 7.3.7.2 / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: x11
Locale: en-AU (en_AU.UTF-8); UI: en-US
Ubuntu package version: 1:7.3.7-0ubuntu0.22.04.1
Calc: threaded

This behaviour started after I upgraded from 6.[?] to 7.3.7.2.

I posted about this here: https://ask.libreoffice.org/t/unwanted-change-to-cross-referencing-numbering-convention/87797

One comment said: This is the result of https://gerrit.libreoffice.org/c/core/+/117156. And please file this as a bug (about broken backward compatibility). It is related to https://bugs.documentfoundation.org/show_bug.cgi?id=144563.
Comment 1 Andrew Conley 2023-02-17 01:33:26 UTC
Created attachment 185418 [details]
Example
Comment 2 Andrew Conley 2023-02-17 01:41:31 UTC
I tried it on 7.4.5.1 in a Windows VirtualBox installation. Same problem.

See second attachment: ‘Example Windows’.

Version: 7.4.5.1 (x86) / LibreOffice Community
Build ID: 9c0871452b3918c1019dde9bfac75448afc4b57f
CPU threads: 2; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-GB
Calc: threaded
Comment 3 Andrew Conley 2023-02-17 01:41:48 UTC
Created attachment 185419 [details]
Example Windows
Comment 4 Andrew Conley 2023-02-17 01:42:14 UTC
Comment on attachment 185419 [details]
Example Windows

I tried it on 7.4.5.1 in a Windows VirtualBox installation. Same problem.

See second attachment: ‘Example Windows’.

Version: 7.4.5.1 (x86) / LibreOffice Community
Build ID: 9c0871452b3918c1019dde9bfac75448afc4b57f
CPU threads: 2; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-GB
Calc: threaded
Comment 5 Dieter 2023-03-04 18:32:28 UTC
Vasily, you've worked on bug 144563, so I assume, you can assess, if current behaviour is a bug or not

cc: Vasily Melenchuk
Comment 6 Stéphane Guillou (stragu) 2023-03-04 23:03:00 UTC
Back in 7.1, the dot was not included:

Version: 7.1.0.3 / LibreOffice Community
Build ID: f6099ecf3d29644b5008cc8f48f42f4a40986e4c
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

But back then, the behaviour was very inconsistent:
- only "before" character: kept
- only "after" character: stripped
- both "before" and "after" characters: both kept

Since 7.2, all "before" and "after" characters are kept:

Version: 7.2.7.2 / LibreOffice Community
Build ID: 8d71d29d553c0f7dcbfa38fbfda25ee34cce99a2
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

That was introduced by https://gerrit.libreoffice.org/c/core/+/117156, which mentions: "changed cross-references values to lists: they are now including full list label string"

However, the fix for bug 144563 restores the stripping of the final dot since 7.3.3 and 7.4.0 for MS Word compatibility reasons, but only when the full reference ends with it. E.g. "1." becomes "1", but "1.(a)" stays the same (as you've noticed already).

In my opinion, keeping all characters is more consistent. Why should the dot be stripped but not the parentheses? But I can understand the appeal of having the option to strip them or not, which could be done as described in bug 149635#c11

Also adding Heiko to CC, as he participated in related discussions.
Comment 7 Heiko Tietze 2023-03-06 09:36:49 UTC
Duplicate of bug 149635?
Comment 8 Stéphane Guillou (stragu) 2023-03-06 11:33:15 UTC
(In reply to Heiko Tietze from comment #7)
> Duplicate of bug 149635?

I'd say so. Andrew, would you agree such feature would fix your problem?

*** This bug has been marked as a duplicate of bug 149635 ***
Comment 9 Andrew Conley 2023-03-07 09:03:47 UTC
Yes, I think that something like the suggestions in bug 149635 would work.

But I add that, given that this worked a particular way for a long time, it seems to me that the default should be set to how it used to work. I.e., if I open a document from one year ago, I should not have to go through it and replace all of the cross-references.
Comment 10 Stéphane Guillou (stragu) 2024-04-23 02:25:09 UTC
(In reply to Stéphane Guillou (stragu) from comment #6)
> That was introduced by https://gerrit.libreoffice.org/c/core/+/117156, which
> mentions: "changed cross-references values to lists: they are now including
> full list label string"
Just explicitly quoting the commit: aa5c6d127559912ad60a63fbd972b78fb8f9691b (and its 7.2 cherrypick 9987b518fca1476bd0ce8c86bcf6ac7c81f7b580).

(In reply to Andrew Conley from comment #9)
> But I add that, given that this worked a particular way for a long time, it
> seems to me that the default should be set to how it used to work. I.e., if
> I open a document from one year ago, I should not have to go through it and
> replace all of the cross-references.

@Vasily, any comment about this?