summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/linguistic/misc.hxx12
-rw-r--r--lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx6
-rw-r--r--lingucomponent/source/thesaurus/libnth/nthesimp.cxx10
-rw-r--r--linguistic/source/misc.cxx10
-rw-r--r--linguistic/source/spelldsp.cxx12
5 files changed, 25 insertions, 25 deletions
diff --git a/include/linguistic/misc.hxx b/include/linguistic/misc.hxx
index 2e0b7ff8e725..56e7cb2fb6d8 100644
--- a/include/linguistic/misc.hxx
+++ b/include/linguistic/misc.hxx
@@ -69,13 +69,13 @@ enum class DictionaryError
};
// values asigned to capitalization types
-enum CapType
+enum class CapType
{
- CAPTYPE_UNKNOWN,
- CAPTYPE_NOCAP,
- CAPTYPE_INITCAP,
- CAPTYPE_ALLCAP,
- CAPTYPE_MIXED
+ UNKNOWN,
+ NOCAP,
+ INITCAP,
+ ALLCAP,
+ MIXED
};
LNG_DLLPUBLIC ::osl::Mutex& GetLinguMutex();
diff --git a/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx b/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx
index d561fd00412e..435e9fbfad06 100644
--- a/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx
+++ b/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx
@@ -319,7 +319,7 @@ Reference< XHyphenatedWord > SAL_CALL Hyphenator::hyphenate( const OUString& aWo
if (eEnc == RTL_TEXTENCODING_DONTKNOW)
return NULL;
- sal_uInt16 ct = capitalType(aWord, pCC);
+ CapType ct = capitalType(aWord, pCC);
// first convert any smart quotes or apostrophes to normal ones
OUStringBuffer rBuf(aWord);
@@ -444,12 +444,12 @@ Reference< XHyphenatedWord > SAL_CALL Hyphenator::hyphenate( const OUString& aWo
OUString repHyph;
switch (ct)
{
- case CAPTYPE_ALLCAP:
+ case CapType::ALLCAP:
{
repHyph = makeUpperCase(repHyphlow, pCC);
break;
}
- case CAPTYPE_INITCAP:
+ case CapType::INITCAP:
{
if (nHyphenationPosAlt == -1)
repHyph = makeInitCap(repHyphlow, pCC);
diff --git a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
index 7ab514cfa3e3..6eab10c50978 100644
--- a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
+++ b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
@@ -285,7 +285,7 @@ Sequence < Reference < ::com::sun::star::linguistic2::XMeaning > > SAL_CALL Thes
OUString rTerm(qTerm);
OUString pTerm(qTerm);
- sal_uInt16 ct = CAPTYPE_UNKNOWN;
+ CapType ct = CapType::UNKNOWN;
sal_Int32 stem = 0;
sal_Int32 stem2 = 0;
@@ -424,16 +424,16 @@ Sequence < Reference < ::com::sun::star::linguistic2::XMeaning > > SAL_CALL Thes
}
}
- sal_uInt16 ct1 = capitalType(sTerm, pCC);
- if (CAPTYPE_MIXED == ct1)
+ CapType ct1 = capitalType(sTerm, pCC);
+ if (CapType::MIXED == ct1)
ct = ct1;
OUString cTerm;
switch (ct)
{
- case CAPTYPE_ALLCAP:
+ case CapType::ALLCAP:
cTerm = makeUpperCase(sTerm, pCC);
break;
- case CAPTYPE_INITCAP:
+ case CapType::INITCAP:
cTerm = makeInitCap(sTerm, pCC);
break;
default:
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: