Bug 145176 - Overtyping selection creates unintended direct formatting
Summary: Overtyping selection creates unintended direct formatting
Status: RESOLVED DUPLICATE of bug 134426
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.1.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-16 16:50 UTC by Norbert Vorstädt
Modified: 2021-10-16 17:17 UTC (History)
0 users

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 Norbert Vorstädt 2021-10-16 16:50:24 UTC
Description:
When selecting some text and then typing a replacement text the replacement text will receive direct formatting with the same font and font size as the underlying paragraph. However, selecting the text, pressing DEL and then inserting the replacement text will behave correctly and not create the direct formatting.

Steps to Reproduce:
1. Create an empty document
2. Add some text by keyboard
3. Format the text Arial bold 10 pt
4. Create a new paragraph style from that paragraph, name it ProblemStyle
5. Select a word from your paragraph text by double clicking it
6. Type some other word to replace the selection
7. Open the style inspector and see that the replacement text is now formatted with direct formatting with the same font and size as before
8. Change the font size of the ProblemStyle paragraph style to 6 pt
9. Notice that the entire paragraph changes into 6pt, except for the replacement text (which is to be expected since it received a direct formatting, which is the actual but. This step is only mentioned to demonstrate how dangerous this bug is.)

Actual Results:
The replacement text received direct formatting with the same font and size. Thus, this bug is really hard to see on first sight! If someone wants to change the paragraph style later, all the places where such replacements have been done will not follow the new style! This can create huge problems for book authors!

Expected Results:
Instead, the replacement text should have been inserted without receiving direct formatting. Interesting enough, this is what happens if one carries out the same operation in a two-step manner: first delete the original text, then insert the replacement text. Thus, the problem seems to be connected with overtyping a selection.


Reproducible: Always


User Profile Reset: No



Additional Info:
The behavior could only be observed when working with a styled paragraph different from the default style and different from the default Body text style. Therefore steps 3 and 4 in the above reproduction list are important.
Comment 1 Mike Kaganski 2021-10-16 17:17:53 UTC

*** This bug has been marked as a duplicate of bug 134426 ***