diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-11-17 10:38:13 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-11-17 10:38:13 +0100 |
commit | 0b8a21a33a3d751b885c964853f73afde18632e9 (patch) | |
tree | 5a6c4c8b39d591a8a89be7fb6a5c88f62507fc22 /i18npool/source/indexentry | |
parent | 1acbdc6bbda4021b40fa6d2da75f26e59a156d7f (diff) |
Don't assume sal_Unicode is unsigned short
Change-Id: I727951614587654c11af5f6635a45c52ebec1b5a
Diffstat (limited to 'i18npool/source/indexentry')
-rw-r--r-- | i18npool/source/indexentry/indexentrysupplier_asian.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/i18npool/source/indexentry/indexentrysupplier_asian.cxx b/i18npool/source/indexentry/indexentrysupplier_asian.cxx index 469a459d60a0..aaaee94d52a3 100644 --- a/i18npool/source/indexentry/indexentrysupplier_asian.cxx +++ b/i18npool/source/indexentry/indexentrysupplier_asian.cxx @@ -121,7 +121,10 @@ IndexEntrySupplier_asian::getIndexCharacter( const OUString& rIndexEntry, sal_uInt16 address=idx[0][ch >> 8]; if (address != 0xFFFF) { address=idx[1][address+(ch & 0xFF)]; - return idx[2] ? OUString(&idx[2][address]) : OUString(address); + return idx[2] + ? OUString( + reinterpret_cast<sal_Unicode *>(&idx[2][address])) + : OUString(sal_Unicode(address)); } } } @@ -190,7 +193,8 @@ IndexEntrySupplier_asian::getPhoneticCandidate( const OUString& rIndexEntry, if ( i > 0 && rLocale.Language == "zh" ) candidate.append(" "); if (idx[2]) - candidate.append(&idx[2][address]); + candidate.append( + reinterpret_cast<sal_Unicode *>(&idx[2][address])); else candidate.append(address); } else |