Bug 153309

Summary: Support disabling direct formatting
Product: LibreOffice Reporter: Vito Caleandro <kalosandros>
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: enhancement CC: cno, dgp-mail, eyalroz1, heiko.tietze, mentoring, mikekaganski, vsfoote
Priority: medium Keywords: easyHack, needsDevAdvice
Version: Inherited From OOo   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=161149
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 127204    
Attachments: Screenshot MSO

Description Vito Caleandro 2023-02-01 15:39:03 UTC
Description:
During collaboration on the same document by more people may be important to avoid proliferation of styles (characters and paraphs, lists and more). So it is important to do a chance to block direct formatting and force contributors to use only predefined styles.

Actual Results:
Direct formatting is always permitted

Expected Results:
Use only predefined styles (character, paragraphs, and more)


Reproducible: Always


User Profile Reset: No

Additional Info:
Prevent direct formatting by a password is an essential feature in collaboration onto complex documents by different people.
Comment 1 Heiko Tietze 2023-02-16 10:41:59 UTC
You can modify the UI per document; quite flexible but tedious and not really what you want.

Rather than blocking features (doubt we can do it properly) I'd warn or just inform about direct formatting. The idea was to have a style highlighter, for just DF see bug 106556.

Would you agree to make your ticket a duplicate, Vito?
Comment 2 Heiko Tietze 2023-05-10 11:07:45 UTC
No response, resolving ID.

We do have special UI for style focused work; yet it might not be sufficient to ensure style and formatting free collaboration.
Comment 3 Hartmut Schorrig 2024-05-07 22:25:46 UTC
The problem of direct formatting is, many people want to do it. If it is made more difficult, it will cause resentment among normal users. But professional users should know the advantage of indirect formatting, especially it is also familiar in such tools as Latex & co. 
But professional users (document managers in companies) often have to be convinced of the usefulness of indirect formatting. It means the problem is first time a problem of coaching, information. Not a problem of documentation and not a problem of LibreOffice. 
But this is precisely why there should be a mode that either prohibits direct formatting or makes it more difficult (with hints), consistently prohibiting it. This must be simple able to be switched on and off. (not with a password, that's nonsense or bullying). 
Then, if the users are informed about the concept of indirect formatting, incl. speaking about which styles, its meaning, also the styles should be concerted (!), then existing direct formatting parts should be able to higlight, (for ex. yellow background), to remove the direct formatting and think about (!) what to do instead (!). This is hard editing working on the text. Do it step by step, any day a part. For LibreOffice it means, this higlighting of direct formatted parts should be on and off switchable, should not disturb the normal work. 
The problem whether there are direct formatting parts in a text is not a problem of ban and passwords, it is a problem of able to evaluate where there are direct formatting parts. And a chief can say to the staff people, please remove it. 
It is a similar situation when there are meaningful style guides in a programming language (C/++), which are checked with a tool and must necessarily be fixed by the programmers in order to have a proper result.
It means we need two things:
a) Switch on/off possibity and support of direct formatting (for ex. ctrl-I for italic or the buttons for selecting colors)
b) Switch on/off buttons for showing direct formatting parts. To clean it, the ctrl-m exists, that is proper.
Comment 4 Hartmut Schorrig 2024-05-07 22:30:56 UTC
And the next for pushing indirect formatting is: It should be more simple to use. For example any knows ctrl-i for italic direct formatting. It should be simple able to assign the ctrl-i instead for using character format "Quotation". Because that is the most reason to use italic. Then I can work without learning new stuff (as a simple user). 
... but this may be another Bug number
Comment 5 Dieter 2024-05-09 11:23:10 UTC
Hartmut, please don't change status to NEW
=> I change it back to UNCONFIRMED

Heiko, for me this enhancement request is a WONTFIX. Although I'm a fan of using styles and prevent direct formatting I don't think, that forcing people to do so should be part of the culture of LO.
Comment 6 Heiko Tietze 2024-05-10 07:54:16 UTC
(In reply to Heiko Tietze from comment #1)
> The idea was to have a style highlighter, for just DF see bug 106556.
This has been implemented meanwhile.

Changing the UI is still possible (with limits how well DF is suppressed).

Keep in mind that any new attribute needs to be standardized, so opening a document has the same effect on all platforms and applications. And since users prefer working with DF, this will not become implemented.

Ultimately it depends on the type of document how much effort and precision should be done for the layout. If you write a scientific paper you probably want to use styles. But for a short note or a letter it's perfectly fine to use multiple returns for paragraph spacing, or bold/italic to emphasize a passage.

On the other hand I see the advantage of such protection when you share a well-styled document with colleagues or when people should use a company template, and all styling is broken after some modifications.
Comment 7 Dieter 2024-05-10 08:18:25 UTC
(In reply to Heiko Tietze from comment #6)
> On the other hand I see the advantage of such protection when you share a
> well-styled document with colleagues or when people should use a company
> template, and all styling is broken after some modifications.

So is it a solution to provide an option (fo example in "Save As ..." dialog) like "Save with password for direct formatting"?
Comment 8 Heiko Tietze 2024-05-10 08:20:55 UTC
Rather Tools > Protect > [x] Allow Direct Formatting
Comment 9 Dieter 2024-05-10 08:23:29 UTC
(In reply to Heiko Tietze from comment #8)
> Rather Tools > Protect > [x] Allow Direct Formatting

I agree, if it is enabled by default.
Comment 10 V Stuart Foote 2024-05-10 13:06:05 UTC
Adjusting summary.

+1, but rather than "password", identify a per-document/template method to reduce optional DF and emphasize Style based formatting.
Comment 11 Cor Nouws 2024-05-23 10:30:43 UTC
- in general: huge proponent of using styles
- forcing users, and not nudging them (with great tools) will make that users look for different ways to do what they want..
- why Writer and not global - after all the suggestion is a Framework..
Comment 12 Eyal Rozenberg 2024-05-23 21:43:58 UTC
It would be useful to allow opt-in suppression of DF - not to force users, but for users who want to engage in this kind of self-discipline. +1 from me.
Comment 13 Heiko Tietze 2024-05-31 07:47:09 UTC
We discussed the topic in the design meeting.

MSO allows such protection, although is a somewhat unclear way. The implementation should be simple: add an option to disable DF, toggle some internal flag on/off, and make the state engine depending on this flag.
Comment 14 Mike Kaganski 2024-05-31 07:51:05 UTC
(In reply to Heiko Tietze from comment #13)
> MSO allows such protection

Is there a reference to that? Knowing an implemented behavior in another suite could be useful.
Comment 15 Heiko Tietze 2024-05-31 08:06:56 UTC
(In reply to Mike Kaganski from comment #14)
> Is there a reference to that? Knowing an implemented behavior in another
> suite could be useful.
It is some combination of protection option. MSO protects styles, and never talks about direct formatting. We should not take this as an example.
Comment 16 Heiko Tietze 2024-05-31 08:12:39 UTC
Created attachment 194480 [details]
Screenshot MSO
Comment 18 Eyal Rozenberg 2024-05-31 21:05:40 UTC
(In reply to Heiko Tietze from comment #13)
> We discussed the topic in the design meeting.
> 
> MSO allows such protection, although is a somewhat unclear way.

Does that actually disable DF? I couldn't tell from the screenshot.

> The implementation should be simple

I'm not so sure about that.

> add an option to disable DF, toggle some
> internal flag on/off, and make the state engine depending on this flag.

That's just a small bit of the implementation. Once you've toggled that flag, you have to disable most of the formatting bar. Or perhaps change it to affect the current character/paragraph/list style? Or maybe remove the formatting toolbar by default? This is no trivial change.