Bug 164468 - Used "Line Numbering" Character Style not appearing in Styles Sidebar with "Applied Styles" selected
Summary: Used "Line Numbering" Character Style not appearing in Styles Sidebar with "A...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.8.4.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Sidebar-Styles
  Show dependency treegraph
 
Reported: 2024-12-26 18:37 UTC by Tex2002ans
Modified: 2025-01-11 14:12 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Line Numbering Every 2 Lines on Quote - Character Styles Test (36.78 KB, application/vnd.oasis.opendocument.text)
2024-12-26 18:38 UTC, Tex2002ans
Details
Simple Document with 2 Footnotes (11.67 KB, application/vnd.oasis.opendocument.text)
2025-01-11 14:12 UTC, Tex2002ans
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tex2002ans 2024-12-26 18:37:44 UTC
Description:
When "Applied Styles" is chosen, this should show all Character Styles currently being used in the document.

Steps to Reproduce:
In LO Writer:

0. Open attached ODT document.
1. View > Styles (F11)
2. Press on the "Character Styles" icon.
   - It's at the top, 2nd icon from the left.
3. At the far bottom-right corner of UI...
   - Select the dropdown.
   - Change from "All Styles" -> "Applied Styles".

Actual Results:
DOES NOT show "Line Numbering" Character Style in the list.

Expected Results:
Show "Line Numbering" in the list.


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 24.8.4.2 (X86_64) / LibreOffice Community
Build ID: bb3cfa12c7b1bf994ecc5649a80400d06cd71002
CPU threads: 8; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded

- - -

Side Note 1: This is similar to my Bug #159610, dealing with Frame Styles.

- - -

Side Note 2: I also noticed:

- "Spotlight" ON
   - Format > Spotlight > Character Styles

doesn't see this line numbering Character Style either.

(I suspect that problem would be solved too once LO correctly detects this is actively being used.)

- - -

Side Note 3: I created the test ODT using the default steps:

1. Tools > Line Numbering
   - By default, it applies the "Line Numbering" Character Style to it.
2. Checked box ON for "Show numbering".
3. Changed "Interval" from 5 -> 2 lines.
4. Pressed OK.

Then I mostly just followed the "To Add Line Numbers to Specific Paragraphs" instructions given in the LO 24.8 Writer Guide:

- https://help.libreoffice.org/latest/lo/text/swriter/guide/numbering_lines.html

(I was actually answering another user's question about generating line numbers on quotations:

- https://www.reddit.com/r/libreoffice/comments/1hmf5z3/reassociating_a_new_list_style_with_a_given/m3wliqa/

... then randomly stumbled upon this issue.)
Comment 1 Tex2002ans 2024-12-26 18:38:48 UTC
Created attachment 198270 [details]
Line Numbering Every 2 Lines on Quote - Character Styles Test
Comment 2 BogdanB 2024-12-27 05:20:46 UTC
I applied Line Numbering style to some text in a paragraph, and Writer is not detecting this style as being used in the paragraph.

Version: 24.8.4.2 (X86_64) / LibreOffice Community
Build ID: bb3cfa12c7b1bf994ecc5649a80400d06cd71002
CPU threads: 16; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded
Comment 3 V Stuart Foote 2024-12-27 12:50:13 UTC
Stanza in the styles.xml is:

<text:linenumbering-configuration text:style-name="Line_20_numbering" text:restart-on-page="true" text:offset="0.2in" style:num-format="1" text:number-position="left" text:increment="2"/>

While the Quotations paragraph style is structured with a 'text:number-lines="true"' and Text Body paragraph style inherits from Standard (Default PS) and is set false.

The number lines are applied to the <P2> styled paragraphs. While a color change made to "Line numbering" in the Styles deck UI asserts, but confirm the style is not listed in UI as being applied.

Conversely, if I create new paragraph (Default standard) and then apply the "Line numbering" Character style to it. It does show in the applied character styles, as well as the Spotlight taking a color superscript number for the style. No different than other Character styles, e.g. Emphasis or Strong Emphasis.

So issue is not that the "Line numbering" character style is not recognized in the SB Deck, rather that it is a *nested* style characteristic of the Paragraph style? And only manipulated per Paragraph from its "Outline & List" panel.

But yes, it would make sense if the nested "Line numbering" character style shows as applied as well as when spotlighted. Just not sure it can be detected when it is nested inside a PS.
Comment 4 Tex2002ans 2025-01-11 14:12:32 UTC
Created attachment 198489 [details]
Simple Document with 2 Footnotes

Hmm... this issue may be larger than I first reported.

- - -

I just ran across this same exact thing when ADDING A FOOTNOTE.

Except with these 2 Character Styles instead:

- Footnote Anchor
- Footnote Characters

Attached is a very simple ODT with 2 inserted footnotes.

- - -

BUG: If I insert a footnote, then have:

- Applied Styles

option chosen in sidebar...

EXPECTED: These 2 used footnote Character Styles to appear in the list, so you know that it's possible to manipulate them.

- - -

Side Note: I just tried it with inserting a link with Ctrl+K, and the:

- "Internet Link" Character Style

DOES APPEAR in the applied sidebar fine.

(But then links DO NOT highlight in-document when "Spotlight" is applied.)

So there might be some hardcoded paths happening here... where:

- Some built-in Character Styles are taking one way.
--- Internet Link
- Other built-in Character Styles are taking a 2nd path.
--- Line Numbering
--- Footnote Characters
- Spotlight is taking a 3rd way.

- - -

Note: I stumbled across this just this morning while writing a tutorial.

The user wanted "the footnote number at bottom of page to be superscript instead":

- https://old.reddit.com/r/libreoffice/comments/1hymdri/footnote_format/m6knlda/

I always have "Applied Styles" on, but rarely go venturing deep into Character Styles.