Kaydet (Commit) 2a2b9920 authored tarafından Noel Grandin's avatar Noel Grandin

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

Change-Id: Ia6987c9566af0b79bf44c4793d4ca325ea921cb7
üst d1bda375
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
#include <sot/formats.hxx> #include <sot/formats.hxx>
#include <vcl/edit.hxx> #include <vcl/edit.hxx>
#include <osl/mutex.hxx> #include <osl/mutex.hxx>
#include <o3tl/make_unique.hxx>
#include <unordered_map> #include <unordered_map>
...@@ -447,7 +448,7 @@ void BibFrameController_Impl::dispatch(const util::URL& _rURL, const uno::Sequen ...@@ -447,7 +448,7 @@ void BibFrameController_Impl::dispatch(const util::URL& _rURL, const uno::Sequen
sal_uInt16 nCount = aStatusListeners.size(); sal_uInt16 nCount = aStatusListeners.size();
for ( sal_uInt16 n=0; n<nCount; n++ ) for ( sal_uInt16 n=0; n<nCount; n++ )
{ {
BibStatusDispatch *pObj = &aStatusListeners[n]; BibStatusDispatch *pObj = aStatusListeners[n].get();
if ( pObj->aURL.Path == "Bib/removeFilter" ) if ( pObj->aURL.Path == "Bib/removeFilter" )
{ {
FeatureStateEvent aEvent; FeatureStateEvent aEvent;
...@@ -498,7 +499,7 @@ void BibFrameController_Impl::dispatch(const util::URL& _rURL, const uno::Sequen ...@@ -498,7 +499,7 @@ void BibFrameController_Impl::dispatch(const util::URL& _rURL, const uno::Sequen
sal_uInt16 nCount = aStatusListeners.size(); sal_uInt16 nCount = aStatusListeners.size();
for ( sal_uInt16 n=0; n<nCount; n++ ) 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()) if ( pObj->aURL.Path == "Bib/removeFilter" && pDatMan->getParser().is())
{ {
FeatureStateEvent aEvent; FeatureStateEvent aEvent;
...@@ -643,7 +644,7 @@ void BibFrameController_Impl::addStatusListener( ...@@ -643,7 +644,7 @@ void BibFrameController_Impl::addStatusListener(
{ {
BibConfig* pConfig = BibModul::GetConfig(); BibConfig* pConfig = BibModul::GetConfig();
// create a new Reference and insert into listener array // 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 // send first status synchronously
FeatureStateEvent aEvent; FeatureStateEvent aEvent;
...@@ -780,7 +781,7 @@ void BibFrameController_Impl::removeStatusListener( ...@@ -780,7 +781,7 @@ void BibFrameController_Impl::removeStatusListener(
sal_uInt16 nCount = aStatusListeners.size(); sal_uInt16 nCount = aStatusListeners.size();
for ( sal_uInt16 n=0; n<nCount; n++ ) for ( sal_uInt16 n=0; n<nCount; n++ )
{ {
BibStatusDispatch *pObj = &aStatusListeners[n]; BibStatusDispatch *pObj = aStatusListeners[n].get();
bool bFlag=pObj->xListener.is(); bool bFlag=pObj->xListener.is();
if (!bFlag || (pObj->xListener == aObject && if (!bFlag || (pObj->xListener == aObject &&
( aURL.Complete.isEmpty() || pObj->aURL.Path == aURL.Path ))) ( aURL.Complete.isEmpty() || pObj->aURL.Path == aURL.Path )))
...@@ -804,7 +805,7 @@ void BibFrameController_Impl::RemoveFilter() ...@@ -804,7 +805,7 @@ void BibFrameController_Impl::RemoveFilter()
for ( sal_uInt16 n=0; n<nCount; n++ ) for ( sal_uInt16 n=0; n<nCount; n++ )
{ {
BibStatusDispatch *pObj = &aStatusListeners[n]; BibStatusDispatch *pObj = aStatusListeners[n].get();
if ( pObj->aURL.Path == "Bib/removeFilter" ) if ( pObj->aURL.Path == "Bib/removeFilter" )
{ {
FeatureStateEvent aEvent; FeatureStateEvent aEvent;
...@@ -864,7 +865,7 @@ void BibFrameController_Impl::ChangeDataSource(const uno::Sequence< beans::Prope ...@@ -864,7 +865,7 @@ void BibFrameController_Impl::ChangeDataSource(const uno::Sequence< beans::Prope
bool bQueryText=false; bool bQueryText=false;
for ( sal_uInt16 n=0; n<nCount; n++ ) for ( sal_uInt16 n=0; n<nCount; n++ )
{ {
BibStatusDispatch *pObj = &aStatusListeners[n]; BibStatusDispatch *pObj = aStatusListeners[n].get();
if (pObj->aURL.Path == "Bib/MenuFilter") if (pObj->aURL.Path == "Bib/MenuFilter")
{ {
FeatureStateEvent aEvent; FeatureStateEvent aEvent;
......
...@@ -27,7 +27,8 @@ ...@@ -27,7 +27,8 @@
#include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/frame/XDispatchInformationProvider.hpp> #include <com/sun/star/frame/XDispatchInformationProvider.hpp>
#include <cppuhelper/implbase.hxx> #include <cppuhelper/implbase.hxx>
#include <boost/ptr_container/ptr_vector.hpp> #include <vector>
#include <memory>
#include "bibmod.hxx" #include "bibmod.hxx"
class BibDataManager; class BibDataManager;
...@@ -48,7 +49,7 @@ public: ...@@ -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 < class BibFrameController_Impl : public cppu::WeakImplHelper <
css::lang::XServiceInfo, css::lang::XServiceInfo,
......
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