Bug 138911 - Unwanted formatting applied to paragraph text
Summary: Unwanted formatting applied to paragraph text
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
7.0.3.1 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-14 18:19 UTC by Alan Robinson
Modified: 2020-12-27 10:59 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Document demonstrating the problem (21.21 KB, application/vnd.oasis.opendocument.text)
2020-12-14 18:20 UTC, Alan Robinson
Details
video (1.15 MB, video/webm)
2020-12-21 18:02 UTC, BogdanB
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Robinson 2020-12-14 18:19:53 UTC
Description:
Heading style 1 in the attached document has its next style set at Default paragraph Style in the organiser. But when the caret is placed at the end of the heading and return pressed, the new paragraph carries formatting from the heading style.

Steps to Reproduce:
1. Open the document and follow the instructions it contains.

Actual Results:
Formatting from the heading style is copied over to the new paragraph.

Expected Results:
Formatting should be the default for the new paragraph style, not the heading style.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Version: 7.0.3.1 (x64)
Build ID: d7547858d014d4cf69878db179d326fc3483e082
CPU threads: 4; OS: Windows 10.0 Build 19041; UI render: Skia/Raster; VCL: win
Locale: en-GB (en_GB); UI: en-GB
Calc: threaded
Comment 1 Alan Robinson 2020-12-14 18:20:47 UTC
Created attachment 168160 [details]
Document demonstrating the problem
Comment 2 BogdanB 2020-12-21 17:52:29 UTC
This is how this text looks like
This is what you see:
---------------------------------------------------------
1 Description
To show the bug put the caret at the end of of the above heading. Press return. Type in some characters.
---------------------------------------------------------

This is what you have in the document
---------------------------------------------------------
   <text:h text:style-name="P3" text:outline-level="1"><text:bookmark-start text:name="__RefHeading___Toc4100_2826563426"/><text:span text:style-name="T8">Descriptio</text:span><text:span text:style-name="T9">n</text:span><text:bookmark-end text:name="__RefHeading___Toc4100_2826563426"/></text:h>
   <text:p text:style-name="P2"><text:span text:style-name="T7">T</text:span><text:span text:style-name="T5">o show the bug put </text:span><text:span text:style-name="T6">the caret at the end of of the above heading. Press return. Type in some characters.</text:span></text:p>
---------------------------------------------------------

And this is how it should look if the text was done just in LibreOffice in a new document:
---------------------------------------------------------
 <text:h text:style-name="P2" text:outline-level="1">Description</text:h>
   <text:p text:style-name="P1">To show the bug put the caret at the end of of the above heading. Press return. Type in some characters.</text:p>
---------------------------------------------------------



It's a mess of headings in that paragraph.
Comment 3 BogdanB 2020-12-21 17:54:10 UTC
You can save the document as flat xml and read his code. You will see the document is so smal but so mess.
Comment 4 BogdanB 2020-12-21 18:01:44 UTC
See the video to see that is not a bug, is a question of mixing all toghether until is nothing clear...

What I have done in the video
- select the text - Press Ctrl+M (clear the direct formatting)
- select the text - and change to Default paragraph style to be sure that there is no other style involved
- apply the desired styled
- now everything just works
Comment 5 BogdanB 2020-12-21 18:02:09 UTC
Created attachment 168388 [details]
video

Video showing it is not a bug
Comment 6 Alan Robinson 2020-12-25 12:16:58 UTC
Clicking the toolbar icon does clear direct formatting. Pressing Ctrl+M has no effect.

Regards, Alan R.
Comment 7 Alan Robinson 2020-12-25 13:12:48 UTC
Sorry, that last comment was somewhat misleading. Clicking the toolbar and Ctrl+M both clear the direct formatting. Clicking on the toolbar stops unwanted formatting being applied to the new paragraph, but Ctrl+M does not.

Regards, Alan R.
Comment 8 BogdanB 2020-12-27 10:59:17 UTC
My mistake: Ctrl+M is just for direct formatting, like bold, italic.

Select some words, apply bold or italic, than select all the words and press Ctrl+M. The bold and italic are gone. So, Ctrl+M is working.