Bug 136654 - Next Style does not get triggered if there is Text after the cursor.
Summary: Next Style does not get triggered if there is Text after the cursor.
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.0.1.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsUXEval
Depends on:
Blocks:
 
Reported: 2020-09-10 20:00 UTC by Clarc
Modified: 2020-12-11 11:55 UTC (History)
4 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 Clarc 2020-09-10 20:00:28 UTC
Description:
Next Style does not get triggered if there was Text after the cursor before pressing ENTER.

I'm pretty sure this wasn't in LO until recently and it should be corrected.

Steps to Reproduce:
Usually, if a different paragraph-style is set as "next style", after pressing ENTER, the following text should have that (next) style. For example, after pressing ENTER after a H1, you might  continue writing using Text Body, if you set your template this way.

HOWEVER: If you click ENTER and there's text behind the cursor, the following text does not change into the desired style.
(For example, H1 does not turn into Text Body but just stays H1)

Actual Results:
 

Expected Results:
Apply the "Next Style" the user choose regardless of whether there's text right after the cursor.


Reproducible: Always


User Profile Reset: No



Additional Info:
I could only select 7.0.0.3 but my LO version, both on Windows and on Linux Mint seems to be version 7.0.1.2.

Version: 7.0.1.2
Build ID: 7cbcfc562f6eb6708b5ff7d7397325de9e764452
CPU threads: 8; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: de-AT (en_US.UTF-8); UI: en-US
Flatpak
Calc: threaded
Comment 1 BogdanB 2020-09-11 04:16:17 UTC
It's ok in
Version: 7.0.1.2
Build ID: 7cbcfc562f6eb6708b5ff7d7397325de9e764452
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-US (ro_RO.UTF-8); UI: en-US
Calc: threaded

Could you try a Factory Reset?

Go to menu Help - Restart in Safe Mode - Factory Settings and Reset.
Why this? Because your LibreOffice 7 installation could have a bad profile, so, wehn restarting in Factory Settings is just like your computer see for the first time a LibreOffice instalation and everything should be fine.

I need an info from you if this solved your problem.
Comment 2 BogdanB 2020-09-11 04:19:32 UTC
I reported the missing 7.0.1.2 version Field, and we need to change that wehn will be available.
Comment 3 Clarc 2020-09-11 08:56:14 UTC
(In reply to BogdanB from comment #1)
> Could you try a Factory Reset?
> 
> Go to menu Help - Restart in Safe Mode - Factory Settings and Reset.
> Why this? Because your LibreOffice 7 installation could have a bad profile,
> so, wehn restarting in Factory Settings is just like your computer see for
> the first time a LibreOffice instalation and everything should be fine.

I tried "Restart in Safe Mode" on both Windows and Linux and in both cases the bug could be reproduced.

(Turns out I was wrong, my Winows-LO is version 7.0.0.3
Version: 7.0.0.3 (x64)
Build ID: 8061b3e9204bef6b321a21033174034a5e2ea88e
CPU-Threads: 3; BS: Windows 10.0 Build 18363; UI-Render: Standard; VCL: win
Locale: de-AT (de_AT); UI: de-DE
Calc: threaded)


Are you sure, you tried the exact same steps I took? Let me describe it step by step:
1. Open a new LO document
2. Press CTRL + 1 to get a H1
3. Write a few nonsense letters.
4. Press enter
5. The following text is a Text Body. (as it should be.) Write a few nonsense letters.
6. Place your cursor at the beginning of your Text-Body-Text.
7. Click DELETE/BACKSPACE to move your Text-Body-Text up and make it become a H1 Text
8. Click ENTER. Now you have two H1s, even though H1 is set to use Text Body as it's Next Style.
Comment 4 BogdanB 2020-09-11 11:41:35 UTC
Ok. I confirm this behaviour, but I don't consider this to be a bug.
Imagine that you will need the Heading 1 to be 2 rows and you press enter to finish the first line earlier, so you have a H1 on 2 rows. In this case is usefull.

Also, in the case you described, you can select the second row and specify the style you want to be.

Version: 7.0.1.2
Build ID: 7cbcfc562f6eb6708b5ff7d7397325de9e764452
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-US (ro_RO.UTF-8); UI: en-US
Calc: threaded

BEHAVIOUR CONFIRMED, but NOT consider as a bug
Comment 5 Clarc 2020-09-11 12:26:30 UTC
(In reply to BogdanB from comment #4)
> Ok. I confirm this behaviour, but I don't consider this to be a bug.
> Imagine that you will need the Heading 1 to be 2 rows and you press enter to
> finish the first line earlier, so you have a H1 on 2 rows. In this case is
> usefull.
That is one way to get two lines of Heading, yes. But consider this:
Your H1 Style is set to add a Page Break after the H1. Now you perform the steps-to-reproduce.
What happens? You actually don't get a 2-line-heading but instead get two headings. There will also be a problem if you set your headings to get them numbered. Then, you would get something like this:

1 THIS IS MY

2 HEADING

Normal text. Normal text. Normal text. Normal text.


The proper way to get a two-line-Heading is to
(1. Just wait until your H1 is long enough to become a two-liner by itself)
2. Use SHIFT + ENTER two insert a manual page break.



And since this...
> 1. Open a new LO document
> 2. Press CTRL + 1 to get a H1
> 3. Write a few nonsense letters.
> 4. Press enter
> 5. The following text is a Text Body. (as it should be.) Write a few
>    nonsense letters.
> 6. Place your cursor at the beginning of your Text-Body-Text.
> 7. Click DELETE/BACKSPACE to move your Text-Body-Text up and make it become
>    a H1 Text
> 8. Click ENTER. Now you have two H1s, even though H1 is set to use Text
>    Body as it's Next Style.
...is not the intended way of creating two-lined-headings, leaving this bug in LO actually just takes away one very handy functionality: the ability to use the Next-Style-option in those scenarios.


Do my thoughts on this make sense?
Comment 6 BogdanB 2020-09-12 17:37:05 UTC
Yes, I agree with you on this.

But also, is not very hard to make the changes I emntion in the comment 4.

That's why I added here the Design team to evaluate your bug.

So, you have nothing to do, we have just to wait for their input.
Comment 7 Clarc 2020-10-08 19:47:29 UTC
I really hope this gets fixed sometimes... It's even more annoying in non-Heading instances.
For example, when using a Drop Caps paragraph style, if you try to insert a Break in-between two sentences, you get two Drop Caps right after each other. Even if you have specified "Textbody" under NEXT STYLE.
Comment 8 Heiko Tietze 2020-12-11 11:30:07 UTC
Mike, your take on this? Tend to agree with the request as it's easier to set a style H1 after line break than unset the mistakenly applied style.
Comment 9 Mike Kaganski 2020-12-11 11:50:48 UTC
Completely disagree. When you are in the middle of a paragraph, and press Enter, you split it into two. It's unexpected if already existing part of the paragraph suddenly changes.

When you are at the end of a paragraph, you logically create a new paragraph. This is what "Next Paragraph" relates to.

And no, it isn't true that "this wasn't in LO until recently". It was this way e.g. in OOo 1.0.3 from 2002.
Comment 10 Mike Kaganski 2020-12-11 11:52:30 UTC
(In reply to Heiko Tietze from comment #8)
> it's easier to
> set a style H1 after line break than unset the mistakenly applied style.

Wow - how's that? Both require double-clicking on a wanted style. You can't have a paragraph style *absent* from a paragraph settings, so there's no way to "unset" a style.
Comment 11 Heiko Tietze 2020-12-11 11:55:39 UTC
(In reply to Mike Kaganski from comment #9)
> When you are in the middle of a paragraph, and press
> Enter, you split it into two.

Convincing, and IIRC we talked about this before. Let's keep it.