diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-11-17 10:39:42 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-11-17 10:39:42 +0100 |
commit | 8f7e5633b12802cd4a7f06ca27659f0983018786 (patch) | |
tree | 2c4acdde5ca811ff922a92cf70371013ef4c01ea /lingucomponent | |
parent | be59130fa477b6c5c7abbee121fdf9eb261b8312 (diff) |
Don't assume sal_Unicode is unsigned short
Change-Id: Ia93c541ea21be89578789d58f642109184a18685
Diffstat (limited to 'lingucomponent')
-rw-r--r-- | lingucomponent/source/spellcheck/macosxspell/macspellimp.mm | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm b/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm index 29b6b7414295..a73cebaf6710 100644 --- a/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm +++ b/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm @@ -236,11 +236,11 @@ sal_Int16 MacSpellChecker::GetSpellFailure( const OUString &rWord, const Locale { aEnc = 0; NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; - NSString* aNSStr = [[NSString alloc] initWithCharacters: nWord.getStr() length: nWord.getLength()]; - NSString* aLang = [[NSString alloc] initWithCharacters: rLocale.Language.getStr() length: rLocale.Language.getLength()]; + NSString* aNSStr = [[NSString alloc] initWithCharacters: reinterpret_cast<unichar const *>(nWord.getStr()) length: nWord.getLength()]; + NSString* aLang = [[NSString alloc] initWithCharacters: reinterpret_cast<unichar const *>(rLocale.Language.getStr()) length: rLocale.Language.getLength()]; if(rLocale.Country.getLength()>0) { - NSString* aCountry = [[NSString alloc] initWithCharacters: rLocale.Country.getStr() length: rLocale.Country.getLength()]; + NSString* aCountry = [[NSString alloc] initWithCharacters: reinterpret_cast<unichar const *>(rLocale.Country.getStr()) length: rLocale.Country.getLength()]; NSString* aTag = @"_"; NSString* aTaggedCountry = [aTag stringByAppendingString:aCountry]; [aLang autorelease]; @@ -339,11 +339,11 @@ Reference< XSpellAlternatives > if (n) { NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; - NSString* aNSStr = [[NSString alloc] initWithCharacters: nWord.getStr() length: nWord.getLength()]; - NSString* aLang = [[NSString alloc] initWithCharacters: rLocale.Language.getStr() length: rLocale.Language.getLength() ]; + NSString* aNSStr = [[NSString alloc] initWithCharacters: reinterpret_cast<unichar const *>(nWord.getStr()) length: nWord.getLength()]; + NSString* aLang = [[NSString alloc] initWithCharacters: reinterpret_cast<unichar const *>(rLocale.Language.getStr()) length: rLocale.Language.getLength() ]; if(rLocale.Country.getLength()>0) { - NSString* aCountry = [[NSString alloc] initWithCharacters: rLocale.Country.getStr() length: rLocale.Country.getLength() ]; + NSString* aCountry = [[NSString alloc] initWithCharacters: reinterpret_cast<unichar const *>(rLocale.Country.getStr()) length: rLocale.Country.getLength() ]; NSString* aTag = @"_"; NSString* aTaggedCountry = [aTag stringByAppendingString:aCountry]; [aLang autorelease]; |