Issue 13507 - shift+enter in a middle of string format line as last line
Summary: shift+enter in a middle of string format line as last line
Alias: None
Product: Writer
Classification: Application
Component: code (show other issues)
Version: OOo 1.1
Hardware: PC All
: P3 Trivial with 5 votes (vote)
Target Milestone: ---
Assignee: michael.ruess
QA Contact: issues@sw
Keywords: oooqa
: 26504 39290 39383 42621 44186 44392 46868 48386 48471 53272 66763 72247 (view as issue list)
Depends on:
Reported: 2003-04-16 12:57 UTC by maxbritov
Modified: 2013-08-07 14:41 UTC (History)
6 users (show)

See Also:
Latest Confirmation in: ---
Developer Difficulty: ---

example text (5.49 KB, application/octet-stream)
2003-04-16 12:59 UTC, maxbritov
no flags Details
Screenshot with 1 paragraph and shift-enter in the midle (6.31 KB, image/png)
2003-09-24 13:49 UTC, maxbritov
no flags Details
workaround: use a <tab> before the linebreak (366 bytes, text/plain)
2004-12-21 11:53 UTC, lohmaier
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description maxbritov 2003-04-16 12:57:12 UTC
When I press shift+enter on string and type next words
OO format this string as last string.
I'll add test.swx for example.
Comment 1 maxbritov 2003-04-16 12:59:01 UTC
Created attachment 5704 [details]
example text
Comment 2 maxbritov 2003-05-12 12:12:24 UTC
It's not error??? 8(
IMHO - error! And must fix.
Comment 3 utomo99 2003-09-24 10:18:03 UTC
Please try using the latest OOo 1.1 Rc5, 
Your version already old enough, and many bug fixes since your version 
and 1.1 RC5. If the problem still happend in 1.1 RC5 please report back
Comment 4 maxbritov 2003-09-24 13:44:20 UTC
I have it in 1.1rc4. I will send screenshot
Comment 5 maxbritov 2003-09-24 13:49:18 UTC
Created attachment 9637 [details]
Screenshot with 1 paragraph and shift-enter in the midle
Comment 6 jack.warchold 2003-09-25 17:54:00 UTC
hi maxbritov, what did you expect when you press shift-enter?
pressing shift enter just inserts a linebrake and no paragraphbrake.
this linebrake will still be a member of the current paragraph.

maybe i do not understand you right. so blease tell me what you 
expected to see!
for me the behavior of pressing shift-enter ist right
Comment 7 jack.warchold 2003-09-25 17:54:21 UTC
reassigned to jw
Comment 8 maxbritov 2003-09-26 09:02:12 UTC
Whean I press shift+enter I want to get string format like paragraph
format. But I get format like last string of paragraph.
Paragraph formatted as Justify, but line after shift-enter formatted
as Left. I want to get all paragraph lines with single format.

For example:
I get:
gs hdhg sjh djshd sjh djh djs
sj dh sd sf shift+enter
dkfjdk ksjdk jskjf jskjf jskd

I wont to get:
gs hdhg sjh djshd sjh djh djs
sj       dh       sd       sf shift+enter
dkfjdk ksjdk jskjf jskjf jskd

I got it in MSWord and I think that is right.
Comment 9 maxbritov 2003-09-26 09:06:37 UTC
not "I wont to get"
Please read as "I want to get:"
I'm sorry.
Comment 10 jack.warchold 2003-09-29 09:22:59 UTC
ok, we tested it here with word an we got the same result like we got 
in OOo. so maybe your version of ms-office was/is localized. maybe you 
can configure OOo like you want if you open the dialog tools -> 
configure and set the keys for your needs.
i set this to invalid.
Comment 11 jack.warchold 2003-09-29 09:23:20 UTC
invalid -> closed
Comment 12 akrioukov 2003-09-29 14:23:53 UTC
Let me explain Maxim's problem. When we insert a line break character inside a 
justified paragraph in MS Word, the last line before this line break is also 
justified, even if it contains only several words or characters. In OOo we can see 
just the opposed: the line before line break is aligned according to the same 
rules as if it was the last line in the paragraph. So we still can justify it by setting 
the Justified -> Last Line parameter in   Format -> Paragraph -> Alignment. 
However, I'm unsure if this approach is logical, since this line is not really "last" 
and justifing is usually needed before line break, but not at the paragraph end. So 
I think this issue may be marked as an enhancement. 
Comment 13 jack.warchold 2003-09-29 14:42:02 UTC
ok, your statement and maxbritovs mail makes it clear now. what you 
discribed will be an enhancement yes.
i will reopen and reassign this to bh

Comment 14 jack.warchold 2003-09-29 14:46:36 UTC
reassigend to bh
Comment 15 jack.warchold 2003-09-29 14:46:59 UTC
set to encancement
Comment 16 guido.pinkernell 2003-10-22 14:48:35 UTC
Confirmed in 1.1 final, modified version accordingly, set to New.
Comment 17 g.marxen 2003-10-23 09:48:47 UTC
If the "enhancement" (line with <shift>+<enter> is block-aligned) is
implemented, then there must be an option to deactivate this feature. 
Comment 18 g.marxen 2003-10-23 09:50:37 UTC
If the "enhancement" (line with <shift>+<enter> is block-aligned) is
implemented, then there must be an option to deactivate this feature. 

Guenter Marxen (a0071) 
Comment 19 mojoe 2003-11-24 14:35:13 UTC
I see this as more than an enhancement (and definitely as more than an
"enhancement"). Even though it may be legacy behaviour in line with
prior versions I think of it as a bug.

I often have to convert paper documents into electronic documents. In
that work I require full control of the line breaks while maintaining
paragraph logic. So a paragraph would consist exclusively of
shift-enter terminated lines (except the last line, of course). With
OOo these paragraphs don't display properly at the moment. In fact
there is no difference at all between a left alligned and a justified

Work-arounds exist (e.g. make each line into a paragraph (or cut off
the last line of each paragraph) and then justify including "last"
line (plus left allign old last line of paragraph)), but they do
require more work and break the paragraph logic (often stranding half
a word in a separate paragraph).

So I am strongly in favour of having this fixed/implemented.

mojoe (Klaus Wiese)  
Comment 20 frank.meies 2003-11-24 15:00:03 UTC
This is on our list for 2.0. We need a compatibility option like MS
Word (Tools->Options->Compatability->Custom->
Don't expand character spaces on the line ending Shift-Return)

Marked internal bug #98917# as duplicate of this one.
Comment 21 frank.meies 2003-12-18 08:08:07 UTC
Comment 22 frank.meies 2004-02-04 15:18:27 UTC
FME: Discussed this with FL. We consider this a bug, thus this will be fixed
without a compatibility flag.
Comment 23 frank.meies 2004-02-09 15:18:19 UTC
FME: Fixed in cws fmebugs01
sw/source/core/text/inftxt.cxx rev.
sw/source/core/text/itradj.cxx rev.
sw/source/core/text/porrst.hxx rev.
sw/source/core/text/porrst.cxx rev.
Comment 24 frank.meies 2004-03-09 14:22:45 UTC
Comment 25 lohmaier 2004-03-15 20:35:50 UTC
*** Issue 26504 has been marked as a duplicate of this issue. ***
Comment 26 michael.ruess 2004-03-16 14:15:22 UTC
MRU: checked the fix with CWS fmebugs01.
Comment 27 michael.ruess 2004-03-16 14:15:34 UTC
Comment 28 michael.ruess 2004-04-01 14:05:23 UTC
Checked integration with 680m32.
Comment 29 michael.ruess 2004-12-20 09:44:42 UTC
*** Issue 39290 has been marked as a duplicate of this issue. ***
Comment 30 michael.ruess 2004-12-21 11:07:02 UTC
*** Issue 39383 has been marked as a duplicate of this issue. ***
Comment 31 lohmaier 2004-12-21 11:53:16 UTC
Created attachment 20726 [details]
workaround: use a <tab> before the linebreak
Comment 32 lohmaier 2004-12-21 11:54:39 UTC
Put a <tab> before the line-break

You can search for a "justified formatted line-break" using the "Find and
Replace" dialog:
Search for "\n" (without the quotes), check "[x] regular expression" and klick
the "Format" button. There you can choose "justified" on the tab-page
"Alignment". Don't forget to check "[x] including styles" in the find dialog.

(attached as well so that it can be found easier)
Comment 33 ksmolder 2004-12-29 00:08:32 UTC
Although the implementation of this behavior in OOo 680m65 is compatible with MS
Word, it is not compatible with the way a default browser handles the <br>
element within a paragraph. IMHO, inserting a line-break with shift+enter is
completely the same as using a <br> element when writing web pages.

I'm not concerned about this kind of compatibility with MS Word since the
document doesn't look nice anymore. What's more importanmt to me, is that I can
produce a nice looking pdf (for example).

Also, the workaround (inserting a tab before the line break) isn't a real
solution. Adding text to the paragraph may cause the last line te become to long
to fit on 1 line. Therefor, the tab-character will jump to the next line and
thus put a blank line between the first and second part of the paragraph.
Comment 34 michael.ruess 2005-02-14 07:45:46 UTC
*** Issue 42620 has been marked as a duplicate of this issue. ***
Comment 35 michael.ruess 2005-02-14 07:51:23 UTC
*** Issue 42621 has been marked as a duplicate of this issue. ***
Comment 36 michael.ruess 2005-03-06 11:02:39 UTC
*** Issue 44186 has been marked as a duplicate of this issue. ***
Comment 37 michael.ruess 2005-03-08 07:08:56 UTC
*** Issue 44392 has been marked as a duplicate of this issue. ***
Comment 38 studalk 2005-03-19 18:49:51 UTC
i think the behaviour to justify the line before a line break (shift return) is
totally wrong. Typography suggests (strongly) that the spacing between words
should not be larger than the line spacing.
Assume you have 4 words in the line you want to end with a line break. Now think
of MS Word behaviour that drives these 4 words out to width of a ca. 15cm . This
is nothing but really ugly.

Furthermore if i want a line break in my text, i also want the reader to see
that there is a line break. If now also justifies this line, the new line
will be barely visible. Except if there is the above described huge, ugly word

The argument that MSWord does it in this way is no argument at all. As far as I
know Tex does it the way used to do (in the old versions).
Comment 39 eric.savary 2005-04-07 17:32:05 UTC
*** Issue 46868 has been marked as a duplicate of this issue. ***
Comment 40 michael.ruess 2005-04-20 06:44:40 UTC
*** Issue 47785 has been marked as a duplicate of this issue. ***
Comment 41 michael.ruess 2005-04-29 08:24:13 UTC
*** Issue 48386 has been marked as a duplicate of this issue. ***
Comment 42 michael.ruess 2005-05-02 08:36:14 UTC
*** Issue 48471 has been marked as a duplicate of this issue. ***
Comment 43 lleland 2005-05-03 03:11:57 UTC
The line-break is just that, on override of the automatic wrap-break. It does
not change style, it only designates a break point. It should never cancel
justification. The canceling of justification in the last line of a paragraph is
a circumstance of paragraph style and has nothing to do with a wrap overriding
line break. As a matter of fact, it has been a long standing request to add a
paragraph style configuration that does not cancel justification in the last
line of a paragraph. (I also considered this new behavior a bug since it broke
many old documents, but I've researched the concepts and stand corrected.)

This is a very old argument that is based on the two different concepts of text
paragraph and style paragraph. A text paragraph encapsulates context while a
style paragraph encapsulates layout (a misnomer that should probably be changed
to style block). It is possible to have several style paragraphs (blocks) in one
text paragraph, but current word processor styles do not clearly distinguish
between the two. In HTML, the <p> designates text paragraphs while the style of
that <p> and any child <span> elements, along with any <br> elements, designate
style paragraphs (blocks).

Columned articles, like in magazines and newspapers, depend on line breaks not
canceling justification. OCR page layout depends on it since the original fonts
may not be available. This changes the size of characters and words. The only
way to correct the word counts per line is with line breaks.
Comment 44 lleland 2005-05-03 03:27:09 UTC
BTW: Given that this is a fundamental change in OOo behavior, it would be a
*very* good idea to have OOo 2.0 automatically (with a notification and
cancellation dialog) add a style correction to documents created with older
versions that have line breaks in justified paragraphs so that the document will
layout the same in 2.0 as it did in earlier versions. There are a lot of
documents that will appear broken in 2.0 if this is not done. This is why this
issue has so many duplication entries. Also, this change *must* be clearly and
prominently documented.
Comment 45 murphyde 2005-06-15 08:18:38 UTC
Sorry if I revive this old discussion, but I've got an issue with the new
behaviour (in 2.0 Beta).

In 1.1.x I used to insert linebreaks within (numbered or unnumbered)
enumerations by Shift+Enter, which are nicely shown as like beginning a new
paragraph *within* the same item of the enumeration. This helps structuring the
content of longer enumeration items, and seems like a logical behaviour to me.
Just pressing Enter would begin a new item.

The new behaviour now deprives me of that possibility of showing logical
structure; the last line before the linebreak just gets driven out and looks
outright *ugly*, a behaviour I always despised in MS Word. Is there any other
possibility to achieve this goal, preferrably compatible with 1.1.x? Otherwise
it will get hard to have a consistent representation of such "paragraphed"
enumerations when viewing/printing old documents with OOo 2 or collaboratively
working on old documents with both OOo versions 1 and 2. Furthermore I'd like to
maintain a possibility to break these items within to avoid "spaghetti text".

Comment 46 maxbritov 2005-06-15 12:38:34 UTC
I think you should use feature "Insert Unnumbered Entry"
See View - Toolbars - Bullets and Numbering
It work in both branches 1.x.x and 2.x.x
Comment 47 murphyde 2005-06-15 14:46:34 UTC
Thanks maxbritov, works as expected; you can use backspace to get rid of the
bullet/number for a newly created item. And it has the advantage that each
paragraph in the item can be formatted separately.
Still I think that it should be possible to select the behaviour (on document
level) to be keep consistence for old documents.
Comment 48 Regina Henschel 2005-08-13 13:55:15 UTC
*** Issue 53272 has been marked as a duplicate of this issue. ***
Comment 49 lohmaier 2006-07-02 00:22:52 UTC
*** Issue 66763 has been marked as a duplicate of this issue. ***
Comment 50 michael.ruess 2006-12-04 11:12:11 UTC
*** Issue 72247 has been marked as a duplicate of this issue. ***
Comment 51 allart 2006-12-04 13:54:46 UTC

after reading all the posts, I still think that shift-enter should, at least
optionnaly, act like the end of a paragraph.
I don't agree with the argument which says that shift-enter should only serve to
give full control to line-breaks at end of lines, because:
- in this case line-breaks should be treated as adjustments only if they are
inserted "near" the end of line;
- adding formatting adjustment is never a good idea. In my office I proscribe
all kinds of adjustments: never empty lines, never tabs, and now never
line-breaks. If a formatting without adjustment is correct with a good set of
styles, it will be correct with all others good sets of styles. This is the
force of OOo.
- line-breaks as adjustments could often be avoid by changing the width scaling
of the characters in the paragraph style.

Considering that, manual line-breaks should never be used, except... to break
lines. And all broken lines should be traited like the last line of a paragraph
which is a particular broken line.

It is very useful to have broken lines inside a paragraph:
- because you want insert a carriage return inside a numbered list without
generating a new item (yes, I saw the workaround consisting to insert non
numbered items, but now, the trick will be to explain that to users with a few
- because you want to give a border and a color background to your paragraph,
and to insert carriage returns without getting several frames.

So I suggest that the behavior be controlled by the user, may be at the document
level, or at the paragraph style level, or at the break-line level. I dont know.

Best regards,


Comment 52 meywer 2008-08-11 19:37:47 UTC
I strongly vote for studalks comments!!!

Format - Paragraph - Alignment
I find (in OO3beta):
[] Left
[] Right
[] Center
[] Justified
Last line [Left ; Centered ; Justified]
[] Expand single word
(and Text-to-text-alignment)

And I would like to have the following 2 items in addition:

Last line [Left ; Centered ; Justified ; Right]
(good for lyrics/poems)                  ^^^^^

[] Expand manually broken lines
for which the default is not important for me, but I would uncheck this checkbox!
Comment 53 meywer 2008-08-11 19:40:13 UTC
I wonder about the status closed fixed...
Comment 54 meywer 2008-08-12 07:02:46 UTC
For this:

Last line [Left ; Centered ; Justified ; Right]
(good for lyrics/poems)                  ^^^^^

it would be necessary first, to make this option available for all alignments
(not only for justified as it is now)
And - it should work in the sense of "Last line - if it's not the first (only)
line of the paragraph".

And/or it could be even one more option:
First line [Left ; Centered ; Justified ; Right]
And - this should work in the sense of "First line - always - also if it's the
last (cause only) line of the paragraph".

For Poems it's good (at least in german):

blablabla blablabla blablabla blablabla blablabla blablabla blablabla
                                       blablabla blablabla blablabla blablabla
                                                           blablabla blablabla
blublublu blublublu blublublu blublublu blublublu blublublu blublublu
                                       blublublu blublublu blublublu blublublu
                                                           blublublu blublublu 

("first line left, paragraph right")

Comment 55 michael.ruess 2008-08-12 15:36:36 UTC
MRU->meywer: we will not reopen any fixed issues if someone likes to have
additional enhancements for it.
Please file a new issue if you feel that there's a defect in a newer version
available of if you would like an additional enhancement like you described. 
Thanks for your patience!