Kaydet (Commit) 44d3577f authored tarafından Noel Grandin's avatar Noel Grandin

linguistic: boost::ptr_vector->std::vector<std::unique_ptr>

Change-Id: I4343b77dde4353db6294d597cdd5da6131e30afe
üst 5d892a33
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#include <cppuhelper/supportsservice.hxx> #include <cppuhelper/supportsservice.hxx>
#include <boost/checked_delete.hpp> #include <boost/checked_delete.hpp>
#include <boost/noncopyable.hpp> #include <boost/noncopyable.hpp>
#include <o3tl/make_unique.hxx>
#include "lngsvcmgr.hxx" #include "lngsvcmgr.hxx"
#include "lngopt.hxx" #include "lngopt.hxx"
...@@ -1090,7 +1091,7 @@ void LngSvcMgr::GetAvailableSpellSvcs_Impl() ...@@ -1090,7 +1091,7 @@ void LngSvcMgr::GetAvailableSpellSvcs_Impl()
aLanguages = LocaleSeqToLangSeq( aLocaleSequence ); 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() ...@@ -1153,7 +1154,7 @@ void LngSvcMgr::GetAvailableGrammarSvcs_Impl()
aLanguages = LocaleSeqToLangSeq( aLocaleSequence ); 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() ...@@ -1213,7 +1214,7 @@ void LngSvcMgr::GetAvailableHyphSvcs_Impl()
uno::Sequence<lang::Locale> aLocaleSequence(xSuppLoc->getLocales()); uno::Sequence<lang::Locale> aLocaleSequence(xSuppLoc->getLocales());
aLanguages = LocaleSeqToLangSeq( aLocaleSequence ); 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() ...@@ -1275,7 +1276,7 @@ void LngSvcMgr::GetAvailableThesSvcs_Impl()
aLanguages = LocaleSeqToLangSeq( aLocaleSequence ); 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 ...@@ -1584,7 +1585,7 @@ uno::Sequence< OUString > SAL_CALL
LanguageType nLanguage = LinguLocaleToLanguage( rLocale ); LanguageType nLanguage = LinguLocaleToLanguage( rLocale );
for (size_t i = 0; i < nMaxCnt; ++i) for (size_t i = 0; i < nMaxCnt; ++i)
{ {
const SvcInfo &rInfo = (*pInfoArray)[i]; const SvcInfo &rInfo = *(*pInfoArray)[i].get();
if (LinguIsUnspecified( nLanguage ) if (LinguIsUnspecified( nLanguage )
|| rInfo.HasLanguage( nLanguage )) || rInfo.HasLanguage( nLanguage ))
{ {
......
...@@ -32,7 +32,8 @@ ...@@ -32,7 +32,8 @@
#include <unotools/configitem.hxx> #include <unotools/configitem.hxx>
#include <vcl/timer.hxx> #include <vcl/timer.hxx>
#include <vcl/idle.hxx> #include <vcl/idle.hxx>
#include <boost/ptr_container/ptr_vector.hpp> #include <vector>
#include <memory>
#include "linguistic/misc.hxx" #include "linguistic/misc.hxx"
#include "defs.hxx" #include "defs.hxx"
...@@ -101,7 +102,7 @@ class LngSvcMgr : ...@@ -101,7 +102,7 @@ class LngSvcMgr :
LngSvcMgrListenerHelper * pListenerHelper; LngSvcMgrListenerHelper * pListenerHelper;
typedef boost::ptr_vector< SvcInfo > SvcInfoArray; typedef std::vector< std::unique_ptr<SvcInfo> > SvcInfoArray;
SvcInfoArray * pAvailSpellSvcs; SvcInfoArray * pAvailSpellSvcs;
SvcInfoArray * pAvailGrammarSvcs; SvcInfoArray * pAvailGrammarSvcs;
SvcInfoArray * pAvailHyphSvcs; SvcInfoArray * pAvailHyphSvcs;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment