Bug 128973 - Create a per-document "Paragraph style used by default" setting
Summary: Create a per-document "Paragraph style used by default" setting
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Writer-Styles-Paragraph
  Show dependency treegraph
 
Reported: 2019-11-23 07:56 UTC by Mike Kaganski
Modified: 2019-12-23 14:36 UTC (History)
7 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 Mike Kaganski 2019-11-23 07:56:32 UTC
Using styles properly in Writer, among other things, means not using Default paragraph style directly (which is almost never a good idea, because Default style is the root of the inheritance hierarchy, and so fine-tuning it to satisfy "main text body" requirements would propagate those changes on all styles in the hierarchy which don't explicitly override them).

But currently not only shipped templates start with the Default style, but also:

1. A document created without any templates (= from pre-compiled defaults) starts with the Default paragraph style (despite having normal set of styles);
2. Using "Clear formatting" from "Set Paragraph Style" drop-down in the toolbar resets to Default style;
3. Using Alt+Enter to leave the last cell of a table makes the following paragraph use the Default style;
... there are more.

The proposal is to add a configurable per-document "Use this style by default", which would make all cases where we reset to Default now, to reset to that chosen style instead. In the documents created without a template, it should be the "Text Body" style. The style marked that way should be marked (e.g., by a green checkmark) in the styles list; is should be made "used" in the document (and not deletable). It should not be a style's property (or else it would introduce uncertainties when copying such styles from one document to another with own defaults, and provoke bugs with multiple defaults), but the document's property.

This needs no changes to the ODF (because it only requires a setting that modifies controls behaviour, not document/styles behaviour; it should be in <office:settings> under "ooo:configuration-settings").
Comment 1 V Stuart Foote 2019-11-23 08:25:04 UTC
+1, and an alternative solution to bug 47295. 

But then I'd suggest a style fall back to 'Text Body' will need some design tweaks. Majority of language scripts are best rendered as the font designer intended with Single line spacing. That has been achieved with metrics of the 'Default' fallback paragraph style--Single line space and no additional inter paragraph spacing.

As a new fallback, the current 'Text Body' line spacing at 115% of font metric with inter paragraph spacing is better adjusted to 100% of font metric, with no inter paragraph spacing.

Doing that while implementing a proposed 'Paragraph style used by default' keeps us in line with the WONTFIX of bug 113517.
Comment 2 Mike Kaganski 2019-11-23 09:24:30 UTC
(In reply to V Stuart Foote from comment #1)
> But then I'd suggest a style fall back to 'Text Body' will need some design
> tweaks. Majority of language scripts are best rendered as the font designer
> intended with Single line spacing. That has been achieved with metrics of
> the 'Default' fallback paragraph style--Single line space and no additional
> inter paragraph spacing.
> 
> As a new fallback, the current 'Text Body' line spacing at 115% of font
> metric with inter paragraph spacing is better adjusted to 100% of font
> metric, with no inter paragraph spacing.

I suppose we need some new bug about that, which would block this (and tdf#47295), with specific discussion of problems that 115% creates (in which scripts; in which scenarios: lists, tables, ... ?), with screenshots etc. I suppose that RGB's tdf#94464 was also fixed in not a way that OP imagined, because of lack of understanding of complexity behind fonts and their metrics and typography in general. So some kind of clean new report (meta?) with systematic description of visible problems and their origins would be useful IMO.
Comment 3 Heiko Tietze 2019-11-25 07:40:59 UTC
I fully support the switch from Default to Text Body (with the needed effort around) and considering Text Body is the last resort for Reset, which by the way likely close to zero users need, is this style. Why do we need it flexible with "Text Body 115%" for example? It rather adds confusion since "Make default" is easy to misinterpret. 

So my take: duplicate of bug 47295.
Comment 4 Mike Kaganski 2019-11-25 07:58:33 UTC
(In reply to Heiko Tietze from comment #3)
> Why do we need it
> flexible with "Text Body 115%" for example? It rather adds confusion since
> "Make default" is easy to misinterpret. 

Because Text Body, like all other pre-defined styles, are just one possible set of styles user in some place. Some other user-defined set of styles might be used somewhere (there are many "do not use pre-defined styles!" advises over there; and there might be even good reasons for such a decision, e.g. in circumstances where importing others' documents should keep original formatting, and at the same time not break current document formatting, so two distinct sets of styles are needed).

So hardcoding to Text Body is limiting flexibility of using styles.
Comment 5 Heiko Tietze 2019-11-25 08:33:52 UTC
Hm... still little benefit and some potential for misunderstanding. Admittedly nice for expert users.
Comment 6 Thomas Lendo 2019-11-28 00:28:23 UTC
I like the idea! Looks like a nice addition of a new neat setting in the Writer section of LibO options.

As Stuart wrote, this must be implemented with fixing bug 47295.

Personally I use a own set of paragraph styles for instructions (operator manuals). Having such setting would it make easier to avoid that a false basic paragraph style is used accidentally e.g. by careless colleagues.