Apache OpenOffice (AOO) Bugzilla – Issue 45491
Allow configuration of behaviour when a line break is inserted
Last modified: 2013-08-07 14:42:39 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.
*** Issue 45491 has been confirmed by votes. ***
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.
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.
Reassigned to "requirements".
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.
Created attachment 42615 [details] Perl script to patch OpenOffice.odt Writer docs to enable old behaviour
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. "ooo_45491.pl 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. Regards Guido
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.
Created attachment 42703 [details] Small extension to switch behavior like OOo1.x or OOo2
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.
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.
pb: I take over.
pb -> cj: I need a text for the compatibility options page.
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"
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.)
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.
pb: fixed in cws fwk66. Files changed: /officecfg/registry/schema/org/openoffice/Office/Compatibility.xcs 1.13.146.1 /officecfg/registry/data/org/openoffice/Office/Compatibility.xcu 1.8.344.1 /svtools/inc/svtools/compatibility.hxx 1.2.26.1 /svtools/source/config/compatibility.cxx 1.13.178.2 /sw/inc/viewsh.hxx 1.55.28.1 /sw/source/core/view/viewsh.cxx 1.71.26.1
pb: more files changed: /sw/source/core/doc/docnew.cxx 1.73.28.1 /sw/source/ui/config/optcomp.hrc 1.8.786.1 /sw/source/ui/config/optcomp.src 1.12.72.1 /sw/source/ui/config/optcomp.cxx 1.12.56.1
pb -> sba: please verify, thx.
SBA: I have seen it working in general. BUT... This is not an enhancement. -> Issue reopened Details: (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.
SBA: Reassigned to PB.
pb: 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 adjustment.
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.
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.
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.
SBA: Reassigned to FL
Please find a new spec here: http://specs.openoffice.org/writer/compatibility/Compatability_Options.odt The new spec can be used for all newly introduced compatability options in the future. 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.
pb: fixed with new option text and default. Files changed: /officecfg/registry/schema/org/openoffice/Office/Compatibility.xcs 1.13.146.2 /officecfg/registry/data/org/openoffice/Office/Compatibility.xcu 1.8.344.2 /svtools/inc/svtools/compatibility.hxx 1.2.26.2 /svtools/source/config/compatibility.cxx 1.13.178.3 /sw/source/core/doc/docnew.cxx 1.73.28.3 /sw/source/ui/config/optcomp.hrc 1.8.786.2 /sw/source/ui/config/optcomp.src 1.12.72.3 /sw/source/ui/config/optcomp.cxx 1.12.56.2
pb -> sba: next try: please verify, thx. The first FeatureMail is invalid now, so please have a look here: https://so-web.germany.sun.com/EIS2/servlet/changesmails.EditFeature?ReadOnly=true&Id=3930 Spec here: http://specs.openoffice.org/writer/compatibility/Compatability_Options.odt
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.
Reassigned to PB.
pb: set default correctly now. /officecfg/registry/schema/org/openoffice/Office/Compatibility.xcs 1.13.146.3 /officecfg/registry/data/org/openoffice/Office/Compatibility.xcu 1.8.344.3 /scp2/source/ooo/file_ooo.scp 1.196.30.1
pb -> sba: next try. Please verify, thx.
SBA: Verified in CWS fwk66. Test Case written in TCS tool.
Created attachment 46525 [details] Test case for Compatibility option "Configuration Setting for Justified Text Behavior"
ok in OOo2.3rc2 -> closed