Bug 142555 - CROSS-REFERENCES DIALOG: If "Headings" is selected as type, "Chapter" should be removed from "Refer using"-list
Summary: CROSS-REFERENCES DIALOG: If "Headings" is selected as type, "Chapter" should ...
Status: RESOLVED WONTFIX
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: low enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: difficultyMedium, easyHack, skillCpp, topicUI
: 148272 (view as bug list)
Depends on:
Blocks: Cross-reference-dialog
  Show dependency treegraph
 
Reported: 2021-05-29 10:31 UTC by Eyal Rozenberg
Modified: 2023-02-20 10:16 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eyal Rozenberg 2021-05-29 10:31:05 UTC
In LO, the term "Chapter numbers" or "Chapter numbering" actually refers to the default numbering for Heading paragraphs (Heading 1, Heading 2 etc.)

When we insert a cross reference (using the Cross-Reference dialog), we can choose to have the text of the reference be either "Number" or "Chapter". For references to numbered (non-heading) paragraphs, these are different; but for references to Headings, these are the same thing: The paragraph number of a Heading is also its Chapter number.

Now, you could ask: "What if I manually change the numbering for an individual heading paragraph, making it different than the general 'Chapter Numbering'?"

Well, the answer is that both the "Number" and the "Chapter" options in the Cross-Reference dialog will still give you the same thing: The number you set manually, not what the Chapter Numbering dictates.
Comment 1 Dieter 2021-06-13 05:51:08 UTC
(In reply to Eyal Rozenberg from comment #0)
Thank you for reporting the bug

> Now, you could ask: "What if I manually change the numbering for an
> individual heading paragraph, making it different than the general 'Chapter
> Numbering'?"
Not clear to me, how you do this (and why). Could you please attach an example?


> Well, the answer is that both the "Number" and the "Chapter" options in the
> Cross-Reference dialog will still give you the same thing: The number you
> set manually, not what the Chapter Numbering dictates.
It is also not clear to me, what do you expect or what your propoal is. Please explan.

=> NEEDINFO
Comment 2 Eyal Rozenberg 2021-06-14 19:12:53 UTC
(In reply to Dieter from comment #1)
> (In reply to Eyal Rozenberg from comment #0)
> Thank you for reporting the bug
> 
> > Now, you could ask: "What if I manually change the numbering for an
> > individual heading paragraph, making it different than the general 'Chapter
> > Numbering'?"
> Not clear to me, how you do this (and why). Could you please attach an
> example?

Suppose you have your "Chapter Numbering" (which is a mis-nomer BTW) set to some scheme. You can take a, say, Heading 2 paragraph, and using the Styles sidebar, apply a different list/numbering style to it. This might not be such a great idea, but it works.

> It is also not clear to me, what do you expect or what your propoal is.
> Please explan.

Ok, never mind the "ultra-clever" question. The point is we have that we have two entries which do the same thing in the cross-ref dialog. If you set the Type to Heading, then "Chapter" and "Number" will insert the same thing. So there's no sense in having them both.
Comment 3 QA Administrators 2021-06-15 03:42:21 UTC Comment hidden (obsolete)
Comment 4 Dieter 2021-06-15 06:31:43 UTC
(In reply to Eyal Rozenberg from comment #2)
> Ok, never mind the "ultra-clever" question. The point is we have that we
> have two entries which do the same thing in the cross-ref dialog. If you set
> the Type to Heading, then "Chapter" and "Number" will insert the same thing.
> So there's no sense in having them both.

No, they are not the same. "Headings" only refers to the settings in the chapter numbering dialog and shows also chapter headings, that are not numbered. "Number" shows various kinds of numbered paragraphs [1], but not unnumbered chapter headings.

So the two types are only overlapping when headings are numbered (for example that's not the case in every LO manual)

So it wouldn't be a solution to remove "Headings" entry, like you propose
=> RSOLVED NOTABUG

Feel free to change it back to UNCONFIRMD with a short reasoning, if you disagree.

[1] https://help.libreoffice.org/7.2/en-US/text/swriter/01/04090002.html
Comment 5 Eyal Rozenberg 2021-06-15 08:23:00 UTC
(In reply to Dieter from comment #4)
> If you set
> > the Type to Heading, then "Chapter" and "Number" will insert the same thing.
> > So there's no sense in having them both.
> 
> No, they are not the same. "Headings" only refers to the settings in the
> chapter numbering dialog and shows also chapter headings, that are not
> numbered. "Number" shows various kinds of numbered paragraphs [1], but not
> unnumbered chapter headings.

You're misunderstanding. Indeed, these aren't the same when you're referring to various kinds of numbered paragraphs. But they _are_ the same when it comes to Heading N paragraphs. Those have their own Type in the cross reference dialog.

> So it wouldn't be a solution to remove "Headings" entry, like you propose

That's not what I propose. I propose to remove it _for the Headings type only_.
Comment 6 Dieter 2021-06-15 08:26:16 UTC
(In reply to Eyal Rozenberg from comment #5)
> That's not what I propose. I propose to remove it _for the Headings type
> only_.

Sorry, still not sure, if I understand you're idea. But anyway, it's up to the design-team to decide change in UI

cc: Design-Team
Comment 7 Heiko Tietze 2021-06-15 13:25:05 UTC
Not perfectly clear to me too. I see two areas that might be relevant:

"Insert reference to" Chapter, Number (with or without context) are empty references for the default headings without a list style. But let's assume you change the heading later and either remove or add the number. Blocking is not an option.

Number and chapter are the same for headings with a list style. But Dieter made his point in comment 4.
Comment 8 Eyal Rozenberg 2021-06-15 15:42:05 UTC
(In reply to Heiko Tietze from comment #7)
> Number and chapter are the same for headings with a list style. But Dieter
> made his point in comment 4.

You just agreed with my observation, which explains why Dieter's point in comment 4 is not relevant to my proposal..

> Not perfectly clear to me too. 

What is unclear about proposing to remove an item from a list box in some cases?  :-(


> "Insert reference to" Chapter, Number (with or without context) are empty
> references for the default headings without a list style. But let's assume
> you change the heading later and either remove or add the number. Blocking
> is not an option.

That's an interesting question but AFAICT it is entirely orthogonal to this bug.
Comment 9 Dieter 2021-06-15 15:56:42 UTC
(In reply to Eyal Rozenberg from comment #8)
> What is unclear about proposing to remove an item from a list box in some
> cases?  :-(

O. K., my (probably) last try to understand it. Your proposal is to delete "Headings" from the type list. I'm against this idea, because in this case, it's no longer possible to select unnumbered headings as target of a cross-reference.
Comment 10 Eyal Rozenberg 2021-06-15 17:57:43 UTC
(In reply to Dieter from comment #9)
> O. K., my (probably) last try to understand it. Your proposal is to delete
> "Headings" from the type list. I'm against this idea, because in this case,
> it's no longer possible to select unnumbered headings as target of a
> cross-reference.

No, not all.

Let me state my suggestion one more time:

The cross-reference dialog has (among others) the list boxes "Type" and "Insert Reference To".

I suggest that when "Headings" is selected in the "Type" listbox, the "Insert Reference To" list will keep the "Number" item but lose the "Chapter" item. But when anything else is selected in the "Type" list box, nothing will change from the current state of affairs.
Comment 11 Dieter 2021-06-27 11:01:47 UTC
Now I understand. I changed bug summary to make the suggestion more clear. I don't have a certain opinion about it. Design-Team should decide => Heiko, waht do you think?
Comment 12 Heiko Tietze 2021-06-28 08:33:24 UTC
So the point is that "Number" refers to the "Toggle Numbered List" function while "Chapter" is what you set per dialog "Chapter Numbering". But actually both do the same - and the cross-reference itself has the same target (field name).

I agree on removal of Chapter.

Code pointer:

sw/source/ui/fldui/fldref.cxx SwFieldRefPage::FillFormatLB()
Comment 13 Heiko Tietze 2022-03-24 13:43:14 UTC
Bug 147774 makes it clear that both Chapter and Number are needed. Consequently this request is a WF.
Comment 14 Heiko Tietze 2022-04-14 14:23:39 UTC
*** Bug 148272 has been marked as a duplicate of this bug. ***