summaryrefslogtreecommitdiff
path: root/i18npool/source/breakiterator/xdictionary.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-09-10 16:38:07 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-09-10 16:39:48 +0100
commit997d1387abcfa40eca8d15a2fe025edc4a1de040 (patch)
tree95601c9237a45f718e5461b8aa777a92d4249422 /i18npool/source/breakiterator/xdictionary.cxx
parent019632c6628487189b8243c8a6ee99e878df2df3 (diff)
Revert "fdo#81272 Speed up break iterators"
hmm, make CppunitTest_i18npool_test_breakiterator fails after all This reverts commit 693f72384e081429cddb29415276cc4d07b05645.
Diffstat (limited to 'i18npool/source/breakiterator/xdictionary.cxx')
-rw-r--r--i18npool/source/breakiterator/xdictionary.cxx19
1 files changed, 0 insertions, 19 deletions
diff --git a/i18npool/source/breakiterator/xdictionary.cxx b/i18npool/source/breakiterator/xdictionary.cxx
index 95e1cc957f86..1067e33bcecc 100644
--- a/i18npool/source/breakiterator/xdictionary.cxx
+++ b/i18npool/source/breakiterator/xdictionary.cxx
@@ -271,21 +271,6 @@ bool xdictionary::seekSegment(const OUString &rText, sal_Int32 pos,
Boundary& segBoundary)
{
sal_Int32 indexUtf16;
-
- if (segmentCachedString.pData != rText.pData) {
- // Cache the passed text so we can avoid regenerating the segment if it's the same
- // (pData is refcounted and assigning the OUString references it, which ensures that
- // the object is the same if we get the same pointer back later)
- segmentCachedString = rText;
- } else {
- // If pos is within the cached boundary, use that boundary
- if (pos >= segmentCachedBoundary.startPos && pos <= segmentCachedBoundary.endPos) {
- indexUtf16 = segmentCachedBoundary.startPos;
- rText.iterateCodePoints(&indexUtf16, 1);
- return segmentCachedBoundary.endPos > indexUtf16;
- }
- }
-
segBoundary.endPos = segBoundary.startPos = pos;
indexUtf16 = pos;
@@ -308,10 +293,6 @@ bool xdictionary::seekSegment(const OUString &rText, sal_Int32 pos,
break;
}
- // Cache the calculated boundary
- segmentCachedBoundary.startPos = segBoundary.startPos;
- segmentCachedBoundary.endPos = segBoundary.endPos;
-
indexUtf16 = segBoundary.startPos;
rText.iterateCodePoints(&indexUtf16, 1);
return segBoundary.endPos > indexUtf16;