linguistic: Use appropriate OUString functions on string constants

Change-Id: I76ee3a435ac7a49308db497306b5a9404f3c3ba0
This commit is contained in:
Stephan Bergmann
2014-12-12 12:21:08 +01:00
parent e512e19eec
commit fe20b3d943

View File

@@ -1567,22 +1567,22 @@ uno::Sequence< OUString > SAL_CALL
uno::Sequence< OUString > aRes; uno::Sequence< OUString > aRes;
const SvcInfoArray *pInfoArray = 0; const SvcInfoArray *pInfoArray = 0;
if (rServiceName.equalsAscii( SN_SPELLCHECKER )) if (rServiceName == SN_SPELLCHECKER)
{ {
GetAvailableSpellSvcs_Impl(); GetAvailableSpellSvcs_Impl();
pInfoArray = pAvailSpellSvcs; pInfoArray = pAvailSpellSvcs;
} }
else if (rServiceName.equalsAscii( SN_GRAMMARCHECKER )) else if (rServiceName == SN_GRAMMARCHECKER)
{ {
GetAvailableGrammarSvcs_Impl(); GetAvailableGrammarSvcs_Impl();
pInfoArray = pAvailGrammarSvcs; pInfoArray = pAvailGrammarSvcs;
} }
else if (rServiceName.equalsAscii( SN_HYPHENATOR )) else if (rServiceName == SN_HYPHENATOR)
{ {
GetAvailableHyphSvcs_Impl(); GetAvailableHyphSvcs_Impl();
pInfoArray = pAvailHyphSvcs; pInfoArray = pAvailHyphSvcs;
} }
else if (rServiceName.equalsAscii( SN_THESAURUS )) else if (rServiceName == SN_THESAURUS)
{ {
GetAvailableThesSvcs_Impl(); GetAvailableThesSvcs_Impl();
pInfoArray = pAvailThesSvcs; pInfoArray = pAvailThesSvcs;
@@ -1626,13 +1626,13 @@ uno::Sequence< lang::Locale > SAL_CALL
uno::Sequence< lang::Locale > aRes; uno::Sequence< lang::Locale > aRes;
uno::Sequence< lang::Locale > *pAvailLocales = NULL; uno::Sequence< lang::Locale > *pAvailLocales = NULL;
if (rServiceName.equalsAscii( SN_SPELLCHECKER )) if (rServiceName == SN_SPELLCHECKER)
pAvailLocales = &aAvailSpellLocales; pAvailLocales = &aAvailSpellLocales;
else if (rServiceName.equalsAscii( SN_GRAMMARCHECKER )) else if (rServiceName == SN_GRAMMARCHECKER)
pAvailLocales = &aAvailGrammarLocales; pAvailLocales = &aAvailGrammarLocales;
else if (rServiceName.equalsAscii( SN_HYPHENATOR )) else if (rServiceName == SN_HYPHENATOR)
pAvailLocales = &aAvailHyphLocales; pAvailLocales = &aAvailHyphLocales;
else if (rServiceName.equalsAscii( SN_THESAURUS )) else if (rServiceName == SN_THESAURUS)
pAvailLocales = &aAvailThesLocales; pAvailLocales = &aAvailThesLocales;
// Nowadays (with OOo lingu in SO) we want to know immediately about // Nowadays (with OOo lingu in SO) we want to know immediately about
@@ -1686,7 +1686,7 @@ void SAL_CALL
LanguageType nLanguage = LinguLocaleToLanguage( rLocale ); LanguageType nLanguage = LinguLocaleToLanguage( rLocale );
if (!LinguIsUnspecified( nLanguage)) if (!LinguIsUnspecified( nLanguage))
{ {
if (rServiceName.equalsAscii( SN_SPELLCHECKER )) if (rServiceName == SN_SPELLCHECKER)
{ {
if (!xSpellDsp.is()) if (!xSpellDsp.is())
GetSpellCheckerDsp_Impl(); GetSpellCheckerDsp_Impl();
@@ -1703,7 +1703,7 @@ void SAL_CALL
linguistic2::LinguServiceEventFlags::SPELL_WRONG_WORDS_AGAIN ); linguistic2::LinguServiceEventFlags::SPELL_WRONG_WORDS_AGAIN );
} }
} }
else if (rServiceName.equalsAscii( SN_GRAMMARCHECKER )) else if (rServiceName == SN_GRAMMARCHECKER)
{ {
if (!xGrammarDsp.is()) if (!xGrammarDsp.is())
GetGrammarCheckerDsp_Impl(); GetGrammarCheckerDsp_Impl();
@@ -1719,7 +1719,7 @@ void SAL_CALL
linguistic2::LinguServiceEventFlags::PROOFREAD_AGAIN ); linguistic2::LinguServiceEventFlags::PROOFREAD_AGAIN );
} }
} }
else if (rServiceName.equalsAscii( SN_HYPHENATOR )) else if (rServiceName == SN_HYPHENATOR)
{ {
if (!xHyphDsp.is()) if (!xHyphDsp.is())
GetHyphenatorDsp_Impl(); GetHyphenatorDsp_Impl();
@@ -1735,7 +1735,7 @@ void SAL_CALL
linguistic2::LinguServiceEventFlags::HYPHENATE_AGAIN ); linguistic2::LinguServiceEventFlags::HYPHENATE_AGAIN );
} }
} }
else if (rServiceName.equalsAscii( SN_THESAURUS )) else if (rServiceName == SN_THESAURUS)
{ {
if (!xThesDsp.is()) if (!xThesDsp.is())
GetThesaurusDsp_Impl(); GetThesaurusDsp_Impl();
@@ -1927,7 +1927,7 @@ uno::Sequence< OUString > SAL_CALL
uno::Sequence< uno::Any > aValues; uno::Sequence< uno::Any > aValues;
uno::Sequence< OUString > aNames( 1 ); uno::Sequence< OUString > aNames( 1 );
OUString *pNames = aNames.getArray(); OUString *pNames = aNames.getArray();
if ( rServiceName.equalsAscii( SN_SPELLCHECKER ) ) if ( rServiceName == SN_SPELLCHECKER )
{ {
OUString aNode( "ServiceManager/SpellCheckerList"); OUString aNode( "ServiceManager/SpellCheckerList");
const uno::Sequence< OUString > aNodeEntries( GetNodeNames( aNode ) ); const uno::Sequence< OUString > aNodeEntries( GetNodeNames( aNode ) );
@@ -1942,7 +1942,7 @@ uno::Sequence< OUString > SAL_CALL
aSvcImplNames = GetLangSvcList( aValues.getConstArray()[0] ); aSvcImplNames = GetLangSvcList( aValues.getConstArray()[0] );
} }
} }
else if ( rServiceName.equalsAscii( SN_GRAMMARCHECKER ) ) else if ( rServiceName == SN_GRAMMARCHECKER )
{ {
OUString aNode( "ServiceManager/GrammarCheckerList"); OUString aNode( "ServiceManager/GrammarCheckerList");
const uno::Sequence< OUString > aNodeEntries( GetNodeNames( aNode ) ); const uno::Sequence< OUString > aNodeEntries( GetNodeNames( aNode ) );
@@ -1957,7 +1957,7 @@ uno::Sequence< OUString > SAL_CALL
aSvcImplNames = GetLangSvc( aValues.getConstArray()[0] ); aSvcImplNames = GetLangSvc( aValues.getConstArray()[0] );
} }
} }
else if ( rServiceName.equalsAscii( SN_HYPHENATOR ) ) else if ( rServiceName == SN_HYPHENATOR )
{ {
OUString aNode( "ServiceManager/HyphenatorList"); OUString aNode( "ServiceManager/HyphenatorList");
const uno::Sequence< OUString > aNodeEntries( GetNodeNames( aNode ) ); const uno::Sequence< OUString > aNodeEntries( GetNodeNames( aNode ) );
@@ -1972,7 +1972,7 @@ uno::Sequence< OUString > SAL_CALL
aSvcImplNames = GetLangSvc( aValues.getConstArray()[0] ); aSvcImplNames = GetLangSvc( aValues.getConstArray()[0] );
} }
} }
else if ( rServiceName.equalsAscii( SN_THESAURUS ) ) else if ( rServiceName == SN_THESAURUS )
{ {
OUString aNode( "ServiceManager/ThesaurusList"); OUString aNode( "ServiceManager/ThesaurusList");
const uno::Sequence< OUString > aNodeEntries( GetNodeNames( aNode ) ); const uno::Sequence< OUString > aNodeEntries( GetNodeNames( aNode ) );