From 6583305dd70e31ae745d709b8cda8c7b68219735 Mon Sep 17 00:00:00 2001 From: Thomas Arnhold Date: Fri, 8 Mar 2013 12:37:15 +0100 Subject: simplify compareTo (now correct) Change-Id: Ia4fd2f54d0bda71d472f46949500c0b23ff8e1b7 Signed-off-by: Stephan Bergmann --- linguistic/source/lngsvcmgr.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'linguistic') diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx index abce09198e26..a41fe51224bf 100644 --- a/linguistic/source/lngsvcmgr.cxx +++ b/linguistic/source/lngsvcmgr.cxx @@ -860,7 +860,7 @@ void LngSvcMgr::Notify( const uno::Sequence< OUString > &rPropertyNames ) if (nKeyStart != -1) aKeyText = rName.copy( nKeyStart + 1 ); DBG_ASSERT( !aKeyText.isEmpty(), "unexpected key (lang::Locale) string" ); - if (0 == rName.compareTo( aSpellCheckerList, aSpellCheckerList.getLength() )) + if (rName.startsWith( aSpellCheckerList )) { // delete old cached data, needs to be acquired new on demand clearSvcInfoArray(pAvailSpellSvcs); @@ -885,7 +885,7 @@ void LngSvcMgr::Notify( const uno::Sequence< OUString > &rPropertyNames ) pSpellDsp->SetServiceList( LanguageTag(nLang).getLocale(), aSvcImplNames ); } } - else if (0 == rName.compareTo( aGrammarCheckerList, aGrammarCheckerList.getLength() )) + else if (rName.startsWith( aGrammarCheckerList )) { // delete old cached data, needs to be acquired new on demand clearSvcInfoArray(pAvailGrammarSvcs); @@ -913,7 +913,7 @@ void LngSvcMgr::Notify( const uno::Sequence< OUString > &rPropertyNames ) } } } - else if (0 == rName.compareTo( aHyphenatorList, aHyphenatorList.getLength() )) + else if (rName.startsWith( aHyphenatorList )) { // delete old cached data, needs to be acquired new on demand clearSvcInfoArray(pAvailHyphSvcs); @@ -938,7 +938,7 @@ void LngSvcMgr::Notify( const uno::Sequence< OUString > &rPropertyNames ) pHyphDsp->SetServiceList( LanguageTag(nLang).getLocale(), aSvcImplNames ); } } - else if (0 == rName.compareTo( aThesaurusList, aThesaurusList.getLength() )) + else if (rName.startsWith( aThesaurusList )) { // delete old cached data, needs to be acquired new on demand clearSvcInfoArray(pAvailThesSvcs); -- cgit