summaryrefslogtreecommitdiff
path: root/i18npool/source/search
diff options
context:
space:
mode:
Diffstat (limited to 'i18npool/source/search')
-rw-r--r--i18npool/source/search/textsearch.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/i18npool/source/search/textsearch.cxx b/i18npool/source/search/textsearch.cxx
index ef8217b9726a..98aa1b6cc3f2 100644
--- a/i18npool/source/search/textsearch.cxx
+++ b/i18npool/source/search/textsearch.cxx
@@ -614,7 +614,7 @@ SearchResult TextSearch::NSrchFrwrd( const OUString& searchStr, sal_Int32 startP
bool bAtStart = !nCmpIdx;
bool bAtEnd = nFndEnd == endPos;
bool bDelimBefore = bAtStart || IsDelimiter( aStr, nCmpIdx-1 );
- bool bDelimBehind = IsDelimiter( aStr, nFndEnd );
+ bool bDelimBehind = bAtEnd || IsDelimiter( aStr, nFndEnd );
// * 1 -> only one word in the paragraph
// * 2 -> at begin of paragraph
// * 3 -> at end of paragraph
@@ -685,7 +685,7 @@ SearchResult TextSearch::NSrchBkwrd( const OUString& searchStr, sal_Int32 startP
sal_Int32 nFndStt = nCmpIdx - sSearchKey.getLength();
bool bAtStart = !nFndStt;
bool bAtEnd = nCmpIdx == startPos;
- bool bDelimBehind = IsDelimiter( aStr, nCmpIdx );
+ bool bDelimBehind = bAtEnd || IsDelimiter( aStr, nCmpIdx );
bool bDelimBefore = bAtStart || // begin of paragraph
IsDelimiter( aStr, nFndStt-1 );
// * 1 -> only one word in the paragraph