summaryrefslogtreecommitdiff
path: root/i18npool/inc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-05-02 09:18:26 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-05-02 11:20:32 +0100
commit6f0503c82c0a019678458ded9e339a71f96d837d (patch)
tree251162c3778839c6441978d241ef853b30bd3cae /i18npool/inc
parentbdbc1328a31da9b86a7e4862ae12a079310f38d2 (diff)
Related: fdo#49208 use UText adaptor to underlying rtl::OUString
Don't convert to icu UnicodeString, retain text as shallow-copy of original via rtl::OUString and use UText adaptor. Allows use of equals to do super fast compare that new string is the same as the old string Change-Id: Ie9a3dc981b22a6866f3712c786331a1d6fcf153a
Diffstat (limited to 'i18npool/inc')
-rw-r--r--i18npool/inc/breakiterator_unicode.hxx17
1 files changed, 14 insertions, 3 deletions
diff --git a/i18npool/inc/breakiterator_unicode.hxx b/i18npool/inc/breakiterator_unicode.hxx
index 57e0aadc7fc4..a9273f14b24e 100644
--- a/i18npool/inc/breakiterator_unicode.hxx
+++ b/i18npool/inc/breakiterator_unicode.hxx
@@ -84,11 +84,22 @@ protected:
const sal_Char *cBreakIterator, *wordRule, *lineRule;
Boundary result; // for word break iterator
- struct BI_Data {
- UnicodeString aICUText;
+ struct BI_Data
+ {
+ rtl::OUString aICUText;
+ UText *ut;
icu::BreakIterator *aBreakIterator;
- BI_Data() : aICUText(), aBreakIterator(NULL) {}
+ BI_Data()
+ : ut(NULL)
+ , aBreakIterator(NULL)
+ {
+ }
+ ~BI_Data()
+ {
+ utext_close(ut);
+ }
+
} character, word, sentence, line, *icuBI;
com::sun::star::lang::Locale aLocale;