Bug 141498 - WRITER FORMATTING: Unexpected Character Direct formatting when overwriting text
Summary: WRITER FORMATTING: Unexpected Character Direct formatting when overwriting text
Status: RESOLVED DUPLICATE of bug 134426
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.0.0.1 rc
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 137783 (view as bug list)
Depends on:
Blocks: Character
  Show dependency treegraph
 
Reported: 2021-04-05 16:08 UTC by Ernest Bywater
Modified: 2024-10-05 07:51 UTC (History)
2 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 Ernest Bywater 2021-04-05 16:08:29 UTC
Description:
When in Edit Mode Writer ignores the paragraph style format code of the paragraph being edited to insert character format code for the text being entered into the paragraph. If multiple edits are made there are multiple insertions of individual character format code.

It cuases bloated files due to the excess format code data.

When the file is exported into some formats it causes problems with the exported text and sometimes corrupts the file. 

Steps to Reproduce:
1.Create text file in Writer with multiple paragraphs.
2. Assign paragraph styles to each paragraph.
3.Save file and close it.
4. Reopen file go to the middle of the text in a paragraph and edit the text.
5. Save the file.
6. Examine the file size and the format code.

Even if the same number of character are replaced the file size changes, and when you can examine the format code the paragraph has code for all the text in the paragraph, but in the edited paragraph the added text now has extra format code for each section of added text that matches the paragraph format code.


Actual Results:
Even if the same number of character are replaced the file size changes, and when you can examine the format code the paragraph has code for all the text in the paragraph, but in the edited paragraph the added text now has extra format code for each section of added text that matches the paragraph format code.

The best way I've found to observe the problem is to export the file into other format where the format code is also shown. HTML is the easiest to see the problem.

Expected Results:
Each paragraph has only the paragraph style format code.

Except for the few cases where a change in format is deliberate, such as bold and italics, but the font type and font size data should not be added inside the paragraph due to it being in the style format code.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Using

LO 7.1.2.2 - problem first noticed with 7.0.0.1 rc and each version since

Zorin Linux 15.3

AMD Ryzen CPU

Previously reported as Bug 137783, but I didn't word it well and appears to have been dismissed as a HTML conversion, but the problem lies in the Writer character attributes and not the HTML conversion process.
Comment 1 Ernest Bywater 2021-04-05 16:10:57 UTC
*** Bug 137783 has been marked as a duplicate of this bug. ***
Comment 2 Ernest Bywater 2021-04-11 09:16:34 UTC
One aspect of this problem I had not realised until today is that the insertion of individual character format code during an edit totally negates the effective use of a paragraph style.

While working editing a story for a friend he asked I amend the chosen font type and size to a different one due to having some issues reading the existing font. When I went to the style settings and changed the name and size of the font for the style and applied it to the story only about two thirds of the text changed to the new font. The most annoying was where a word had one font type and size for part of the word and a different one for the rest of the word. Investigation showed that the changes were all at the edits where LO Writer had included the character font code for the edits and they overrode the style settings for the paragraph.

This is a problem as a change to the paragraph style is SUPPOSED to be carried through to all of the text in the paragraph the style is applied to, but it is NOT due to the extra code being added to the text by LO Writer.
Comment 3 Dieter 2021-10-12 17:38:18 UTC
I'm not sure, if we have different issues here. Let's reduce it to the proplem with character direct formatting. I can reproduce it with

Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 56883788d0090383dad58552f5a11044ffe64a44
CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

Steps to reproduce:
1. Open a new document and write a paragraph
2. Apply paragraph style "Heading 1"
3. Open Style inspector => No Character Direct formatting (expected)
4. Select some words => delete them => write a new text
5. Look at Style Inspector => No Character Direct formatting (expected)
6. Select some word => write a new text (without deleting selected words first)
7. Change paragraph style

Actual result:
Inserting Characters are treated as Direct formatting (don't change to paragraph style and Style Inspector also shows Character Direct Formatting)

Expected result:
No Character Direct Formatting
Comment 4 Justin L 2021-10-14 10:42:41 UTC
(In reply to Dieter from comment #3)
 6. Select some word => write a new text (without deleting selected words
> first)
If this is the root of the issue (and it likely is), then this should be fixed in 7.1.7 with the revert of bug 79717's commits.
Comment 5 Coburn Ingram 2021-10-25 18:10:19 UTC Comment hidden (no-value)
Comment 6 Gabor Kelemen (allotropia) 2023-02-23 16:31:27 UTC
Can confirm that this small file size growth is gone after the patch of bug 134426 in the bibisect-7.1 repository. The problem with the steps in comment #3 are also no longer reproducible.

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