From fe20b3d94315a471947883c7692399dd98d58d4c Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 12 Dec 2014 12:21:08 +0100 Subject: linguistic: Use appropriate OUString functions on string constants Change-Id: I76ee3a435ac7a49308db497306b5a9404f3c3ba0 --- linguistic/source/lngsvcmgr.cxx | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'linguistic') diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx index c36555b3fe5b..557842ea0c9f 100644 --- a/linguistic/source/lngsvcmgr.cxx +++ b/linguistic/source/lngsvcmgr.cxx @@ -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 ) ); -- cgit