diff options
author | Noel Grandin <noel@peralex.com> | 2015-11-10 16:24:35 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-11-11 11:35:39 +0200 |
commit | 2a2b9920c1ccd9cfb2ec474ceffed7c5d78ecb00 (patch) | |
tree | ed65ead97a2f776d1194332d0657bd1ddee54696 | |
parent | d1bda375a077d0de31cc4f5e602b3e33fdde0d55 (diff) |
extensions: boost::ptr_vector->std::vector<std::unique_ptr>
Change-Id: Ia6987c9566af0b79bf44c4793d4ca325ea921cb7
-rw-r--r-- | extensions/source/bibliography/framectr.cxx | 13 | ||||
-rw-r--r-- | extensions/source/bibliography/framectr.hxx | 5 |
2 files changed, 10 insertions, 8 deletions
diff --git a/extensions/source/bibliography/framectr.cxx b/extensions/source/bibliography/framectr.cxx index b280405c9e21..586b9b617c7b 100644 --- a/extensions/source/bibliography/framectr.cxx +++ b/extensions/source/bibliography/framectr.cxx @@ -51,6 +51,7 @@ #include <sot/formats.hxx> #include <vcl/edit.hxx> #include <osl/mutex.hxx> +#include <o3tl/make_unique.hxx> #include <unordered_map> @@ -447,7 +448,7 @@ void BibFrameController_Impl::dispatch(const util::URL& _rURL, const uno::Sequen sal_uInt16 nCount = aStatusListeners.size(); for ( sal_uInt16 n=0; n<nCount; n++ ) { - BibStatusDispatch *pObj = &aStatusListeners[n]; + BibStatusDispatch *pObj = aStatusListeners[n].get(); if ( pObj->aURL.Path == "Bib/removeFilter" ) { FeatureStateEvent aEvent; @@ -498,7 +499,7 @@ void BibFrameController_Impl::dispatch(const util::URL& _rURL, const uno::Sequen sal_uInt16 nCount = aStatusListeners.size(); for ( sal_uInt16 n=0; n<nCount; n++ ) { - BibStatusDispatch *pObj = &aStatusListeners[n]; + BibStatusDispatch *pObj = aStatusListeners[n].get(); if ( pObj->aURL.Path == "Bib/removeFilter" && pDatMan->getParser().is()) { FeatureStateEvent aEvent; @@ -643,7 +644,7 @@ void BibFrameController_Impl::addStatusListener( { BibConfig* pConfig = BibModul::GetConfig(); // create a new Reference and insert into listener array - aStatusListeners.push_back( new BibStatusDispatch( aURL, aListener ) ); + aStatusListeners.push_back( o3tl::make_unique<BibStatusDispatch>( aURL, aListener ) ); // send first status synchronously FeatureStateEvent aEvent; @@ -780,7 +781,7 @@ void BibFrameController_Impl::removeStatusListener( sal_uInt16 nCount = aStatusListeners.size(); for ( sal_uInt16 n=0; n<nCount; n++ ) { - BibStatusDispatch *pObj = &aStatusListeners[n]; + BibStatusDispatch *pObj = aStatusListeners[n].get(); bool bFlag=pObj->xListener.is(); if (!bFlag || (pObj->xListener == aObject && ( aURL.Complete.isEmpty() || pObj->aURL.Path == aURL.Path ))) @@ -804,7 +805,7 @@ void BibFrameController_Impl::RemoveFilter() for ( sal_uInt16 n=0; n<nCount; n++ ) { - BibStatusDispatch *pObj = &aStatusListeners[n]; + BibStatusDispatch *pObj = aStatusListeners[n].get(); if ( pObj->aURL.Path == "Bib/removeFilter" ) { FeatureStateEvent aEvent; @@ -864,7 +865,7 @@ void BibFrameController_Impl::ChangeDataSource(const uno::Sequence< beans::Prope bool bQueryText=false; for ( sal_uInt16 n=0; n<nCount; n++ ) { - BibStatusDispatch *pObj = &aStatusListeners[n]; + BibStatusDispatch *pObj = aStatusListeners[n].get(); if (pObj->aURL.Path == "Bib/MenuFilter") { FeatureStateEvent aEvent; diff --git a/extensions/source/bibliography/framectr.hxx b/extensions/source/bibliography/framectr.hxx index d6fe8e6367c3..feb94c37c383 100644 --- a/extensions/source/bibliography/framectr.hxx +++ b/extensions/source/bibliography/framectr.hxx @@ -27,7 +27,8 @@ #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/frame/XDispatchInformationProvider.hpp> #include <cppuhelper/implbase.hxx> -#include <boost/ptr_container/ptr_vector.hpp> +#include <vector> +#include <memory> #include "bibmod.hxx" class BibDataManager; @@ -48,7 +49,7 @@ public: {} }; -typedef boost::ptr_vector<BibStatusDispatch> BibStatusDispatchArr; +typedef std::vector<std::unique_ptr<BibStatusDispatch> > BibStatusDispatchArr; class BibFrameController_Impl : public cppu::WeakImplHelper < css::lang::XServiceInfo, |