Bug 144677 - To treat bookmarks as fields or as bookmarks, and not as formatting marks
Summary: To treat bookmarks as fields or as bookmarks, and not as formatting marks
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.5.2 release
Hardware: All All
: medium enhancement
Assignee: Heiko Tietze
URL:
Whiteboard: target:7.3.0
Keywords:
Depends on:
Blocks: Bookmarks
  Show dependency treegraph
 
Reported: 2021-09-23 08:28 UTC by John
Modified: 2021-10-01 08:30 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 John 2021-09-23 08:28:27 UTC
Description:
Currently, from the user's point of View, Writer treats bookmarks as formatting marks, but it doesn't make sense in my opinion.

Bookmarks are much closer to fields: in fact, they are used for almost the same purposes as "Insert > Cross-reference > Set Reference".

So I am sure that bookmarks should be treated (from the user's point of view) just as bookmarks or as fields, but not as formatting marks. This means that:

* Whether bookmarks are shown or not shouldn **not** be affected by toggling "View > Formatting Marks". Probably it should by "View > Bookmarks" or "View > Show Bookmarks" instead.

* They should not use the blue color. The blue color should stay reserved for formatting marks. It is probably much better to use shading for them. And this shading **should** be affected by "View > Field Shading".

* Bookmarks should be shown by default.

Steps to Reproduce:
see above

Actual Results:
see above

Expected Results:
see above


Reproducible: Always


User Profile Reset: No



Additional Info:
see above
Comment 1 V Stuart Foote 2021-09-23 20:30:14 UTC
+1

The Bookmark bracket [ & ] toggle <Ctrl>+F10 was done for bug 45589

But with the work still needed for bug 58434 to sort out the NPC and formatting marks, agree a bit more could be done with UI manipulating Bookmarks.

Possibly the Field related toggle highlight with <Ctrl>+F8, and expand the URI with <Ctrl>+F9)...
Comment 2 Heiko Tietze 2021-09-27 13:58:42 UTC
Grey looks good to me [1]. But I don't find easily how to bind bookmarks to fields. Likely a piece of cake to you, Michael.

[1] SwBookmarkPortion::DoPaint NON_PRINTING_CHARACTER_COLOR -> SwViewOption::GetFieldShadingsColor()
Comment 3 Michael Stahl (allotropia) 2021-09-27 14:15:09 UTC
If between the start and the end of a bookmark there is a 100 page table, do you want the entire table to be field-shaded?
Comment 4 Heiko Tietze 2021-09-28 06:01:53 UTC
(In reply to Michael Stahl (allotropia) from comment #3)
> If between the start and the end of a bookmark there is a 100 page table, do
> you want the entire table to be field-shaded?

You introduced a nice blue bracket, which is not questioned. But its visibility should not be bound to non-printing characters (ctrl+F10) but field shading (ctrl+f8).
Comment 5 Michael Stahl (allotropia) 2021-09-28 10:28:43 UTC
(In reply to Heiko Tietze from comment #4)
> You introduced a nice blue bracket, which is not questioned. But its
> visibility should not be bound to non-printing characters (ctrl+F10) but
> field shading (ctrl+f8).

ah, i may have misread this then, sitting in too many meetings...

i don't have an opinion on which menu item should toggle this.

guess you could change in sw/inc/viewopt.hxx the IsShowBookmarks() to check IsFieldShadings()/ViewOptFlags::FieldShadings instead of ViewOptFlags1::ViewMetachars or something along those lines...
Comment 6 Heiko Tietze 2021-09-29 15:05:06 UTC
https://gerrit.libreoffice.org/c/core/+/122829
Comment 7 Heiko Tietze 2021-09-29 17:56:09 UTC
@Michael: In 7.2 the hidden bookmark does hide when non-printing characters are switched off. But with master/7.3 I get just a field marker. Was this an intentional change or should I report it as bug?
Comment 8 Commit Notification 2021-10-01 08:28:23 UTC
Heiko Tietze committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/5836cd37b6d292b1b4e72d5a5a6dc9029c5cf730

Resolves tdf#144677 - Show bookmarks like fields

It will be available in 7.3.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 9 Heiko Tietze 2021-10-01 08:30:09 UTC
(In reply to Heiko Tietze from comment #7)
> ...with master/7.3 I get just a field marker.

Fooled by the options; too many hidden things. In this case it's Formatting Aids > Hidden Characters. Unfortunately not documented.

The requested switch from metachar to fields has been done -> resolved/fixed.