diff options
Diffstat (limited to 'lingucomponent')
-rw-r--r-- | lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx | 23 | ||||
-rw-r--r-- | lingucomponent/source/hyphenator/altlinuxhyph/hyphen/makefile.mk | 10 |
2 files changed, 20 insertions, 13 deletions
diff --git a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx index 0d2f8112fc2a..5e912e7b962b 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.2 $ + * $Revision: 1.3 $ * - * last change: $Author: nidd $ $Date: 2002-02-28 15:44:10 $ + * last change: $Author: nidd $ $Date: 2002-05-09 17:36:02 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -185,10 +185,12 @@ Sequence< Locale > SAL_CALL Hyphenator::getLocales() if (!aSuppLocales.getLength()) { - aSuppLocales.realloc( 2 ); + aSuppLocales.realloc( 4 ); Locale *pLocale = aSuppLocales.getArray(); pLocale[0] = Locale( A2OU("en"), A2OU("US"), OUString() ); pLocale[1] = Locale( A2OU("ru"), A2OU("RU"), OUString() ); + pLocale[2] = Locale( A2OU("de"), A2OU("DE"), OUString() ); + pLocale[3] = Locale( A2OU("da"), A2OU("DK"), OUString() ); } @@ -272,7 +274,6 @@ Hyphenator::hyphenate( const ::rtl::OUString& aWord, rtl_TextEncoding DictionaryEnc = L2TE( LocaleToLanguage( aLocale ) ); - // chclass.toLower(aWord); encWord = OUStringToOString (aWord, DictionaryEnc); @@ -304,7 +305,7 @@ Hyphenator::hyphenate( const ::rtl::OUString& aWord, else { xRes = new HyphenatedWord( aWord, LocaleToLanguage( aLocale ), nHyphenationPos, - hyphenatedWord.makeStringAndClear(), nHyphenationPos ); + aWord, nHyphenationPos ); } delete hyphens; @@ -380,13 +381,19 @@ Reference< XPossibleHyphens > SAL_CALL return NULL; } - Sequence< INT16 > aHyphPos( encWord.getLength()); + INT16 nHyphCount = 0; + + for (INT16 i = 0; i < encWord.getLength(); i++) + if (hyphens[i]&1) + nHyphCount++; + + Sequence< INT16 > aHyphPos(nHyphCount); INT16 *pPos = aHyphPos.getArray(); OUStringBuffer hyphenatedWordBuffer; OUString hyphenatedWord; - INT16 nHyphCount = 0; + nHyphCount = 0; - for (INT16 i = 0; i < encWord.getLength(); i++) + for (i = 0; i < encWord.getLength(); i++) { hyphenatedWordBuffer.append(aWord[i]); if (hyphens[i]&1) diff --git a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/makefile.mk b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/makefile.mk index 8f470ce6959a..336cafd0cb3c 100644 --- a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/makefile.mk +++ b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/makefile.mk @@ -2,9 +2,9 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.2 $ +# $Revision: 1.3 $ # -# last change: $Author: nidd $ $Date: 2001-12-25 08:48:43 $ +# last change: $Author: nidd $ $Date: 2002-05-09 17:36:02 $ # # The Contents of this file are made available subject to the terms of # either of the following licenses @@ -109,9 +109,9 @@ UNOTYPES=\ com.sun.star.linguistic2.XSupportedLocales\ com.sun.star.linguistic2.XThesaurus -CXXFLAGS += -I../libhnj -Wall -CFLAGSCXX += -I../libhnj -Wall -CFLAGSCC += -I../libhnj -Wall +CXXFLAGS += -I../libhnj +CFLAGSCXX += -I../libhnj +CFLAGSCC += -I../libhnj .IF "$(header)" == "" |