Apache OpenOffice (AOO) Bugzilla – Issue 83229
wrong line break when word does contain a hyphen
Last modified: 2013-08-07 14:43:03 UTC
A thesis saved in 2.2.1 had several charts with x-axis data 0-99, 100-199, 200- 299, & so on for 16 in all. They displayed in 2.2.1 as 100- 199 but in 2.3 wrongly wrapped 100-19 9 I did not bother to save in 2.3, but instead reverted to 2.2.1. Please email for an image of the fault in operation if necessary.
Created attachment 49370 [details] Writer bug displaying chart x-axis data
Created attachment 49379 [details] Sample document
MRU->IHA: see attached sample, this shows the mentioned problem when opening in OO 2.3.x. The x-axis labels have wrong break.
changed target due to limited resources
changed component
This is not a chart specific bug. Instead the hyphenation seems to be broken office wide. The minus sign is not recognized as a preferred place to break words anymore. ->Karl, please take over as you are the hyphenation expert. I'll attach examples showing the same hyphenation problem in a writer table.
Created attachment 53106 [details] wrong hyphenation in writer
Created attachment 53107 [details] example screenshot showing problem
Created attachment 53108 [details] example screenshot showing correct behavior in OOo 2.2
This is intended behaviour, see issue i80841 for detail, it requires not to break line on hyphenation. Checking with MS office, it has different line break behaviour between Word and Excel. Hyphenation is not line break point for Word, but it is for Excel. We may need different line break iterators for Writer and other applications, if we want to match to MS office.
I'm confused. Ingrid complains about not using "-" as a line break. Issue 80841 is about hyphens. Even if I assume that "-" and hyphens are treated equally I read issue 80841 as a fix that exactly implemented what Ingrid is asking for and what - following your words - is what we don't want to have in Writer. Perhaps I'm reading the comments in issue 80841 wrongly as they are quite scarcely.
We only have one symbol or sign "-", it is hyphen and minus sign. Writer does not want hyphen to be break to 2 lines for "toll-free", Calc wants to break "123-234" to 2 lines after "-" if whole string could not be fitted in 1 line. It is easy to observe it on Word and Excel, type "111111-111111111...." in Word, you see it breaks in the margin, type same string in a cell for Excel, it break on "-". We do same thing for Writer and Calc, breaking on margin.
mha: sorry, I confused you. Yes you are right, the issue 80841 asked to break line on hyphen, and it does break on hyphen for both Writer and Calc. Here the issue is number. Default behaviour from ICU is to treat "-" as minus sign when it appears in the front of a number, and should not be a line break point. I can fix it, but Writer will not behave the same as MS Word.
fixed in cws i18n41.
ready for QA.
khong: can you explain what you have fixed and how this matches your comments in this issue and in issue 80841 that - for me - are contradicting.
khong: seems that my mail notifications arrive with large delays so I overlooked your last comment. For Writer it's important that we do line breaks in the same way as Word if possible. If work doesn't break at a "minus" sign we shouldn't do it also (and IMHO this is better BTW, breaking at the "minus" looks ugly). If that means that Calc/Draw/Chart have a problem we perhaps should make that configurable. Or we could declare the behavior in 2.2 as buggy and say that Chart does it right in 2.3. :-)
SBA->Karl/MBA: I just spoke to MBA. The current fix has a massive regression within Writer. Two examples: (1) A string like "Balance in EURO is -10,50" will break behind the first "-". The result is: "Balance in EURO is - 10,50" (2) A string like "Freizeitsport, -verhalten und -kosten" will put "-kosten" into the next line, but if you continue to shift the string (by adding "iiii" in front of it), then the hyphen jumps back tu the first line The workaround would be to use the formatting character "non-breaking hyphen" in front of numbers and words. This is not acceptable. We must discuss another solution (i.e. NOT breaking at leading minus by always treating it as a "nonbreaking hyphen", automatically or configurable). Issue reopened. Lets discuss with MBA what to do.
I just noted that the example (2) with the "leading hyphen jumping back up" is the same in Master. However, I will add an attachment showing some problematic strings.
Created attachment 54400 [details] Sample document with "problematic" line break examples
Reassigned to Karl.
SBA-> Karl: As discussed via mail, I wrote issue 90839 for "Case (2)" from my comment of June 11th.
Fixed first case. Send it back to QA for testing.
I have just noticed that Openoffice.org 2.4 and 2.4.1 both fix the issue for my report, so I have updated to 2.4.1. I am gratified that my problem prompted further evaluation and development. I would love to see whether the new fixes being proposed affect it negatively. I could also have simply inserted spaces in the appropriate places in the document to force a break.
SBA: Verified in CWS i18n41.
SBA: Set to verified.
SBA: Re-verified in OOO300_m4. Closed. Adjusted summary (replace "hyphenation" with "line break") to ease future queries.