diff options
-rw-r--r-- | linguistic/source/lngsvcmgr.cxx | 10 | ||||
-rw-r--r-- | linguistic/source/lngsvcmgr.hxx | 4 |
2 files changed, 8 insertions, 6 deletions
diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx index 8bdfd2d3dada..487f29ad3005 100644 --- a/linguistic/source/lngsvcmgr.cxx +++ b/linguistic/source/lngsvcmgr.cxx @@ -254,7 +254,7 @@ void LngSvcMgr::SetAvailableCfgServiceLists( LinguDispatcher &rDispatcher, size_t nAvailSvcs = rAvailSvcs.size(); for (size_t m = 0; m < nAvailSvcs; ++m) { - const SvcInfo &rSvcInfo = *rAvailSvcs[m]; + const SvcInfo &rSvcInfo = rAvailSvcs[m]; if (rSvcInfo.aSvcImplName == pImplNames[k] && rSvcInfo.HasLanguage( nLang )) { @@ -1437,13 +1437,13 @@ uno::Sequence< OUString > SAL_CALL USHORT nCnt = 0; LanguageType nLanguage = LocaleToLanguage( rLocale ); - for (size_t i = 0; i < nMaxCnt; ++i) + for (size_t i = 0; i < nMaxCnt; ++i) { - const SvcInfo *pInfo = (*pInfoArray)[i]; + const SvcInfo &rInfo = (*pInfoArray)[i]; if (LANGUAGE_NONE == nLanguage - || (pInfo && pInfo->HasLanguage( nLanguage ))) + || rInfo.HasLanguage( nLanguage )) { - pImplName[ nCnt++ ] = pInfo->aSvcImplName; + pImplName[ nCnt++ ] = rInfo.aSvcImplName; } } diff --git a/linguistic/source/lngsvcmgr.hxx b/linguistic/source/lngsvcmgr.hxx index a7057daf079f..9140a0f5ca8d 100644 --- a/linguistic/source/lngsvcmgr.hxx +++ b/linguistic/source/lngsvcmgr.hxx @@ -41,6 +41,8 @@ #include <com/sun/star/linguistic2/XAvailableLocales.hpp> #include <unotools/configitem.hxx> +#include <boost/ptr_container/ptr_vector.hpp> + #include "misc.hxx" #include "defs.hxx" @@ -105,7 +107,7 @@ class LngSvcMgr : LngSvcMgrListenerHelper * pListenerHelper; - typedef std::vector< SvcInfo * > SvcInfoArray; + typedef boost::ptr_vector< SvcInfo > SvcInfoArray; SvcInfoArray * pAvailSpellSvcs; SvcInfoArray * pAvailGrammarSvcs; SvcInfoArray * pAvailHyphSvcs; |