diff options
author | Thomas Lange <tl@openoffice.org> | 2001-08-10 09:30:31 +0000 |
---|---|---|
committer | Thomas Lange <tl@openoffice.org> | 2001-08-10 09:30:31 +0000 |
commit | 13e04bbcc5f93f0a3167ea7bb94017f0e0feffe3 (patch) | |
tree | 42b1286bfc31a8f870d2bc945e6d381758451fed /linguistic | |
parent | d004a57aa1962426e0fa4f2039a7504f8e9324b1 (diff) |
#90775# hyphenator dispatcher now returns a result for soft-hyphens encountered in valid hyphenation positions
Diffstat (limited to 'linguistic')
-rw-r--r-- | linguistic/source/hyphdsp.cxx | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/linguistic/source/hyphdsp.cxx b/linguistic/source/hyphdsp.cxx index 69a61ae61373..4e7e2673621d 100644 --- a/linguistic/source/hyphdsp.cxx +++ b/linguistic/source/hyphdsp.cxx @@ -2,9 +2,9 @@ * * $RCSfile: hyphdsp.cxx,v $ * - * $Revision: 1.10 $ + * $Revision: 1.11 $ * - * last change: $Author: tl $ $Date: 2001-07-04 13:27:09 $ + * last change: $Author: tl $ $Date: 2001-08-10 10:30:31 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -319,9 +319,16 @@ Reference< XHyphenatedWord > SAL_CALL { // allow only hyphenation positions to the left of the // first soft-hyphen - INT32 nFistSoftHyphenPos = rWord.indexOf( SVT_SOFT_HYPHEN ); - if (nFistSoftHyphenPos >= 0 && nFistSoftHyphenPos <= nMaxLeading) + INT32 nFirstSoftHyphenPos = rWord.indexOf( SVT_SOFT_HYPHEN ); + if (nFirstSoftHyphenPos >= 0 && nFirstSoftHyphenPos <= nMaxLeading) + { + INT16 nP = nFirstSoftHyphenPos - 1; + DBG_ASSERT( nP > 0, "unexpected soft-hyphen pos" ); + xRes = queryAlternativeSpelling( rWord, rLocale, nP, rProperties ); + if (!xRes.is()) + xRes = new HyphenatedWord( rWord, nLanguage, nP, rWord, nP ); return xRes; + } OUString aChkWord( rWord ); bWordModified |= RemoveHyphens( aChkWord ); |