[Solved] When you hit enter twice when writing a line in Writer, it changes your paragraph style automatically

OS: Windows 10
Version: 25.8.4.2 (X86_64)
Build ID: 290daaa01b999472f0c7a3890eb6a550fd74c6df
CPU threads: 8; OS: Windows 10 X86_64 (build 19045); UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded

So, I just installed the latest version of LO, 25.8 after years of sticking with the last sub-version of LO 7. I tried once before, years ago, to update to the latest version LO (I think it was 24.something), then (very very) quickly reverted to the last sub-version of LO 7, because this LO 24 version broke the functionality of a macro pair I use for outlining that are vital for my way of outlining. Ya ya, I know I know, there is supposed to be some way to outline now using headings and doing this that and the other in navigator, doing something or other else, doing this that and the other again in navigator, yada yada yada. Sounded to me like it would pull the muscles in my mouse clicky fingers going through all that rigamarole, and give me a headache. */end of grumpy old man rant.

After I get my macro pair fixed (I will do a separate post on that after this post), I will probably ask some questions and maybe someone will give me an explanation of how to do that newfangled outlining in the step-by-step version for a ‘slow type’ like me. (If it works in ordered & unordered lists).

So anyway, I have upgraded to the latest sub-version of LO 25, I figure there must have been a lot of bug fixes or some reason to make a major version jump from 7 to 24 and then 25. But I knew it was going to break stuff, my macro pair being a prime example. Call me a crusty old curmudgeon (had to look that up in the dictionary, maybe it fits me) if ya want to, doesn’t bother me.

So, I am doing a page see, trying to troubleshoot my macro pair on my own. So with all the messing around I was doing on the macro, kinda messed up my Module1 for macros. So, I do an uninstall/reinstall and decide to start the grind all over again. Open up a new blank page, put in some filler text, then hit enter twice. As you can see, I like to break ‘elements’ or paragraphs in a document up with a blank like between them.

When I hit enter after the filler text line, I get a blank line, think nothing of it because that is expected behavior for me - grumpy old man remember? Hit enter again, and instead of staying in Default paragraph style, expected behavior for me, instead I get Heading 1. I’m like “what the hay?” right? Triggers “Grumpy Old Man Mode”. Just to test things out, I hit enter again right after the text HEADING in Heading 1 level. Expect it to go back to Default Paragraph Style right? Nope. Goes to Body Text. Triggers “Crusty Old Curmudgeon” mode.

So, I come up here to find out what is going on. I don’t want that. What I want is for my Writer document to be in Default Page Style, and stay there until I decide to change it for some reason. If I hear/read about some latest & greatest state-of-the-art bestest new fad for having your page do this that or the other ‘greatest thing since sliced bread’ thingamajig , I will look for a post about it and see if I want to try it out or not or make a post about it if I can’t find one, and ask about this great ‘slick new trick’ or whatever.

So, all joking aside, how do I stop LO from doing this? I want it to just stay in Default Paragraph Style until I decide to change it for some reason or the other. Any help anyone can give on this would be greatly appreciated.

P.S. : Maybe that was long winded. Sorry. You can call me an old windbag/gasbag if ya want to, I’ll only cry a little. Promise.

P.P.S. : Once you hit 50, Grumpy Old Man mode is allowed in my opinion, as long as you stay a nice grumpy old man :innocent:. Once you hit 60, I think Crusty Old Curmudgeon mode is allowed, as long as you stay nice about it :rofl:. I triggered a couple months early on the Curmudgeon thing, maybe it starts from date of conception? :thinking: Well, maybe even then I triggered a few months early :man_shrugging:

The version numbering of the LO has been changed from “pure” numbering to “Year-month based” numbering (similarlly to the Linux and similarly to many other softwares). Now, there are two “main” version in a year in february and in august: 26.2.x.y, 26.8.x.y. The x is means the bugfix subversions.

1 Like

Default Paragraph Style is the ancestor of all styles. It is intended to make global changes. It isn’t really intended to use in documents because of you make a change in it, it can affect other styles unexpectedly.

The paragraph style intended for the main body of the text is Body Text. This is the next paragraph style after any Heading n style. It can also be applied by Ctrl+0
.
If you don’t like how Body Text appears, then right click the style, select Edit style and make the desired changes.

2 Likes

Zizi64,

Thank you for that interesting bit of information, now that you mentioned this, I vaguely remember hearing sometime in the past that some Linux distros were going to this type of versioning. Never really connected it to LO until now. Thank you for the post, interesting information!

EarnestAl,

Interesting and informative answer about the structure of LO Writer pages, makes sense that Default Paragraph Style is the Parent Style for all of the ‘children’ like Body Text, Heading, Block Quotation, etc. Body text seems fine to me from a quick look at the Edit Style popup window, I see that it is already set to Body Text as the Next style, and I am sure if I see some elements of the style that I don’t like I can either make the changes myself or get help in here on the subject.

But I found that behavior Writer showed of going to Heading 1 as the style when I pressed enter twice to put a line between current line and the next to be disturbing. I wouldn’t think that it would be an intentional feature of Writer, so I am wondering if that is some type of odd behavior indicating my install is already corrupted or something? I am seeing further odd behavior so I am going to make another general post about that, and my next question on this subject. Thanks for your reply and the information.

The quote above is the issue free of distractions (unrelated parts in the middle are dropped, too, for convenience of understanding).


Now I myself cannot reproduce the behavior “Hit enter again, and instead of staying in Default paragraph style, expected behavior for me, instead I get Heading 1” using Version: 25.8.4.2 (X86_64)
Build ID: 290daaa01b999472f0c7a3890eb6a550fd74c6df
CPU threads: 24; OS: Windows 11 X86_64 (build 26200); UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-GB
Calc: CL threaded

nor in

Version: 26.2.0.1 (X86_64)
Build ID: 620(Build:1)
CPU threads: 24; OS: Windows 11 X86_64 (build 26200); UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-GB
Calc: CL threaded

No matter how many times I press Enter sequentially, it keeps the original default paragraph style.
SeveralEnters


As to "I hit enter again right after the text HEADING in Heading 1 level. Expect it to go back to Default Paragraph Style. Goes to Body Text": the style that appears after Heading 1 (and after any style) is defined in that style's properties, as "Next style" property. For Headings, it's Body Text by default, so that part is expected and normal, and is configurable (using styles machinery), but the real problem is the previous part, as far as I can tell?

I am not at my computer but I vaguely recollect that in AutoCorrect options there is a setting to apply styles, this help page should supply the answer, While Typing (AutoCorrect)

2 Likes
  • I have been doing some further testing and getting some really strange, to me, behavior. I was just over at Open Office, trying to download that because if LO keeps doing stuff like this I am going to have to switch. This is just crazy work.

  • I decided to do some more testing, remembered that the behavior I described in my Original Post (OP) was that I had left the period off of the end of the sentence. So, I did the filler text again “This is some filler text.” with the period on the end of the text. Stayed in Default Paragraph Style (let’s use DPS here for short), gave me the blank line, was able to repeat the text and hit enter twice and stayed in DPS style.

  • Then, I deleted all this text, got back to the top of the page blank again. This time, I typed in “This is some filler text” without the period again. This time, when I hit enter, instead of giving me a new line, and having to hit enter again to get HEADING on the next line and it putting me into Body Text style, it changed that actual original first line of text to Heading 1 style and put me into Body Text style.

  • So then I decided to see what was going to happen if I again hit enter. This time it let me type the filler text twice with a . at the end of the sentence and was in the default font & font size, but looked a little weird on the line spacing. Went in to check the settings in the Style Edit dialog window, saw on the indents and spacing tab that under Spacing > below paragraph: was set to 0.10" so I reset that to 0.00" and clicked the checkbox in front of “Do not add space between paragraphs of the same style”, under Line Spacing it was set to 1.15 lines, clicked on single, then saw the checkbox in front of Activate page line-spacing. Clicked on help, read what it had to say about that option, it sounded like it would make the line spacing better so I clicked in that box and followed the instructions to click on main menu Format - Page Style, clicked on the Page tab, and then select the Use page line-spacing box in the Layout settings section. Did that for both Body Text and Default Page Style just to make sure, and then the text looked pretty normal to me as far as spacing between lines and such goes.

  • So under Body Text style it allowed me to put in the filler text with . at the end, hit enter and put in the filler text again with the . at the end. Then hit enter and put in the filler text in again without the . at the end, hit enter again and put in the filler text in again, again without the . at the end and none of the times I did that did it switch to Heading 1 and convert that text to heading one.

  • Decided to test further, cause I’m kinda a suspicious type, so I selected Default Page Style again, put in the filler text and hit enter, then enter again for a blank like between lines of text and bam! Converted the filler text to Heading 1 and put me back into Body Text style.

  • For further testing I opened up a new blank document. As I suspected, all of those spacing changes I had made had not taken effect, which I expected (hadn’t made the changes in the Default template yet). Went through the process of doing the filler text with hitting enter twice to get a blank line between paragraphs, same behavior. When in Default Paragraph Style converted the first line into Heading 1 text, then when in body text it let me put in the filler text with and without a . at the end of the sentence just like before.

  • Made all the line spacing changes and such, checked the boxes, etc. on Main Menu did the : Format - Page Style, clicked on the Page tab, and then select the Use page line-spacing box in the Layout settings section thing again too. After I made the changes, in both Default Paragraph Style and Body Text style, it let me put the blank lines between the filler text lines, with and without a . at the end of the line, and this time it didn’t convert the first line into Heading 1 text. Oops. After further testing, with the spacing changes and such, it has started this same odd behavior in Body Text Style again.

  • So, I don’t know what’s going on, but it’s not normal, at least the way it worked back in Version 4 & Version 7. I never saw it happen back in documents in those versions anyway. So either it’s a bug or my install got corrupted, or it was written into the LO 25 code to do this conversion to Heading 1 when trying to put a blank line between paragraphs for some reason, some feature the developers thought would be cool or they put it in the LO code because some user(s) thought it would be cool so they did it to please them.

  • I don’t know which it is. I am going to save and attach these files, so people can download and study them, if I can do that here. Thanks for the help so far, appreciate your time and effort.

  • Untitled 1.odt (19.8 KB)

  • Untitled 2.odt (19.0 KB)

  • Hope someone can figure this out, not normal expected behavior, for me at least. Thanks for any help anyone can give.

  • Edit: I put in some blank lines between paragraphs as I was typing this up, it took them out when I saved the reply, and again when I saved to edit. So sorry it is all run together, that is going to make it hard to read easily, but I don’t know why it did that. Going to try to change all of the text to bulleted list and see if that doesn’t force it to put spaces between the paragraphs.

Can’t reproduce the mishap on the two files you attached. Sounds to me as if you have some unusual AutoCorrect option to rework your typing.

Anyway, there is a flaw in your workflow. Default Paragraph Style is not intended to format any text. The confusion may come from M$ Word where a similarly name style is the “standard” (or default) one. In LO Writer all styles are organised in a tree-like structure (to allow for a “smart” management of the graphical charter) of which Default Paragraph Style (DFS) is the root. All other styles directly or indirectly inherit from DFS. Any change you make on DFS cascades to all others (unless the attribute is overridden along the path, in which case it creates a sub-root).

DFS is the primary location where you customise the look of your document. You’ll primarily change font face and size, line spacing and space above and below. A frequently modified setting is first line indent.

Therefore, it is extremely clumsy to use DFS for your text because changes you make to fit your expected formatting has huge side-effects on all other styles. The intended style for text is Body Text. And this is also why you have an automatic switch from Heading n to Body Text when you hit Enter.

A second error is vertical spacing with empty paragraphs. Paragraphs are basic units of significance. An empty paragraph contains no information. It can be suppressed without changes to meaning and formatting. Vertical spacing with empties comes for the mechanical typewriter era where you had no other possibilities. Vertical spacing is part of the meaning of a paragraph (you always surround headings with adding spacing, independent from what appears above or below; similarly tour topic paragraphs have a vertical spacing of their own). This spacing is made a setting in the paragraph style configuration and can be measured to any distance, not systematically an integral number of lines (giving you versatility). This has the advantage of automating the presence of spacing without the need to explicitly type something.

And, not least, there are no induced errors on page breaks because attached (intrinsic) vertical spacing is suppressed on page limits. On the contrary, empty paragraphs are always rendered and you may end up with stray white space at top of pages. Also, empty paragraphs break to Keep with next paragraph property: a heading will be detached from following significant text, appearing at bottom of page with first non-empty paragraph on next one, instead of having heading flushed on next page.

The site engine is Discourse which is HTML-strict (well, nearly+). This means all whitespace (spaces and newlines) are merged into a single “spacing” character (with newline taking precedence over space). Consequently all your spacing between paragraphs reduces to a single newline.

Since Discourse allows you to insert HTML, with limitations for security, you can prefix your paragraphs with <br> and it does the trick.

(+) There is an inconsistency between Comments which behave as I describe and Solutions where inter-paragraph whitespace is kept.

1 Like

I haven’t changed the default settings in auto correct since I installed version 25, so that can’t be it. I remembered that I set my default template to an old template I had made in the past. I changed back to the default template that came with the new install, totally unmodified. Still getting this misbehavior. Thanks for taking the time and effort to look at the problem and for me though. I will just have to remember to always put a period at the end of the last sentence in a paragraph, or only sentence in some instances, with the period at the end of the sentence I don’t believe it changes the text to Heading 1 style or inserts HEADING below it in Heading 1 style.


I will probably go back to version 7 though. With this mess already, I can only imagine the trouble I am going to have trying to get my outlining macro pair fixed in this new version. I will try one more uninstall/reinstall cycle with the new version, then if that problem persists for me, probably go back to version 7. Or switch to Open Office. But thanks again for looking at the problem for me.

2 Likes

LeroyG, thanks for that, I will try it and see if fixes the problem. Appreciate it.

LeroyG, I think you found it. That option was checked. When I opened a new document and repeated the process, it repeated itself just as it had been doing in the past. Deleted all the text and unchecked that box for Apply Styles. It seems to have fixed it, thank you so much. I am going to mark your reply as solution and put solved in the title.


If the misbehavior comes back at some point in the future then I will start a new question.

1 Like