diff options
author | Kurt Zenker <kz@openoffice.org> | 2004-07-30 13:37:54 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2004-07-30 13:37:54 +0000 |
commit | 2887ecb5554eee699e1dce4ffbc2dfcf71a54a41 (patch) | |
tree | c67c01d6474775c9a4530d44e718fd4f01cfd677 /i18npool | |
parent | 138fad3972a34309f1d578dcfcac6169bd965979 (diff) |
INTEGRATION: CWS i18n13 (1.15.18); FILE MERGED
2004/06/17 20:29:38 khong 1.15.18.2: #
2004/06/02 04:54:24 khong 1.15.18.1: #i11993# fix getWordBoundary problem when position is on the end of the word.
Diffstat (limited to 'i18npool')
-rw-r--r-- | i18npool/source/breakiterator/breakiteratorImpl.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/i18npool/source/breakiterator/breakiteratorImpl.cxx b/i18npool/source/breakiterator/breakiteratorImpl.cxx index 0dae28363a4f..ada03cf44113 100644 --- a/i18npool/source/breakiterator/breakiteratorImpl.cxx +++ b/i18npool/source/breakiterator/breakiteratorImpl.cxx @@ -2,9 +2,9 @@ * * $RCSfile: breakiteratorImpl.cxx,v $ * - * $Revision: 1.15 $ + * $Revision: 1.16 $ * - * last change: $Author: obo $ $Date: 2004-03-17 09:02:01 $ + * last change: $Author: kz $ $Date: 2004-07-30 14:37:54 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -209,6 +209,8 @@ Boundary SAL_CALL BreakIteratorImpl::getWordBoundary( const OUString& Text, sal_ if (next != prev) { if (next == nPos && next != len) bDirection = sal_True; + else if (prev == nPos && prev != 0) + bDirection = sal_False; else nPos = bDirection ? next : prev; } @@ -253,7 +255,7 @@ sal_Bool SAL_CALL BreakIteratorImpl::isEndWord( const OUString& Text, sal_Int32 sal_Int32 SAL_CALL BreakIteratorImpl::beginOfSentence( const OUString& Text, sal_Int32 nStartPos, const Locale &rLocale ) throw(RuntimeException) { - if (nStartPos < 0 || nStartPos >= Text.getLength()) + if (nStartPos < 0 || nStartPos > Text.getLength()) return -1; return LBI->beginOfSentence(Text, nStartPos, rLocale); } @@ -261,7 +263,7 @@ sal_Int32 SAL_CALL BreakIteratorImpl::beginOfSentence( const OUString& Text, sal sal_Int32 SAL_CALL BreakIteratorImpl::endOfSentence( const OUString& Text, sal_Int32 nStartPos, const Locale &rLocale ) throw(RuntimeException) { - if (nStartPos < 0 || nStartPos >= Text.getLength()) + if (nStartPos < 0 || nStartPos > Text.getLength()) return -1; return LBI->endOfSentence(Text, nStartPos, rLocale); } |