summaryrefslogtreecommitdiff
path: root/linguistic
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-06-30 10:53:27 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-06-30 11:34:37 +0100
commit282def6f503bbbdd48f2af722985dcfd197e2fc6 (patch)
treef497878d7d27d33643a7191c280c3c4ed8aeb6fc /linguistic
parentec940d35c66835217830de105f2793d61a680ebe (diff)
callcatcher: unused SetAvailableCfgServiceLists
Diffstat (limited to 'linguistic')
-rw-r--r--linguistic/source/lngsvcmgr.cxx91
-rw-r--r--linguistic/source/lngsvcmgr.hxx3
2 files changed, 0 insertions, 94 deletions
diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx
index 14216f8f8174..0893c0719436 100644
--- a/linguistic/source/lngsvcmgr.cxx
+++ b/linguistic/source/lngsvcmgr.cxx
@@ -182,97 +182,6 @@ sal_Bool SvcInfo::HasLanguage( sal_Int16 nLanguage ) const
return i < nCnt;
}
-
-
-
-void LngSvcMgr::SetAvailableCfgServiceLists( LinguDispatcher &rDispatcher,
- const SvcInfoArray &rAvailSvcs )
-{
- // get list of nodenames to look at for their service list
- const char *pEntryName = 0;
- sal_Bool bHasLangSvcList = sal_True;
- switch (rDispatcher.GetDspType())
- {
- case LinguDispatcher::DSP_SPELL : pEntryName = "ServiceManager/SpellCheckerList"; break;
- case LinguDispatcher::DSP_GRAMMAR : pEntryName = "ServiceManager/GrammarCheckerList";
- bHasLangSvcList = sal_False;
- break;
- case LinguDispatcher::DSP_HYPH : pEntryName = "ServiceManager/HyphenatorList";
- bHasLangSvcList = sal_False;
- break;
- case LinguDispatcher::DSP_THES : pEntryName = "ServiceManager/ThesaurusList"; break;
- default :
- DBG_ASSERT( 0, "unexpected case" );
- }
- String aNode( String::CreateFromAscii( pEntryName ) );
- uno::Sequence < OUString > aNodeNames( /*aCfg.*/GetNodeNames( aNode ) );
-
-
- sal_Int32 nLen = aNodeNames.getLength();
- const OUString *pNodeNames = aNodeNames.getConstArray();
- for (sal_Int32 i = 0; i < nLen; ++i)
- {
- uno::Sequence< OUString > aSvcImplNames;
-
- uno::Sequence< OUString > aNames( 1 );
- OUString *pNames = aNames.getArray();
-
- OUString aPropName( aNode );
- aPropName += OUString::valueOf( (sal_Unicode) '/' );
- aPropName += pNodeNames[i];
- pNames[0] = aPropName;
-
- uno::Sequence< uno::Any > aValues = /*aCfg.*/GetProperties( aNames );
- if (aValues.getLength())
- {
- // get list of configured service names for the
- // current node (language)
- const uno::Any &rValue = aValues.getConstArray()[0];
- if (bHasLangSvcList)
- aSvcImplNames = GetLangSvcList( rValue );
- else
- aSvcImplNames = GetLangSvc( rValue );
-
- sal_Int32 nSvcs = aSvcImplNames.getLength();
- if (nSvcs)
- {
- const OUString *pImplNames = aSvcImplNames.getConstArray();
-
- LanguageType nLang = MsLangId::convertIsoStringToLanguage( pNodeNames[i] );
-
- // build list of available services from those
- sal_Int32 nCnt = 0;
- uno::Sequence< OUString > aAvailSvcs( nSvcs );
- OUString *pAvailSvcs = aAvailSvcs.getArray();
- for (sal_Int32 k = 0; k < nSvcs; ++k)
- {
- // check for availability of the service
- size_t nAvailSvcs = rAvailSvcs.size();
- for (size_t m = 0; m < nAvailSvcs; ++m)
- {
- const SvcInfo &rSvcInfo = rAvailSvcs[m];
- if (rSvcInfo.aSvcImplName == pImplNames[k] &&
- rSvcInfo.HasLanguage( nLang ))
- {
- pAvailSvcs[ nCnt++ ] = rSvcInfo.aSvcImplName;
- break;
- }
- }
- }
-
- if (nCnt)
- {
- aAvailSvcs.realloc( nCnt );
- rDispatcher.SetServiceList( CreateLocale( nLang ), aAvailSvcs );
- }
- }
- }
- }
-}
-
-
-
-
class LngSvcMgrListenerHelper :
public cppu::WeakImplHelper2
<
diff --git a/linguistic/source/lngsvcmgr.hxx b/linguistic/source/lngsvcmgr.hxx
index 7054cf1b4455..635a85318364 100644
--- a/linguistic/source/lngsvcmgr.hxx
+++ b/linguistic/source/lngsvcmgr.hxx
@@ -136,9 +136,6 @@ class LngSvcMgr :
sal_Bool SaveCfgSvcs( const String &rServiceName );
- void SetAvailableCfgServiceLists( LinguDispatcher &rDispatcher,
- const SvcInfoArray &rAvailSvcs );
-
// utl::ConfigItem (to allow for listening of changes of relevant properties)
virtual void Notify( const com::sun::star::uno::Sequence< rtl::OUString > &rPropertyNames );
virtual void Commit();