Issue 65384 - Usability: Inconsistent behaviour when removing empty paragraph with backspace
Summary: Usability: Inconsistent behaviour when removing empty paragraph with backspace
Status: CLOSED DUPLICATE of issue 50135
Alias: None
Product: Writer
Classification: Application
Component: formatting (show other issues)
Version: OOo 2.0.2
Hardware: All All
: P3 Trivial with 1 vote (vote)
Target Milestone: ---
Assignee: Mathias_Bauer
QA Contact: issues@sw
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-15 10:49 UTC by clutz
Modified: 2013-08-07 14:43 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
test results of merging paragraphs with delete and backspace (14.00 KB, application/vnd.sun.xml.writer)
2006-06-16 16:22 UTC, burgesspa
no flags Details
backspace and delete test data (10.82 KB, application/vnd.oasis.opendocument.text)
2006-06-16 18:16 UTC, burgesspa
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description clutz 2006-05-15 10:49:39 UTC
There is already a ticket (#50135) describing inconsitent behaviour when
removing empty paragraphs with the DEL-Key, but this ticket regards the
behaviour the writer shows when pressing the Backspace-Key in the next paragraph.

I've got three cases with different behaviour. In each case, there are two
subsequent paragraphs, where the first paragraph (which is always an empty
paragraph!) should be deleted by placing the cursor at the beginning of the
second paragraph and pressing the backspace-key.

case 1)
- The first paragraph is empty and formatted as "Text body". 
- The second paragraph contains some text and is formatted as "Default". 
Now pressing the backspacke key at the start of the second paragraph, the first
paragraph gets deleted and the second paragraph remains in the paragraph-style
"Default". I guess, this is the correct behaviour.

case 2)
- The first paragraph is empty and formatted as "Text body".
- The second paragraph is also empty and formatted as "Default".
Now pressing the backspace key at the start of the second paragraph, the first
paragraph gets deleted and the second paragraph changes its paragraph-style from
"Default" to "Text body". This is inconsistent to case 1. BUG!?

case 3)
- The first paragraph is empty and formatted as "Heading 1". 
- The second paragraph contains some text and is formatted as "Default". 
Now pressing the backspacke key at the start of the second paragraph, the first
paragraph gets deleted and the second paragraph changes its paragraph-style from
"Default" to "Heading 1". This is also inconsistent to case 1. In particular
it's not clear why the two paragraph styles "Text body" and "Heading 1" should
behave different in the same usecase. BUG!?
Comment 1 michael.ruess 2006-05-15 14:30:24 UTC
First case is -as you already remarked- correct behaviour. 
Third case is also correct. See specification
http://specs.openoffice.org/writer/numbering/NumberingBullet1.sxw right above
Chapter 7.8. This is an exception for paragraphs which belong to the Outline.

MRU->FL: what is described in the second case there's no definition about a
correct behaviour. When merging two empty paragraphs by using "Backspace" the
format of the first of the two  paragraphs is kept after the merging process. It
is not really obvious which of the two formats could be the desired in this case.
Comment 2 clutz 2006-05-15 14:57:15 UTC
thanks for the clarification for case 3.

So then I think case 2 would be more consistent/more intuitive with the
following behaviour:
- if the first paragraph is a non-outline paragraph then behave like case 1
- if the first paragraph is an outline-paragraph then behave like case 3

In our letterhead-system we have got some mechanism that removes empty leading
and trailing paragraphs when inserting a textfragment using
insertDocumentFromURL. At the moment I have got to use a special treatment of
case 2, of which I don't think it should be really required.
Comment 3 burgesspa 2006-06-16 16:22:49 UTC
Created attachment 37196 [details]
test results of merging paragraphs with delete and backspace
Comment 4 burgesspa 2006-06-16 16:24:39 UTC
In the attachment I enclose the results of my tests using Ooo writer to merge
two paragraphs together using both the delete and backspace keys.

I started this exercise because when using Ooo I found it difficult to figure
out how to merge together two paragraphs with different paragraph styles in
order to retain the paragraph style I wanted. One time it took the first
paragraph's style another time it took the second's.

The reason for my problem was mainly due to an issue reported in issue 65384
which means the expected style is not applied when the second paragraph is
empty, or when style of the first paragraph is an outline style.
The empty paragraph behavior is a bug, but the outline style behavior is a
"feature": <<If a paragraph gets merged with an outline paragraph by pressing
backspace, the merged outline paragraph will keep it's attributes.>>

However I do not like the outline style behavior exception. This means that it
is impossible to choose which style to retain when merging two paragraph when
the first paragraph is an outline style. Why is this exception needed? Also the
specification does not say what happens when both paragraphs use outline styles,
what actually happens is the style of the first paragraph is used.  
Rather than having this exception I think it would be better to make everything
consistent and make the delete and backspace keys perform the same function,
namely to always use the paragraph style of the first paragraph for the style of
the merged paragraph. This would then also be consistent with MS Word (XP).
However I think having different behavior for delete and backspace is good
(although it takes a time to get used to). I would express the behavior as follows:

* using the delete key at the end of the first paragraph should join the
paragraph with the next paragraph and retain the paragraph style of the first
paragraph.

* using the backspace key at the beginning of the second paragraph should join
the paragraph with the previous paragraph and retain the paragraph style of the
second paragraph.

Perhaps a configurable option would be best, with the MS Word behavior as default.
Comment 5 burgesspa 2006-06-16 18:16:18 UTC
Created attachment 37203 [details]
backspace and delete test data
Comment 6 frank.loehmann 2006-07-14 14:39:27 UTC
FL: The current "intelligent" behavior is not understand by users. Removing a
carriage return via backspace or delete key has to behave the same. Content,
styles or direction (del or backspace key) must not change the behavior. Set
target to OOo 2.x.
Comment 7 clutz 2007-03-16 11:12:59 UTC
changing plattform and os to all.
Comment 8 frank.loehmann 2007-09-07 11:53:18 UTC
Settarget to OOo 3.0
Comment 9 snofriacus 2008-03-05 10:42:56 UTC
see issues 50135 and 79017 for other perspectives on this problem
Comment 10 frank.loehmann 2008-04-09 13:49:21 UTC
We have to keep this behavior simple:

Always keep the paragraph format of the upper paragraph if paragraph is not
empty. Empty paragraphs will just be deleted.
Comment 11 frank.loehmann 2008-04-17 13:30:47 UTC
We have discussed this issue on discuss@ux.openoffice.org. Unfortunately there
was no clear pro or cons about this proposed change. Some people proposed to
keep the old functionality alternatively or add some more magic to handle
paragraphs with white spaces like empty paragraphs. But I do not think that we
need the old and new behavior in parallel. We have several other Ctrl+Backspace
or Alt+Return shortcuts not known by users today. So lets keep it straight
forward without magic:

Always keep the paragraph format of the upper paragraph if paragraph is not
empty. Empty paragraphs will just be deleted.
Comment 12 Mathias_Bauer 2008-04-21 17:29:49 UTC
I have transferred the necessary information to issue 50135 that is essentially
describes the same problem, is older than this one and has more votes.

*** This issue has been marked as a duplicate of 50135 ***
Comment 13 Mathias_Bauer 2008-04-21 17:31:11 UTC
closing duplicate