diff options
author | Noel Grandin <noel@peralex.com> | 2015-11-11 09:17:24 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-11-11 11:35:42 +0200 |
commit | 44d3577f4b5ec181219268826d2ec504e61541f3 (patch) | |
tree | d161a57f4db991589597034ecdc7b9ed7a38d2f3 /linguistic/source | |
parent | 5d892a3378dfd5c452ba106b002c7cef9a77a861 (diff) |
linguistic: boost::ptr_vector->std::vector<std::unique_ptr>
Change-Id: I4343b77dde4353db6294d597cdd5da6131e30afe
Diffstat (limited to 'linguistic/source')
-rw-r--r-- | linguistic/source/lngsvcmgr.cxx | 11 | ||||
-rw-r--r-- | linguistic/source/lngsvcmgr.hxx | 5 |
2 files changed, 9 insertions, 7 deletions
diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx index ceebcc9afbca..22249cbd57b8 100644 --- a/linguistic/source/lngsvcmgr.cxx +++ b/linguistic/source/lngsvcmgr.cxx @@ -37,6 +37,7 @@ #include <cppuhelper/supportsservice.hxx> #include <boost/checked_delete.hpp> #include <boost/noncopyable.hpp> +#include <o3tl/make_unique.hxx> #include "lngsvcmgr.hxx" #include "lngopt.hxx" @@ -1090,7 +1091,7 @@ void LngSvcMgr::GetAvailableSpellSvcs_Impl() aLanguages = LocaleSeqToLangSeq( aLocaleSequence ); } - pAvailSpellSvcs->push_back( new SvcInfo( aImplName, aLanguages ) ); + pAvailSpellSvcs->push_back( o3tl::make_unique<SvcInfo>( aImplName, aLanguages ) ); } } } @@ -1153,7 +1154,7 @@ void LngSvcMgr::GetAvailableGrammarSvcs_Impl() aLanguages = LocaleSeqToLangSeq( aLocaleSequence ); } - pAvailGrammarSvcs->push_back( new SvcInfo( aImplName, aLanguages ) ); + pAvailGrammarSvcs->push_back( o3tl::make_unique<SvcInfo>( aImplName, aLanguages ) ); } } } @@ -1213,7 +1214,7 @@ void LngSvcMgr::GetAvailableHyphSvcs_Impl() uno::Sequence<lang::Locale> aLocaleSequence(xSuppLoc->getLocales()); aLanguages = LocaleSeqToLangSeq( aLocaleSequence ); } - pAvailHyphSvcs->push_back( new SvcInfo( aImplName, aLanguages ) ); + pAvailHyphSvcs->push_back( o3tl::make_unique<SvcInfo>( aImplName, aLanguages ) ); } } } @@ -1275,7 +1276,7 @@ void LngSvcMgr::GetAvailableThesSvcs_Impl() aLanguages = LocaleSeqToLangSeq( aLocaleSequence ); } - pAvailThesSvcs->push_back( new SvcInfo( aImplName, aLanguages ) ); + pAvailThesSvcs->push_back( o3tl::make_unique<SvcInfo>( aImplName, aLanguages ) ); } } } @@ -1584,7 +1585,7 @@ uno::Sequence< OUString > SAL_CALL LanguageType nLanguage = LinguLocaleToLanguage( rLocale ); for (size_t i = 0; i < nMaxCnt; ++i) { - const SvcInfo &rInfo = (*pInfoArray)[i]; + const SvcInfo &rInfo = *(*pInfoArray)[i].get(); if (LinguIsUnspecified( nLanguage ) || rInfo.HasLanguage( nLanguage )) { diff --git a/linguistic/source/lngsvcmgr.hxx b/linguistic/source/lngsvcmgr.hxx index d28216cd5cc5..0eee0605eddd 100644 --- a/linguistic/source/lngsvcmgr.hxx +++ b/linguistic/source/lngsvcmgr.hxx @@ -32,7 +32,8 @@ #include <unotools/configitem.hxx> #include <vcl/timer.hxx> #include <vcl/idle.hxx> -#include <boost/ptr_container/ptr_vector.hpp> +#include <vector> +#include <memory> #include "linguistic/misc.hxx" #include "defs.hxx" @@ -101,7 +102,7 @@ class LngSvcMgr : LngSvcMgrListenerHelper * pListenerHelper; - typedef boost::ptr_vector< SvcInfo > SvcInfoArray; + typedef std::vector< std::unique_ptr<SvcInfo> > SvcInfoArray; SvcInfoArray * pAvailSpellSvcs; SvcInfoArray * pAvailGrammarSvcs; SvcInfoArray * pAvailHyphSvcs; |