Issue 92342 - Aqua: Hyphenation does not work
Summary: Aqua: Hyphenation does not work
Status: CLOSED FIXED
Alias: None
Product: Writer
Classification: Application
Component: code (show other issues)
Version: DEV300m28
Hardware: All Mac OS X, all
: P3 Trivial (vote)
Target Milestone: ---
Assignee: michael.ruess
QA Contact: issues@sw
URL:
Keywords: aqua, oooqa
: 89220 (view as issue list)
Depends on:
Blocks:
 
Reported: 2008-07-31 16:33 UTC by stefan.baltzer
Modified: 2013-08-07 14:43 UTC (History)
6 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description stefan.baltzer 2008-07-31 16:33:17 UTC
SBA->TL: As discussed, in DEV300m28 and m29, neither in Writer nor in Calc. 
To reproduce: 
 - New Writer doc
 - Insert dummy text
 - Tools-Language-Hyphenation
-> Dialog "Restart from the beginning?" comes up
- Click OK
-> Message box "Hyphenation completed" comes up

Expected: Dialog with hyphenation proposals.

Note: Format-Paragraph-Tab text flow -> Auto-Hyphenation has no effect either.
Spelling and Thesaurus work.
Comment 1 lohmaier 2008-07-31 16:37:32 UTC
can confirm on PPC (Tiger). Hyphenation works in 2.4.1 (X11 version)
Comment 2 lohmaier 2008-07-31 16:42:54 UTC
Seems to be an aqua-only problem. Works with DEV300_m23 (X11), doesn't work with
DEV300_m23 (aqua) - both on Mac OSX 10.4/PPC
Comment 3 stefan.baltzer 2008-07-31 16:54:47 UTC
SBA: Put msicotte on CC.
Comment 4 thomas.lange 2008-08-01 11:56:39 UTC
TL: As suggested adding Eric to cc.
Comment 5 thomas.lange 2008-08-01 14:00:56 UTC
TL: The first obvious thing is that no hyphenator is called at all.
Debugging further we reach i18npool's BreakIterator_Unicode::getLineBreak and
that function seems to be called with reasonable values.

But that function is never calling the hOptions.rHyphenator->hyphenate(...) as
it is supposed to do. The reason is that 
  line.aBreakIterator->isBoundary(nStartPos)
returns true and thus always the incorrect branch of the if-statement is called.
Maybe an ICU problem in the Aqua port?

Need to check first if the parameters I saw passed to that function under Aqua
look similar to the ones from a working version.
Comment 6 thomas.lange 2008-08-01 15:15:30 UTC
TL: It turns out the problem is not with the i18npool's breakiterator.
The breakiterator function gets called with incorrect arguments after all.

The reason for this is that in SwFont::GetTxtBreak the line 
  nTxtBreak = rInf.GetOut().GetTextBreak(...)
calls OutputDevice::GetTextBreak and that function returns incorrect values when
used in Aqua.
Comment 7 hdu@apache.org 2008-08-01 15:18:36 UTC
.
Comment 8 hdu@apache.org 2008-08-01 15:27:39 UTC
ATSUBreakLine() tries to be too smart... how to dumb it down to return the logical codepoint where the 
visual line break would happen?
Comment 9 hdu@apache.org 2008-08-01 16:08:16 UTC
reminder: why doesn't kATSLineBreakToNearestCharacter work as advertised? On OSX 10.5 ATSUBreakLine 
() only seems to do it (resulting in kATSULineBreakInWord) when a word exceeds the width of the whole 
line.
Comment 10 hdu@apache.org 2008-08-04 10:13:27 UTC
Fixed in CWS vcl30stop3: a fast ASTUI based emulation of a naive GetTextBreak() is not trivial
Comment 11 hdu@apache.org 2008-08-04 11:22:58 UTC
.
Comment 12 hdu@apache.org 2008-08-04 11:23:47 UTC
please verify in CWS vcl30stop3
Comment 13 michael.ruess 2008-08-05 09:17:35 UTC
Verified in CWS vcl30stop3.
Comment 14 michael.ruess 2008-08-14 10:26:45 UTC
Checked fix in OOO300m2.
Comment 15 hdu@apache.org 2009-01-08 09:13:46 UTC
*** Issue 89220 has been marked as a duplicate of this issue. ***