Issue 45491 - Allow configuration of behaviour when a line break is inserted
Summary: Allow configuration of behaviour when a line break is inserted
Alias: None
Product: Writer
Classification: Application
Component: configuration (show other issues)
Version: OOo 2.0 Beta
Hardware: PC Windows XP
: P4 Trivial with 35 votes (vote)
Target Milestone: ---
Assignee: stefan.baltzer
QA Contact: issues@sw
Depends on:
Reported: 2005-03-19 16:46 UTC by mzywitza
Modified: 2013-08-07 14:42 UTC (History)
5 users (show)

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

Perl script to patch OpenOffice.odt Writer docs to enable old behaviour (741 bytes, text/plain)
2007-01-31 23:03 UTC, ostkamp
no flags Details
Small extension to switch behavior like OOo1.x or OOo2 (5.64 KB, application/x-compressed)
2007-02-02 18:19 UTC, Mathias_Bauer
no flags Details
Test case for Compatibility option "Configuration Setting for Justified Text Behavior" (4.26 KB, text/html)
2007-07-04 19:23 UTC, stefan.baltzer
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description mzywitza 2005-03-19 16:46:16 UTC
Issue 13507 described, that if you enter a line break by typing shift-enter, the
text is not justified. The behaviour in OOo 2.0 beta is now like in MS-Word, the
line is treated like in the middle of a paragraph and is therefore justified
even when there are only a few words in the line.

Some users on the german users and developers list already complained about this
"new" behaviour. I suggest that there should be a configuration option where it
is possible to choose the desired behaviour. The best place would be the Writer
Compatibility options.
Comment 1 khmooo 2005-03-19 20:12:04 UTC
*** Issue 45491 has been confirmed by votes. ***
Comment 2 khbellgardt 2005-03-21 09:27:59 UTC
I think the best place for the new option would be in the paragraph options
which can be selected case by case and not only globally. If then someone wants
to modifiy the behaviour globally, he can adapt the standard paragraph template.

Although the old behaviour often makes sense, there are some cases where the new
behaviour is essential. Therefore, it should be possible to change it for a
single paragraph. An example is a justified text that contains short
mathematical formulas or other elements containing non-alphanumeric characters
that should not be splitted into two lines, such as physical units, e.g.
"[g/l]". When these elements lie at the end of the line they are often
automatically broken, e.g. "[g" at the end of the line and "/l]" on a new line.
One way to prevent this and at the same time keep the text justified is with the
new behaviour by inserting a line break before the element. 
Comment 3 studalk 2005-03-21 10:03:44 UTC
The new behaviour of justificating the last line maybe a possibility to prevent
physical units (as described by khbellgardt) from being split on two lines. But
it is not a good possibility. If you change text before this line break, the
line break will no longer be at the correct position. The correct approach for
this problem would be some feature to apply the characters of that physical unit
the property "no split". That means this string cannot be split up.
Comment 4 michael.ruess 2005-03-29 09:15:47 UTC
Reassigned to "requirements".
Comment 5 Mathias_Bauer 2007-01-31 15:11:18 UTC
Having a paragraph property is an interesting idea, but that would be a file
format change. So before going into this direction we need to find out if this
file format change would be accepted by the OASIS TC. This is in progress now.
Comment 6 Mathias_Bauer 2007-01-31 15:44:07 UTC
Having a paragraph property is an interesting idea, but that would be a file
format change. So before going into this direction we need to find out if this
file format change would be accepted by the OASIS TC. This is in progress now.
Comment 7 ostkamp 2007-01-31 23:03:43 UTC
Created attachment 42615 [details]
Perl script to patch OpenOffice.odt Writer docs to enable old behaviour
Comment 8 ostkamp 2007-01-31 23:09:29 UTC
This is just for a temporary workaround until a final solution has been found:

The attached Perl script (see above) can patch an existing OOo 2.x Writer
document so that the old OOo 1.1 behaviour is re-enabled. Just call the script
with two arguments, e.g. " oldfile.odt newfile.odt". It was created
for use under Linux/Unix, but with minor tweaking it should also work for
Windows. Module Archive::Zip is required.

For those wishing to change their files manually:

Unzip the *.odt file, locate the file 'settings.xml' and change the entry
"DoNotJustifyLinesWithManualBreak" to "true", then re-zip. This settings is
automatically active for documents imported from OOo 1.x, but is not available
in Writer Compatibility Options yet.


Comment 9 mbayer 2007-02-01 01:18:35 UTC
Why can't we just have an option at Tools -> Options -> Writer -> Compatibility
that makes OOo2 handle a text document as if it was generated with OOo1, hence
not justifying the last line? (Which would be, if I'm not mistaken, more or less
the same as if you used ostkamp's script for the file.)

A paragraph property would be fine, but I don't think having the one means you
can't have the other: Since a global flag in the file format already exists, we
could use that one now even over the UI, and not only with some "magic" or
direct manipulation. Once the paragraph property is in the file format standard,
the option for the global flag could be removed from the UI.
Comment 10 Mathias_Bauer 2007-02-02 18:19:36 UTC
Created attachment 42703 [details]
Small extension to switch behavior like OOo1.x or OOo2
Comment 11 Mathias_Bauer 2007-02-02 18:21:48 UTC
I think setting the target to "2.3" everybody should be pleased, right? In the
meantime we can clarify if we can get the paragraph property or if we will have
the document setting only. 

For the time being you can use the attached OOo extension to switch the setting
for the current document between the "old" and the "new" way.

It's a very "raw" extension. Not polished. :-) 

Be aware that the setting doesn't work after the fact. You have to reenter the
manual break again after you switched the setting. This might be a bug that has
to be fixed also.

Comment 12 Mathias_Bauer 2007-03-19 09:19:34 UTC
Peter, please work on this for 2.3

ATM we go for the setting in the options dialog. Please talk with UX about a
proper wording.
Comment 13 pb 2007-03-22 09:52:08 UTC
pb: I take over.
Comment 14 pb 2007-04-26 07:21:42 UTC
pb -> cj: I need a text for the compatibility options page.
Comment 15 christian.jansen 2007-04-26 08:48:05 UTC
Hi Peter,
we should go with this string.
"Don't expand word spaces on a line that ends with SHIFT-RETURN"
"Wortabstände in Zeilen, die mit Umschalt-Eingabe enden, nicht erweitern"
Comment 16 mbayer 2007-04-26 14:19:06 UTC
IBTD: The text should be consistent to the wording in the dialogue Paragraph
Style, tab Alignment, where we have an option "Expand single word" (in German
"Einzelnes Wort austreiben"), and in the dialogue Insert -> Manual Break, where
is just says "Line break" (in German "Zeilenumbruch"). After all, this option
isn't meant to work only with line breaks inserted via a keyboard shortcut, is it?

Thus, the text could be:
"Don't expand lines with [manual] line break"
"Zeilen mit [manuellem] Zeilenumbruch nicht austreiben"

(The help page/ tool tip should explain that this has to do with justified
paragraphs only.)
Comment 17 pb 2007-06-11 05:11:47 UTC
pb: the suggestion of Frank (fme) is "No justified alignment in lines ending
with manual line break". And I think I will take this string.
Comment 18 pb 2007-06-11 12:53:17 UTC
pb: fixed in cws fwk66.
Files changed:
/officecfg/registry/data/org/openoffice/Office/Compatibility.xcu 1.8.344.1
Comment 19 pb 2007-06-12 05:04:40 UTC
pb: more files changed:
/sw/source/ui/config/optcomp.hrc 1.8.786.1
Comment 20 pb 2007-06-21 11:07:31 UTC
pb -> sba: please verify, thx.
Comment 21 stefan.baltzer 2007-06-28 15:27:36 UTC
SBA: I have seen it working in general. BUT... This is not an enhancement. 
-> Issue reopened

(1) We have a UI change at its best (new UI entry with new string)
(2) We have a file format change (setting is saved in documents).

All this makes is a FEATURE.

Therefore we need a specification that tells i.e. where and what in the file
format this change is made, how old document (sdw, sxw) are treated when loading
and saving.
Maybe the "ConfWatch tests" need adjustment, too

Luckily, according to HDE, at least the AutoTests would not stumble over this
new entry in Tools-Options-Writer-Compatibility so they do not need immediate
adjustment because of this.
I put MBA on cc.
Comment 22 stefan.baltzer 2007-06-28 15:29:48 UTC
SBA: Reassigned to PB.
Comment 23 pb 2007-06-29 10:49:18 UTC
Sorry, here the more detailed description:

This new compatibility option makes it possible to go back to the old
behaviour: the lines with manual break are not justified.

This option is switch off for default. It is automatically switch
on for documents imported from OOo 1.x.

The file format change is already part of 2.0.1 as a hidden flag.
Because the current behavior is not changed the "ConfWatch" tests need no
Comment 24 pb 2007-06-29 10:57:41 UTC
pb -> sba: because it is not really a new feature but only the UI entry was
added, I think the new detailed description is like a specification. So please
verify again, thx.
Comment 25 stefan.baltzer 2007-06-29 14:27:10 UTC
SBA: All new UI controls to toy with are a new feature (Yes, from the USERS
point of view). But remember that the Office is made for users and not for
developers enjoying their masterpieces in poorly documented code.

A UI control like this check box...
 - triggers a change in visible behavior
 - needs documentation and string translation
 - needs QA, otherwise it might stop working (or worse) without being noticed.

I understand that the developers point of view "This functionality was already
built-in and working in background, thus it is no feature". But we would not be
where we are now concerning the overall quality of OOo without assuring the
quality. And documentation is an important part of Quality Assurance, both as
base and as outcome of QA work. 
Documentation "by the code and its comments plus comments in issue tracker" does
not help any user who searches for a hint in the online help. And more than no
user prefers to get to know what a certain UI control does WITHOUT reading the
underlying source code.

Uuuh, yes... This is not the place to discuss the various points of view "What
is a feature".

FL agreed to write the missing specification, by the way.
Comment 26 stefan.baltzer 2007-06-29 14:51:28 UTC
SBA->FL: As discussed, please
 - finalize the spec and insert link here 
 - tell PB what to change (String without "do not" and default "checked" but
same behavior as is now)
 - reassign issue to PB.
Thank you.
Comment 27 stefan.baltzer 2007-06-29 14:55:51 UTC
SBA: Reassigned to FL
Comment 28 frank.loehmann 2007-06-29 15:41:39 UTC
Please find a new spec here:

The new spec can be used for all newly introduced compatability options in the

FL->PB: We had to change the string for that option because of a double
negation. I have reworded the option and the option itself is now checked by
default. Details see spec.
Comment 29 pb 2007-06-30 14:06:07 UTC
pb: fixed with new option text and default.
Files changed:
/officecfg/registry/data/org/openoffice/Office/Compatibility.xcu 1.8.344.2
/sw/source/ui/config/optcomp.hrc 1.8.786.2
Comment 30 pb 2007-06-30 15:04:29 UTC
pb -> sba: next try: please verify, thx.

The first FeatureMail is invalid now, so please have a look here:

Spec here:
Comment 31 stefan.baltzer 2007-07-03 18:03:04 UTC
SBA->PB: Not yet...
(1) Patched StarOffice SO8U6) shows wrong default (unchecked), Full-Inst is OK.
(2) Flag seems to get exported to SXW and read on load of SXW.
Try again, please.
Comment 32 stefan.baltzer 2007-07-03 18:05:57 UTC
Reassigned to PB.
Comment 33 pb 2007-07-04 12:28:24 UTC
pb: set default correctly now.
/officecfg/registry/data/org/openoffice/Office/Compatibility.xcu 1.8.344.3
Comment 34 pb 2007-07-04 14:07:07 UTC
pb -> sba: next try. Please verify, thx.
Comment 35 stefan.baltzer 2007-07-04 19:20:56 UTC
SBA: Verified in CWS fwk66. Test Case written in TCS tool.
Comment 36 stefan.baltzer 2007-07-04 19:23:54 UTC
Created attachment 46525 [details]
Test case for Compatibility option "Configuration Setting for Justified Text Behavior"
Comment 37 andreschnabel 2007-09-09 10:31:16 UTC
ok in OOo2.3rc2 -> closed