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