Bug 113131 - Paragraph style: "Next-style"-rule is ignored if paragraph break is at the beginning of or within a paragraph
Summary: Paragraph style: "Next-style"-rule is ignored if paragraph break is at the be...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Documentation (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.4.0
Keywords:
Depends on:
Blocks: Writer-Styles-Paragraph Help-Changes-Features
  Show dependency treegraph
 
Reported: 2017-10-15 07:59 UTC by Dieter
Modified: 2022-03-09 20:10 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Document for testing (13.05 KB, application/vnd.oasis.opendocument.text)
2017-10-15 07:59 UTC, Dieter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dieter 2017-10-15 07:59:59 UTC
Created attachment 136978 [details]
Document for testing

Steps to reproduce

1. Open attached document. You find one paragraph with the paragraph style "test style"

2. Open navigator and ook at the paragraph styles. There is a "test style" and a "test style with indent". The next style of "test style" is "test style with indent" and vice versa

3. Add some paragraph breaks within the text

Result:
"test style" is the paragraph style for all paragraphs

Expected result:
paragraph style schould always change between "test style" and "test style with indent"


Version: 6.0.0.0.alpha0+ (x64)
Build ID: 465092047d5fa6ec6dd369372e712d76554570ff
CPU threads: 4; OS: Windows 6.19; UI render: GL; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2017-09-26_23:16:01
Locale: de-DE (de_DE); Calc: group


and also in 

Version: 5.4.2.2 (x64)
Build-ID: 22b09f6418e8c2d508a9eaf86b2399209b0990f4
CPU-Threads: 4; Betriebssystem:Windows 6.19; UI-Render: Standard; 
Gebietsschema: de-DE (de_DE); Calc: group
Comment 1 Dieter 2017-10-15 08:02:37 UTC
Perhaps bug 112511 is only a special case of the bug reported here.
Comment 2 Regina Henschel 2017-10-15 16:34:00 UTC
I cannot confirm it. For me the alternating between the paragraph styles works. I use Version: 6.0.0.0.alpha0+
Build ID: b567cfb980435df131d776915bce9152135bdf0f
CPU threads: 4; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-10-06_05:43:17
Locale: de-DE (de_DE); Calc: group
Comment 3 Buovjaga 2017-11-07 13:01:06 UTC
Dieter: how do you add the breaks? If I hit enter twice, it changes the style. Do you mean it should change style upon hitting enter once?

Arch Linux 64-bit, KDE Plasma 5
Version: 6.0.0.0.alpha1+
Build ID: b35bb38f18fd94aa67af944f76b820d59380b78b
CPU threads: 8; OS: Linux 4.13; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on November 7th 2017
Comment 4 Dieter 2017-11-08 20:30:15 UTC
I put the cursor somewhere in the text and press enter - that's it. There are some documents, where I have no problems, and some, where the "next-style-rule" is ignored.
Comment 5 Buovjaga 2017-11-09 16:10:51 UTC
(In reply to Dieter Praas from comment #4)
> I put the cursor somewhere in the text and press enter - that's it. There
> are some documents, where I have no problems, and some, where the
> "next-style-rule" is ignored.

Even if I do it from scratch I always have to hit enter *twice* before the style changes (for the new, empty paragraph).

Regina: what do you think is the expected behaviour?
Comment 6 Dieter 2017-11-09 16:52:10 UTC
Regarding to LO-help I would expect, it is only necessary to press 'Enter' once. In a lot of my documents it works in this way very well, but in some it doesn't.

Next Style
Select an existing style that you want to follow the current style in your document. For paragraph styles, the next style is applied to the paragraph that is created when you press Enter. For page styles, the next style is applied when a new page is created.
Comment 7 Buovjaga 2017-11-09 17:00:08 UTC
(In reply to Dieter Praas from comment #6)
> For paragraph styles, the next style is applied to the paragraph
> that is created when you press Enter.

But that kind of distinguishes it from pre-existing material.. ie. the empty, newly created paragraph does get the style. We are in semantic territory..
Comment 8 Dieter 2017-11-09 17:02:37 UTC
(In reply to Regina Henschel from comment #2)
> I cannot confirm it. For me the alternating between the paragraph styles
> works. I use Version: 6.0.0.0.alpha0+

Did you press 'Enter' with the cursor within the text or at the end of the paragraph? When the cursor is at the end of the paragraph the alternating works. But with the cursor within the paragraph it doesn't. That is something I wouldn't expect.
Comment 9 ajlittoz 2018-06-04 13:39:37 UTC
(In reply to Dieter Praas from comment #8)
> (In reply to Regina Henschel from comment #2)
> 
> Did you press 'Enter' with the cursor within the text or at the end of the
> paragraph? When the cursor is at the end of the paragraph the alternating
> works. But with the cursor within the paragraph it doesn't. That is
> something I wouldn't expect.

I think it is part of the specification. At least, I'm satisfied with it.

If I break a paragraph with the cursor of the middle of it, I expect 2 paragraphs with the original style. This is convenient to redistribute text.

To apply the next-style rule, I intentionally put the cursor at end of paragraph before hitting Enter.

This means if I want to keep only the first sentence or few words of a paragraph in the original style and have the rest in tne "next Style" formatting, I must perform two operations: break the paragraph, restyle the tail with the paragraph style menu.
Comment 10 Dieter 2018-06-07 19:36:33 UTC
Now the behaviour is more clear to me. If you
a) Press Enter at the end of a paragraph, the "next-style-rule" is applied
b) Press Enter at the beginning or within the paragraph "next-style-rule" is ignored (=> I changed the bug summary)

I would expect, that the "next-style-rule" is applied always, if you add a new paragraph.
Comment 11 Xisco Faulí 2018-12-05 11:42:05 UTC
(In reply to Dieter Praas from comment #10)
> Now the behaviour is more clear to me. If you
> a) Press Enter at the end of a paragraph, the "next-style-rule" is applied
> b) Press Enter at the beginning or within the paragraph "next-style-rule" is
> ignored (=> I changed the bug summary)
> 
> I would expect, that the "next-style-rule" is applied always, if you add a
> new paragraph.

@Dieter, so should we still consider this a bug ?
Comment 12 Dieter 2018-12-05 12:00:03 UTC
(In reply to Xisco Faulí from comment #11)
> @Dieter, so should we still consider this a bug ?

I would say "yes", bcause for me it is an unconsistent behaviour. I give an example:
When I write an article or a book, every chapter or sub-chapter starts with a paragraph with no indent; there's the rule, that every further paragraph has an indent. If I seperate the first parapgraph, the new paragraph has no indent. That's an undesired and inconsistent behaviour.
Comment 13 Dieter 2019-05-31 08:37:47 UTC
Still the same behaviour in

Version: 6.3.0.0.alpha1+ (x64)
Build ID: e92dcfdc7bd7b237e0bee26ff226a102d9e8e766
CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2019-05-14_00:00:57
Locale: en-US (de_DE); UI-Language: en-US
Calc: threaded

I'm still convinced, that this behaviouris not consistent.
cc: Design Team to come to a final decision.
Comment 14 Thomas Lendo 2019-06-09 01:53:24 UTC
For me, there is no bug and LibreOffice behaves as expected (or as I'm used to use it ;-).

Next paragraph style rule only applies at a new empty following paragraph.

A line break within an existing paragraph isn't changing any paragraph style as that would break user expectations ("Help! Why is my text changing when I hit Enter/Return?!").

A line break at the beginning of a paragraph should also not change anything as the rule is named "next style". There must be made a new option "previous style" to fulfill this expectation. And it's not sure that the same is wanted for following and previous paragraph styles., so we should not assume that.
Comment 15 Cor Nouws 2019-06-12 09:06:15 UTC
(In reply to Thomas Lendo from comment #14)
> For me, there is no bug and LibreOffice behaves as expected (or as I'm used
> to use it ;-).
> 
> Next paragraph style rule only applies at a new empty following paragraph.
> 
> A line break within an existing paragraph isn't changing any paragraph style
> as that would break user expectations ("Help! Why is my text changing when I
> hit Enter/Return?!").
> 
> A line break at the beginning of a paragraph should also not change anything
> as the rule is named "next style". There must be made a new option "previous
> style" to fulfill this expectation. And it's not sure that the same is
> wanted for following and previous paragraph styles., so we should not assume
> that.

Sounds very much OK to me!
Comment 16 Dieter 2019-06-12 09:23:06 UTC
(In reply to Thomas Lendo from comment #14)
> A line break within an existing paragraph isn't changing any paragraph style
> as that would break user expectations ("Help! Why is my text changing when I
> hit Enter/Return?!").

I always thought: "Help! Why does the style not change, when I hit Enter/ Return?" Again an example: You have the rule, that a paragraph without indent is followed by a paragraph with indent. If you want to separate a paragraph without indent into two paragraphs the next paragraphs should be a paragraph with indent. But now you have to change paragraph style manually. 

If there won't be an change I propse to precise the documentation

https://help.libreoffice.org/6.4/en-US/text/shared/01/05040100.html?DbPAR=SHARED#bm_id3153383
Comment 17 Cor Nouws 2019-06-12 09:58:39 UTC
(In reply to Dieter Praas from comment #16)
> If there won't be an change I propse to precise the documentation
> 
> https://help.libreoffice.org/6.4/en-US/text/shared/01/05040100.
> html?DbPAR=SHARED#bm_id3153383
+1 :)
Comment 18 Thomas Lendo 2019-06-12 20:45:36 UTC
(In reply to Dieter Praas from comment #16)
You are right. The help text is misleading and should be adapted.

And I've to clarify my statement in comment 14:

Not
"Next paragraph style rule only applies at a new empty following paragraph."
but
Next paragraph style rule only applies at the end of a paragraph for a new empty following paragraph.

Therefore the help text "For paragraph styles, the next style is applied to the paragraph that is created when you press Enter." should be changed to "For paragraph styles, the next style is applied to an empty paragraph that is created when you press Enter at the end of an existing paragraph."
Comment 19 Heiko Tietze 2019-06-13 08:02:21 UTC
So forwarding to the documentation team.
Comment 20 Commit Notification 2019-06-15 16:56:17 UTC
Olivier Hallot committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/help/+/1233d11cd9838d0496b75bf919272cfe38fd7b8e%5E%21

tdf#113131 Clarify Next Style for paragraphs.