Issue 83229 - wrong line break when word does contain a hyphen
Summary: wrong line break when word does contain a hyphen
Status: CLOSED FIXED
Alias: None
Product: Writer
Classification: Application
Component: ui (show other issues)
Version: OOo 2.3
Hardware: PC Windows XP
: P3 Trivial (vote)
Target Milestone: ---
Assignee: stefan.baltzer
QA Contact: issues@sw
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2007-11-02 04:51 UTC by sdhlvs
Modified: 2013-08-07 14:43 UTC (History)
4 users (show)

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


Attachments
Writer bug displaying chart x-axis data (10.19 KB, image/jpeg)
2007-11-02 04:53 UTC, sdhlvs
no flags Details
Sample document (11.79 KB, application/vnd.oasis.opendocument.text)
2007-11-02 13:46 UTC, michael.ruess
no flags Details
wrong hyphenation in writer (12.67 KB, application/vnd.oasis.opendocument.text)
2008-04-22 09:41 UTC, IngridvdM
no flags Details
example screenshot showing problem (20.15 KB, image/jpeg)
2008-04-22 09:42 UTC, IngridvdM
no flags Details
example screenshot showing correct behavior in OOo 2.2 (19.09 KB, image/jpeg)
2008-04-22 09:43 UTC, IngridvdM
no flags Details
Sample document with "problematic" line break examples (8.65 KB, application/vnd.oasis.opendocument.text)
2008-06-11 14:08 UTC, stefan.baltzer
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description sdhlvs 2007-11-02 04:51:44 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.
Comment 1 sdhlvs 2007-11-02 04:53:25 UTC
Created attachment 49370 [details]
Writer bug displaying chart x-axis data
Comment 2 michael.ruess 2007-11-02 13:46:41 UTC
Created attachment 49379 [details]
Sample document
Comment 3 michael.ruess 2007-11-02 13:49:37 UTC
MRU->IHA: see attached sample, this shows the mentioned problem when opening in
OO 2.3.x. The x-axis labels have wrong break.
Comment 4 IngridvdM 2008-01-16 14:02:09 UTC
changed target due to limited resources
Comment 5 Mathias_Bauer 2008-04-21 16:27:08 UTC
changed component
Comment 6 IngridvdM 2008-04-22 09:38:19 UTC
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.
Comment 7 IngridvdM 2008-04-22 09:41:02 UTC
Created attachment 53106 [details]
wrong hyphenation in writer
Comment 8 IngridvdM 2008-04-22 09:42:34 UTC
Created attachment 53107 [details]
example screenshot showing problem
Comment 9 IngridvdM 2008-04-22 09:43:32 UTC
Created attachment 53108 [details]
example screenshot showing correct behavior in OOo 2.2
Comment 10 karl.hong 2008-04-22 22:17:03 UTC
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.
Comment 11 Mathias_Bauer 2008-04-22 22:38:40 UTC
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.
Comment 12 karl.hong 2008-04-22 23:39:45 UTC
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.
Comment 13 karl.hong 2008-04-23 00:52:06 UTC
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.
Comment 14 karl.hong 2008-04-23 01:48:23 UTC
fixed in cws i18n41.
Comment 15 karl.hong 2008-04-24 07:06:32 UTC
ready for QA.
Comment 16 Mathias_Bauer 2008-04-24 10:56:15 UTC
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.
Comment 17 Mathias_Bauer 2008-04-24 18:20:59 UTC
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. :-)
Comment 18 stefan.baltzer 2008-06-11 13:42:00 UTC
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.
Comment 19 stefan.baltzer 2008-06-11 13:57:27 UTC
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.
Comment 20 stefan.baltzer 2008-06-11 14:08:44 UTC
Created attachment 54400 [details]
Sample document with "problematic" line break examples
Comment 21 stefan.baltzer 2008-06-11 15:32:19 UTC
Reassigned to Karl.
Comment 22 stefan.baltzer 2008-06-18 11:25:57 UTC
SBA-> Karl: As discussed via mail, I wrote issue 90839 for "Case (2)" from my
comment of June 11th.
Comment 23 karl.hong 2008-06-18 22:45:53 UTC
Fixed first case.

Send it back to QA for testing.
Comment 24 sdhlvs 2008-06-25 04:44:26 UTC
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.

Comment 25 stefan.baltzer 2008-06-25 16:58:03 UTC
SBA: Verified in CWS i18n41.
Comment 26 stefan.baltzer 2008-06-25 16:58:54 UTC
SBA: Set to verified.
Comment 27 stefan.baltzer 2008-09-01 13:22:17 UTC
SBA: Re-verified in OOO300_m4. Closed. 
Adjusted summary (replace "hyphenation" with "line break") to ease future queries.