Some questions about formatting behaviour

I have attached a document with number of different formatting behaviors… I’m not quite sure if these are bugs or not.
Formatting questions.odt

Update: E8FEAB9C-F234-4ED1-8AD0-0728C13FFDDD.odt
New attempt to be more specific…I included (Paragraph style/Character Styles) this time, but the behavior isn’t substantial different from direct formatting. Some issues can be reduced a little, but not a ‘solution’. And styles make it sometimes even worse, because you can’t use clear formatting either …

Tried also to explain the actual result compared to the expected result.

Your file is not self-explanatory: initial state is not described, procedure is partial, difference between final and expected state is not well defined. Are the various highlighting part of the problem or only a way of drawing attention.

From superficial analysis, all text is Default Style (paragraph) and direct formatted (character). This is the best way to have everything out of control. Writer is meant to be driven by styles? Direct formatting is provided primarily for quick’n’dirty experimenting. Mixing it with copy/paste and undo/redo is not reliable because you don’t know exactly where the formatting transitions occur (there are cumulative effects resulting in multiplication of boundaries, resulting potentially in a boundary after every character). Writer will deterministically use a formatting but you are enable to tell which.

@Telesto It’s a mixture of hard formatted text fragments in paragraph default style. What point is buggy in your opinion?

.

@keme wrote: the applied formatting at the end of the deleted section is retained at that spot - isn’t that a usual behaviour of Writer?

.

@ajlittoz wrote: This is the best way to have everything out of control. +1

I uploaded an updated file… trying my best to confirm to required specs of @ajlittoz… Included styles in the comparison also

This behavior seems to be:

When you delete content, the applied formatting at the end of the deleted section is retained at that spot, and subsequent pasting to the same spot will reapply the formatting, up to the spot where other formatting is in effect.

If you remove direct formatting (ctrl+M) before pasting, the weird behavior is largely eliminated. This supports my basic theory.

However, this does not explain the entire issue that you have identified. The multiple paragraph copy, where the “resident” coloration applies to the first and last paragraphs, the “resident” sans font applies only to the last paragraph, with the paragraph(s) in between appearing untouched, shows that the issue is more complex, sort of a “fragmented format carryover”.

I’d call it a bug. When I’m in a good mood I’ll probably call it a glitch.

If this troubles you (which I understand that it would if you use direct formatting heavily and move content around a lot) you may be helped by using styles instead of direct formatting. My initial tests suggest that styles eliminate the weirdness.