summaryrefslogtreecommitdiff
path: root/lingucomponent
diff options
context:
space:
mode:
authorHans-Joachim Lankenau <hjs@openoffice.org>2003-08-18 13:34:53 +0000
committerHans-Joachim Lankenau <hjs@openoffice.org>2003-08-18 13:34:53 +0000
commit529f97d02e1c90f2cc3f5cec054701af5564de99 (patch)
tree8d2298f13dc2863552da382c431a051afc6e8c9a /lingucomponent
parent92236b476c2761386f9fa069b037b1064af8b827 (diff)
INTEGRATION: CWS geordi2q01 (1.9.16); FILE MERGED
2003/08/18 12:58:42 hr 1.9.16.1: #i18350#: join changes from CWS ooo11rc3
Diffstat (limited to 'lingucomponent')
-rw-r--r--lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx17
1 files changed, 13 insertions, 4 deletions
diff --git a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx
index 03d39f57b44d..ca0878ef1344 100644
--- a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx
+++ b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: hyphenimp.cxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: vg $ $Date: 2003-06-12 10:35:34 $
+ * last change: $Author: hjs $ $Date: 2003-08-18 14:34:53 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -349,6 +349,11 @@ Hyphenator::hyphenate( const ::rtl::OUString& aWord,
char *lcword;
int k = 0;
+ PropertyHelper_Hyphen & rHelper = GetPropHelper();
+ //rHelper.SetTmpPropVals(aProperties);
+ sal_Int16 minTrail = rHelper.GetMinTrailing();
+ sal_Int16 minLead = rHelper.GetMinLeading();
+ sal_Int16 minLen = rHelper.GetMinWordLength();
HyphenDict *dict = NULL;
rtl_TextEncoding aEnc = 0;
@@ -427,7 +432,11 @@ Hyphenator::hyphenate( const ::rtl::OUString& aWord,
for (INT32 i = 0; i < encWord.getLength(); i++)
{
hyphenatedWordBuffer.append(aWord[i]);
- if ((hyphens[i]&1) && (i < Leading))
+ BOOL hit = (wordlen >= minLen);
+ hit = hit && (hyphens[i]&1) && (i < Leading);
+ hit = hit && (i >= (minLead-1) );
+ hit = hit && ((wordlen - i - 1) >= minTrail);
+ if (hit)
{
nHyphenationPos = i;
hyphenatedWordBuffer.append(sal_Unicode('='));
@@ -497,7 +506,7 @@ Reference< XPossibleHyphens > SAL_CALL
dict = NULL;
aEnc = 0;
- // if we have a hyphenationd citionary matching this locale
+ // if we have a hyphenation dictionary matching this locale
if (k != -1) {
// if this dictioanry has not been loaded yet do that