diff options
author | Noel Grandin <noel@peralex.com> | 2015-04-08 11:28:10 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-04-08 11:40:15 +0200 |
commit | 79b2059fa8e3c69088532f0ce521a285af5455cf (patch) | |
tree | ecce1ea865e24b4657b0aa424b10cb78928d1256 /linguistic/source | |
parent | 704edbf7dc844e52404bf52f9d5dc768cfd024d0 (diff) |
convert CapType to scoped enum
Change-Id: I88fa3672a1f933ae818368c9bc400c6a845babb6
Diffstat (limited to 'linguistic/source')
-rw-r--r-- | linguistic/source/misc.cxx | 10 | ||||
-rw-r--r-- | linguistic/source/spelldsp.cxx | 12 |
2 files changed, 11 insertions, 11 deletions
diff --git a/linguistic/source/misc.cxx b/linguistic/source/misc.cxx index 0903a35fda51..bd1bdc8f228d 100644 --- a/linguistic/source/misc.cxx +++ b/linguistic/source/misc.cxx @@ -622,16 +622,16 @@ CapType SAL_CALL capitalType(const OUString& aTerm, CharClass * pCC) } if (nc == 0) - return CAPTYPE_NOCAP; + return CapType::NOCAP; if (nc == tlen) - return CAPTYPE_ALLCAP; + return CapType::ALLCAP; if ((nc == 1) && (pCC->getCharacterType(aStr,0) & ::com::sun::star::i18n::KCharacterType::UPPER)) - return CAPTYPE_INITCAP; + return CapType::INITCAP; - return CAPTYPE_MIXED; + return CapType::MIXED; } - return CAPTYPE_UNKNOWN; + return CapType::UNKNOWN; } OUString ToLower( const OUString &rText, sal_Int16 nLanguage ) diff --git a/linguistic/source/spelldsp.cxx b/linguistic/source/spelldsp.cxx index c3b3282a599b..89d4190253c6 100644 --- a/linguistic/source/spelldsp.cxx +++ b/linguistic/source/spelldsp.cxx @@ -428,8 +428,8 @@ bool SpellCheckerDispatcher::isValid_Impl( bRes = !xTmp->isNegative(); } else { setCharClass(LanguageTag(nLanguage)); - sal_uInt16 ct = capitalType(aChkWord, pCharClass); - if (ct == CAPTYPE_INITCAP || ct == CAPTYPE_ALLCAP) { + CapType ct = capitalType(aChkWord, pCharClass); + if (ct == CapType::INITCAP || ct == CapType::ALLCAP) { Reference< XDictionaryEntry > xTmp2( lcl_GetRulingDictionaryEntry( makeLowerCase(aChkWord, pCharClass), nLanguage ) ); if (xTmp2.is()) { bRes = !xTmp2->isNegative(); @@ -672,8 +672,8 @@ Reference< XSpellAlternatives > SpellCheckerDispatcher::spell_Impl( else { setCharClass(LanguageTag(nLanguage)); - sal_uInt16 ct = capitalType(aChkWord, pCharClass); - if (ct == CAPTYPE_INITCAP || ct == CAPTYPE_ALLCAP) + CapType ct = capitalType(aChkWord, pCharClass); + if (ct == CapType::INITCAP || ct == CapType::ALLCAP) { Reference< XDictionaryEntry > xTmp2( lcl_GetRulingDictionaryEntry( makeLowerCase(aChkWord, pCharClass), nLanguage ) ); if (xTmp2.is()) @@ -691,10 +691,10 @@ Reference< XSpellAlternatives > SpellCheckerDispatcher::spell_Impl( { switch ( ct ) { - case CAPTYPE_INITCAP: + case CapType::INITCAP: aProposalList.Prepend( pCharClass->titlecase(aAddRplcTxt) ); break; - case CAPTYPE_ALLCAP: + case CapType::ALLCAP: aProposalList.Prepend( pCharClass->uppercase(aAddRplcTxt) ); break; default: |