Kaydet (Commit) 7950288c authored tarafından Noel Grandin's avatar Noel Grandin

boost::ptr_vector->std::vector

no need to manage uno::Reference via extra heap objects

Change-Id: I3092b5103a31fcff8122e4ce9cd1cbb42f5ed910
üst 74154313
...@@ -277,24 +277,22 @@ void BibToolBar::InitListener() ...@@ -277,24 +277,22 @@ void BibToolBar::InitListener()
xTrans->parseStrict( aURL ); xTrans->parseStrict( aURL );
BibToolBarListener* pListener=NULL; BibToolBarListenerRef xListener;
if(nId==TBC_LB_SOURCE) if(nId==TBC_LB_SOURCE)
{ {
pListener=new BibTBListBoxListener(this,aURL.Complete,nId); xListener=new BibTBListBoxListener(this,aURL.Complete,nId);
} }
else if(nId==TBC_ED_QUERY) else if(nId==TBC_ED_QUERY)
{ {
pListener=new BibTBEditListener(this,aURL.Complete,nId); xListener=new BibTBEditListener(this,aURL.Complete,nId);
} }
else else
{ {
pListener=new BibToolBarListener(this,aURL.Complete,nId); xListener=new BibToolBarListener(this,aURL.Complete,nId);
} }
BibToolBarListenerRef* pxInsert = new uno::Reference<frame::XStatusListener>; aListenerArr.push_back( xListener );
(*pxInsert) = pListener; xDisp->addStatusListener(xListener,aURL);
aListenerArr.push_back( pxInsert );
xDisp->addStatusListener(uno::Reference< frame::XStatusListener > (pListener),aURL);
} }
} }
} }
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#include <vcl/fixed.hxx> #include <vcl/fixed.hxx>
#include <vcl/timer.hxx> #include <vcl/timer.hxx>
#include <cppuhelper/implbase.hxx> #include <cppuhelper/implbase.hxx>
#include <boost/ptr_container/ptr_vector.hpp> #include <vector>
class BibDataManager; class BibDataManager;
class BibToolBar; class BibToolBar;
...@@ -102,7 +102,7 @@ public: ...@@ -102,7 +102,7 @@ public:
typedef css::uno::Reference< css::frame::XStatusListener> BibToolBarListenerRef; typedef css::uno::Reference< css::frame::XStatusListener> BibToolBarListenerRef;
typedef boost::ptr_vector<BibToolBarListenerRef> BibToolBarListenerArr; typedef std::vector<BibToolBarListenerRef> BibToolBarListenerArr;
class BibToolBar: public ToolBox class BibToolBar: public ToolBox
{ {
......
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