Bug 143066 - TOC: Give option to switch off spell checking for table of contents
Summary: TOC: Give option to switch off spell checking for table of contents
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.2.0.0 alpha1+
Hardware: All All
: medium enhancement
Assignee: Heiko Tietze
URL:
Whiteboard: target:7.3.0 target:7.2.0.2
Keywords:
Depends on:
Blocks: TableofContents-Indexes Spell-Checking
  Show dependency treegraph
 
Reported: 2021-06-25 11:00 UTC by Adalbert Hanßen
Modified: 2021-08-03 11:21 UTC (History)
2 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 Adalbert Hanßen 2021-06-25 11:00:57 UTC
If I have a multilingual document with multilingual headlines, spell checking in the headlines of the automatically generated table of contents (TOC) should be off by default in the styles associated with the table of content.

If there are spelling errors in a headline, they will be flagged and can be corrected there. The corrections automatically spill over to the TOC once this is updated.

The current behaviour is not a bug. My proposal is merely an enhancement.

Currently I have to edit the languages for all headlines in the TOC for each style sheet.

Unfortunately there is no option to extend the language selection along the dependency of styles. It would also make sense to let one choose whether to extend or not

the chosen language, (if it is handled internally like the other properties)
the chosen colour,
the chosen font,
the chosen obliqueness,
the chosen language or none 

to all lower styles of that category.

By the way: It is quite unclear to me, whether the spell checking language is a property which can be set in two ways like many others (colour, slant, font, ...) which might be set by direct formatting or by styles (direct formatting prevailing if present). When writing documents on software, where you have single words in the text which have e.g. the "source" style, if you change the language for the paragraph, it also extends to single words or characters of with the "source" character style making them misspelled in many cases.

One might consider to prepend the execution of direct formatting like changes of the spell-check language -if there are parts affected, which have the "no spell check" set- with this question: "Do you really want to set the spell check language for those included parts, which have the property "no spell checking"? No / Yes / Cancel   (where No should be the default).
Comment 1 Dieter 2021-07-15 06:25:34 UTC
(In reply to Adalbert Hanßen from comment #0)
> If I have a multilingual document with multilingual headlines, spell
> checking in the headlines of the automatically generated table of contents
> (TOC) should be off by default in the styles associated with the table of
> content.

So if I understand correct, the aim is to give an option to avoid spell checking in TOC. Please correct me, if I'm wrong.
You made a proposal for that. Perhaps it is also possible to add a checkbox within the TOC dialog.

cc: Design-Team for further input and decision
Comment 2 Adalbert Hanßen 2021-07-15 08:54:03 UTC
Yes Dieter, something to switch off spell checking in the TOC is one part of my proposal (among others).

Presently one already can switch off spell checking in all styles associated with the TOC. Unfortunately it is a bit tedious because you have to set it that way for each level of a headline in the TOC separately. The most urgent part of my suggestion would even be quite simple to implement: One would only need to preset "no spell check" for the paragraph formats of the headings in the TOC.

Digging a spade deeper, when setting the properties of hierarchically organized style sheet elements of headings in the document and those in the TOC, one would ask if what is set for font and markup (font, size, color, slant, boldness, language, etc) should also be applied to all levels below at the moment one sets that.
Comment 3 Heiko Tietze 2021-07-19 14:42:18 UTC
Since changing the content of fields is not possible neither ignoring the words in the document has an effect on the ToC, I agree with the request and would change the language for all "Index" styles to "None". This setting applies to all subordinated styles.

Patch at https://gerrit.libreoffice.org/c/core/+/119222
Comment 4 Commit Notification 2021-07-20 05:03:41 UTC
Heiko Tietze committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/137a1d5380e310a43d36932c643e1331a94fd70d

Resolves tdf#143066 - Language set to None for indices

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 5 Commit Notification 2021-07-23 05:04:48 UTC
Heiko Tietze committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

https://git.libreoffice.org/core/commit/4b5dd477bbe1647c6c60374da2e4cabcf5b6b58b

Resolves tdf#143066 - Language set to None for indices

It will be available in 7.2.0.2.

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 6 Adalbert Hanßen 2021-07-28 16:10:22 UTC
(In reply to Commit Notification from comment #5)
> Heiko Tietze committed a patch related to this issue.
> It has been pushed to "libreoffice-7-2":
> 
> https://git.libreoffice.org/core/commit/
> 4b5dd477bbe1647c6c60374da2e4cabcf5b6b58b
> 
> Resolves tdf#143066 - Language set to None for indices
> 
> It will be available in 7.2.0.2.
> 
> ...

Thanks, I have tested it and I am happy with the improvement.

Unfortunately I came across another bug in the TOC, which I have reported as https://bugs.documentfoundation.org/show_bug.cgi?id=143589, since ti si not related to this one, which is an improvement rather than a bug. Thanks for providing the improvement!
Comment 7 Dieter 2021-08-03 11:21:48 UTC
(In reply to Adalbert Hanßen from comment #6)
> Thanks, I have tested it and I am happy with the improvement.

=> VERIFIED FIXED