Bug 143904 - Direct character formatting is getting copied into paragraph level
Summary: Direct character formatting is getting copied into paragraph level
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.3.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.3.0
Keywords: bibisected, regression
Depends on:
Blocks:
 
Reported: 2021-08-16 17:37 UTC by Balázs Sántha
Modified: 2021-08-30 11:27 UTC (History)
3 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 Balázs Sántha 2021-08-16 17:37:16 UTC
Description:
When inserting a new row in a table, Writer copies the row's formattings both at the level of paragraphs and characters, even though we should avoid to copy the direct character formattings.




Steps to Reproduce:
1. Create an empty Writer Document
2. Create a table
3. Write "TEXTREDTEXT" in the last cell
4. Select the portion "RED" from the text, and apply a specific Font color on it 
5. Place the cursor in the last cell, and insert a new row after it (simply press TAB to do this) 
6. Write something into the new last cell of the table

Actual Results:
The newly typed text will be the same color, what you set in as a direct character formatting.

Expected Results:
The newly typed text should be black (default).


Reproducible: Always


User Profile Reset: No



Additional Info:
This bug is a regression of https://bugs.documentfoundation.org/show_bug.cgi?id=143244 

The reason why this regression happened is that: MSO Word uses a paragraph mark symbol (i.e the control character than can be configured to be shown), which is imported in Writer as a 0-length hint. To fasten up the import of DOCX tables, the core applies the formattings from this 0-length attribute on paragraph level, directly before inserting a new row. 
All in all, to solve this bug, we need to make sure, that we only copy the formattings, if it is a 0-length hint.
Comment 1 Timur 2021-08-17 12:09:58 UTC Comment hidden (obsolete)
Comment 2 Timur 2021-08-17 12:12:33 UTC
Reproduced in 7.3+ for steps.
Comment 3 László Németh 2021-08-17 15:40:43 UTC
Regression caused by commit 498d2b82187ec3ff58f076e0d15741e64c0505ba (tdf#131546).
Comment 4 Commit Notification 2021-08-27 09:28:44 UTC
Balazs Santha committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/72590c55ad6c699b34dc404542abc3f60bc32a09

tdf#143904 fix direct character formatting copied into paragraph level

It will be available in 7.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.