Created attachment 180169 [details] Second line is style resistant paragraph Sometimes Writer will not apply styles correctly. This is mostly prominent in Writer. But other Suite programs are sometimes strange when applying text properties and fonts. There are some paragraphs that are resistant to the application of styles. In the attached file, Default Paragraph Style is Cambria, 12 pt, normal. But the second line is 14 pt bold. For paragraphs like this, switching styles to something else and then back to what you want does not work. The only ways I have found to fix these paragraphs is 1. Create a separate paragraph with the same style. Then copy and paste special/unformatted text 2. Manually change font and paragraph settings to what they should be for that style.
1. Open the file 2. Open the sidebar -> Style inspector deck 3. Click on the paragraph with 14 bold -> Notice Character Direct Formatting being set.. 4. I guess the formatting being introduced by pressing Enter after the heading -> Which has also Character Direct Formatting (and not using Paragraph Style)
So yes. Looks like the first line has Direct Formatting and the second line has that direct formatting carried with it. If you select the whole second line, then right click and do "Clear Direct Formatting" (or type Ctl+M), it will clear the direct formatting and the paragraph will then follow the style. This implies that by default, Writer will not override direct formatting when a style is applied. Is this deliberate behavior? I would make the case that the "least astonishing" behavior would be that applying a style **would** override Direct Formatting.
@Mike I'm not seeing any problem here, but I struggle to give a proper explanation (In reply to wpeaton4 from comment #2) > I would make the case that the "least astonishing" behavior would be that > applying a style **would** override Direct Formatting.
When you apply paragraph style, the action does reset the direct formatting set on the paragraph level. It does not change any format (direct or style) set on character level (with an exception when the character direct formatting spans the whole paragraph). This allows e.g. to keep some words highlighted, even if you decided to change this paragraph from text body to table contents. This is the correct behavior, and follows the least astonishment principle. It might seem that the test case matches the "character direct formatting spans the whole paragraph" exception mentioned above. No, in that paragraph, there are actually *two* text runs with different direct formatting, the only difference being an "rsid" invisible attribute, showing different edit sessions. It is visible in the XML, but deliberately not shown in style inspector. This makes this case to work differently compared to tdf#146663. Possibly it would make sense to reset all but rsid in this case, to behave like 146663.
I close as NotABug. Maybe something else can be added to https://wiki.documentfoundation.org/Faq/Writer/026.