Bug 151965 - FORMATTING <CR> before an inserted horizontal line places Heading level 3 style instead of Text Body
Summary: FORMATTING <CR> before an inserted horizontal line places Heading level 3 sty...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.4.2.3 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-08 20:10 UTC by ScootrKDEbug Richards
Modified: 2022-11-10 10:32 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
ODT Writer text file demonstrating weird bug. (19.61 KB, application/vnd.oasis.opendocument.text)
2022-11-08 20:12 UTC, ScootrKDEbug Richards
Details
Before screen print of the error from the earlier attached sample. (52.17 KB, image/png)
2022-11-09 02:57 UTC, ScootrKDEbug Richards
Details
After screen print of the error from the earlier attached sample. (59.94 KB, image/png)
2022-11-09 02:59 UTC, ScootrKDEbug Richards
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ScootrKDEbug Richards 2022-11-08 20:10:33 UTC
Description:
Folks, this is a weird one.
|
step 1>  I inserted Hz, blank line, Hz in the middle of a document.
step 2>  Went to the blank line, typed in some text ( literal: Add before here:)
|
!! Ignore that it's telling you to "add" - it's an editorial note to myself to 
!! add a bunch of plot development before the two horizontal lines.
|
>>>>   I put the cursor at the end of the text line (following the colon) 
>>>>   And pressed <CR>, expecting a blank line to be inserted where I could enter text.
|
Instead, (HERE IS THE BUG) it converted the two Hz lines into a Heading Level 3 around the text line in between them. 
This behavior is repeatable in the attached file.*
The bug stayed with the text through a copy-paste to a blank file, so you got the whole format stuff in there two.
Saying another way: Where I expected a newline followed by style Text Body, I got a chapter subheading level 3 instead.
Comment here if you need screen shots of this.
*I will comment again to attach a file.
 SeaSkyMetalBall@gmail.com (In case something goes wrong)
-----------------------------


Steps to Reproduce:
1. Open the attached file
2. Put cursor at end of text line that appears between the two Hz lines.
3. Press enter (<Cr>)

Actual Results:
Both Hz lines disappear.
Text that was between Hz lines is now at heading level 3.

Expected Results:
Another blank line above the bottom Hz line.
Cursor at start of new blank line.


Reproducible: Always


User Profile Reset: No

Additional Info:
[Information automatically included from LibreOffice]
Locale: en-US
Module: TextDocument
Version: 7.4.2.3 (x64) / LibreOffice Community
Build ID: 382eef1f22670f7f4118c8c2dd222ec7ad009daf
CPU threads: 2; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
--------------
Windows 10, 4 Gbytes Ram, effectively infinite diskspace
Comment 1 ScootrKDEbug Richards 2022-11-08 20:12:43 UTC
Created attachment 183481 [details]
ODT Writer text file demonstrating weird bug.
Comment 2 V Stuart Foote 2022-11-08 23:08:15 UTC
Can't reproduce with STR and attached sample on 
Version: 7.4.2.3 (x64) / LibreOffice Community
Build ID: 382eef1f22670f7f4118c8c2dd222ec7ad009daf
CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL

A new paragraph at end of the "Add before here:" results in a new "Text body" paragraph.  The "Text Body" style Organizer tab shows the 'Next style:' is set to 
"Text Body" and that is what I got (and you expected).
Comment 3 ScootrKDEbug Richards 2022-11-09 01:26:10 UTC
I have downoaded and re-tested this file, and can reproduce the bug by opening the file and pressing return. Note that the cursor appears on the line with the text "Add Before Here" 
As per the first email on this bug, ignore the text that says "Add" -- That's an editorial note to myself at the moment I encountered the bug.
Comment 4 ScootrKDEbug Richards 2022-11-09 02:57:50 UTC
Created attachment 183485 [details]
Before screen print of the error from the earlier attached sample.

Screen print of "Before" recreating the bug.
Comment 5 ScootrKDEbug Richards 2022-11-09 02:59:54 UTC
Created attachment 183486 [details]
After screen print of the error from the earlier attached sample.
Comment 6 Stéphane Guillou (stragu) 2022-11-09 14:26:07 UTC
Couldn't reproduce either with:
Version: 7.4.2.3 / LibreOffice Community
Build ID: 382eef1f22670f7f4118c8c2dd222ec7ad009daf
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Could you please try with a fresh user profile or in safe mode?
https://wiki.documentfoundation.org/UserProfile#Help_wizard_.28LibreOffice_5.3_and_newer.29
Comment 7 ScootrKDEbug Richards 2022-11-09 16:23:44 UTC
Now we're getting somewhere - Could Not Duplicate from Safe mode.
What now?
Comment 8 Stéphane Guillou (stragu) 2022-11-10 10:32:10 UTC
Thank you for testing!
This means that you can fix the issue by resetting your user profile, which might be somehow corrupted. First create a backup of it (if you think you might lose something important).
https://wiki.documentfoundation.org/UserProfile#Backup_first
The user profile can contain a few things that are important to you, so if you don't want to create a backup, make sure you're familiar with what it contains: https://wiki.documentfoundation.org/UserProfile

Then you can restart in Safe mode again, but this time ticking "Reset entire user profile".
If the issue comes back, feel free to come back to this bug report!