Bug 148237 - crossreference field for footnote and endnote in Navigator should identify the field as footnote or endnote
Summary: crossreference field for footnote and endnote in Navigator should identify th...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.4.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.4.0
Keywords:
Depends on:
Blocks: Navigator
  Show dependency treegraph
 
Reported: 2022-03-28 12:38 UTC by sdc.blanco
Modified: 2022-04-18 21:39 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
demonstration of problem (17.31 KB, application/vnd.oasis.opendocument.text)
2022-03-28 12:38 UTC, sdc.blanco
Details
overview about field names (15.57 KB, application/vnd.oasis.opendocument.text)
2022-04-13 06:10 UTC, Dieter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sdc.blanco 2022-03-28 12:38:35 UTC
Created attachment 179168 [details]
demonstration of problem

Attached file demonstrates basic problem -- that Navigator does not identify footnotes and endnotes in crossreferences explicitly -- where it is expected that it should. (Instead it appears to use the number of the footnote or endnote.)
Comment 1 Dieter 2022-04-12 16:33:30 UTC
I confirm the described behaviour with

Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: d34d1db55978bdcff082af1e0f75b18fa6fc94f4
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

But I'm not sure, that this is a bug. Navigator entry displays "cross reference - [field name] - [field entry]". Sounds O. K. for me. Question is, if field name for footnotes should just display footnote number or the also the cross-reference type. I think, bug is in field name (or perhaps enhancement request). File names are correct for Bookmarks and Headings

Similar: bug 45048

What do you think? => NEEDINFO
Comment 2 sdc.blanco 2022-04-12 21:41:25 UTC
Thanks for the thorough evaluation Dieter.

I suggest that the display in Navigator should be:

crossreference - footnote - [number of footnote that appears in Selection listbox in Edit Fields dialog]
crossreference - endnote - [number of endnote that appears in Selection listbox in Edit Fields dialog]


Additional information:

1. In 7.2.6.2, actual display for Footnotes and Endnote is:  crossreference - 

2. In 7.4.0.0, Build ID: d34d1db55978bdcff082af1e0f75b18fa6fc94f4
   
   In attachment, use Edit Fields on cross-reference to Footnote 1.
   Choose "1 Footnote 1" in Selection and "Above/Below" in "Refer using"
   
   Actual result: cross-reference - under - under

3. 21b5d6e0dce7c2034aded96d1499da27094e2781 might be relevant to this situation.

4. (slightly off-topic) 

In 7.4.0.0, Build ID: d34d1db55978bdcff082af1e0f75b18fa6fc94f4, inspired by bug 45048, insert several Field Statistics, with different Selections.  

Actual (nice) result:  field - Statistics - Pages 2
                       field - Statistics - Paragraphs - 19
                       field - Statistics - Words - 83

(makes it possible to hide the fields in the text (or template), and follow the data in Navigator).
Comment 3 Dieter 2022-04-13 06:10:45 UTC
Created attachment 179499 [details]
overview about field names

Not sure, if comment 2 is an answer to my question.

Steps to reproduce:
1. Open attachment
2. Enable field names (Strg+F9)

Actual result:
Field name for footnotes end endnotes display page number

Expected result:
Field name for footnotes and endnotes schuld display something with "footnote" and endnote"

Tested with
Version: 7.3.2.2 (x64) / LibreOffice Community
Build ID: 49f2b1bff42cfccbd8f788c8dc32c1c309559be0
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL
Comment 4 sdc.blanco 2022-04-13 07:03:40 UTC
@Dieter -- you have focused on the appearance of the field in the document.

But please note that the OP was about the appearance in *Navigator* (as noted in the original summary and in Comment 2). 

Please look at the Navigator in your attachment in comment 3 -- it will show what the OP was about. 

Please also note: my Additional Comment 4 (about Statistics) was referring to the appearance in "Navigator"

I would kindly ask you to re-read Comment 2, but now with the understanding that I am always referring to the appearance in Navigator (and not the field in the document).
Comment 5 Dieter 2022-04-13 07:11:33 UTC
(In reply to sdc.blanco from comment #4)
> @Dieter -- you have focused on the appearance of the field in the document.
> 
> But please note that the OP was about the appearance in *Navigator* (as
> noted in the original summary and in Comment 2). 

Yes, but navigator displays field names as I stated in comment 1. So the bug you've reported is not a bug itdelf, but only a consequence of the bug I've described.
Comment 6 sdc.blanco 2022-04-13 07:21:23 UTC
(In reply to Dieter from comment #5)
> but navigator displays field names as I stated in comment 1. 
Are you sure about that?  I seem to remember some instances where appearances were being changed in what Navigator was displaying.  

Also what I am proposing does (should) not require any changes in the field.
Comment 7 sdc.blanco 2022-04-14 14:50:24 UTC
Seeking a second opinion about the "diagnosis" in this ticket.

cc: raykowj
Comment 8 Jim Raykowski 2022-04-16 07:01:01 UTC
Here is a patch to make Navigator show 'Footnote' and 'Endnote' as the field name for field cross references to footnotes and endnotes:

https://gerrit.libreoffice.org/c/core/+/133092
Comment 9 sdc.blanco 2022-04-16 09:30:14 UTC
(In reply to Jim Raykowski from comment #8)
> Here is a patch to make Navigator show 'Footnote' and 'Endnote' as the field
Thanks Jim!  I figured that Navigator (with help from you) could "solve" this problem without having to change the field behavior. 

I can also see that you make the Statistics Field in Navigator have the information requested in bug 45048. Really handy.  And it is really handy to be able to use Navigator to open Fields for editing (much easier than trying to right-click in the right place in the document).
Comment 10 Commit Notification 2022-04-17 03:22:29 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/8f27cde891cc925d5ff76a736fb54dd70e53b4ee

tdf#148237 Show 'Footnote' and 'Endnote' as field name for field cross

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Jim Raykowski 2022-04-17 03:42:23 UTC
(In reply to sdc.blanco from comment #9)
> I can also see that you make the Statistics Field in Navigator have the
> information requested in bug 45048.
That wasn't done as part of this patch. I didn't know about bug 45048 until you mentioned it.
Comment 12 sdc.blanco 2022-04-18 21:38:51 UTC
(In reply to Jim Raykowski from comment #11)
> I didn't know about bug 45048 
I didn't know about bug 45048 either. It was raised as part of evaluating the OP.
At any rate, it seems that you independently created for Navigator what was being requested for fields. In effect, you have provided a workaround for bug 45048.
Comment 13 sdc.blanco 2022-04-18 21:39:42 UTC
Verified with:

Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: f8e11c6480ff0005715b989a6d4e2e10a3816cf6
CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: da-DK (da_DK); UI: en-US
Calc: CL

Thanks Jim, much more useful/informative now.