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