Kaydet (Commit) a01789ec authored tarafından Noel Grandin's avatar Noel Grandin Kaydeden (comit) Michael Stahl

Convert SV_DECL_PTRARR_DEL(BibToolBarListenerArr) to boost::ptr_vector

Change-Id: I851a3ef2bda7f427f6562ed946c7889c97ad83a0
üst c513264f
...@@ -190,8 +190,6 @@ void BibTBEditListener::statusChanged(const frame::FeatureStateEvent& rEvt)throw ...@@ -190,8 +190,6 @@ void BibTBEditListener::statusChanged(const frame::FeatureStateEvent& rEvt)throw
} }
} }
SV_IMPL_PTRARR( BibToolBarListenerArr, BibToolBarListenerPtr);
BibToolBar::BibToolBar(Window* pParent, Link aLink, WinBits nStyle): BibToolBar::BibToolBar(Window* pParent, Link aLink, WinBits nStyle):
ToolBox(pParent,BibResId(RID_BIB_TOOLBAR)), ToolBox(pParent,BibResId(RID_BIB_TOOLBAR)),
aImgLst(BibResId( RID_TOOLBAR_IMGLIST )), aImgLst(BibResId( RID_TOOLBAR_IMGLIST )),
...@@ -299,9 +297,9 @@ void BibToolBar::InitListener() ...@@ -299,9 +297,9 @@ void BibToolBar::InitListener()
pListener=new BibToolBarListener(this,aURL.Complete,nId); pListener=new BibToolBarListener(this,aURL.Complete,nId);
} }
BibToolBarListenerPtr pxInsert = new Reference<frame::XStatusListener>; BibToolBarListenerRef* pxInsert = new Reference<frame::XStatusListener>;
(*pxInsert) = pListener; (*pxInsert) = pListener;
aListenerArr.Insert( pxInsert, aListenerArr.Count() ); aListenerArr.push_back( pxInsert );
xDisp->addStatusListener(uno::Reference< frame::XStatusListener > (pListener),aURL); xDisp->addStatusListener(uno::Reference< frame::XStatusListener > (pListener),aURL);
} }
} }
...@@ -529,9 +527,9 @@ IMPL_LINK( BibToolBar, MenuHdl, ToolBox*, /*pToolbox*/) ...@@ -529,9 +527,9 @@ IMPL_LINK( BibToolBar, MenuHdl, ToolBox*, /*pToolbox*/)
void BibToolBar::statusChanged(const frame::FeatureStateEvent& rEvent) void BibToolBar::statusChanged(const frame::FeatureStateEvent& rEvent)
throw( uno::RuntimeException ) throw( uno::RuntimeException )
{ {
for(sal_uInt16 i = 0; i < aListenerArr.Count(); i++) for(sal_uInt16 i = 0; i < aListenerArr.size(); i++)
{ {
BibToolBarListenerPtr pListener = aListenerArr.GetObject(i); BibToolBarListenerRef* pListener = &aListenerArr[i];
(*pListener)->statusChanged(rEvent); (*pListener)->statusChanged(rEvent);
} }
} }
......
...@@ -37,9 +37,9 @@ ...@@ -37,9 +37,9 @@
#include <vcl/lstbox.hxx> #include <vcl/lstbox.hxx>
#include <vcl/edit.hxx> #include <vcl/edit.hxx>
#include <vcl/fixed.hxx> #include <vcl/fixed.hxx>
#include <svl/svarray.hxx>
#include <vcl/timer.hxx> #include <vcl/timer.hxx>
#include <cppuhelper/implbase1.hxx> // helper for implementations #include <cppuhelper/implbase1.hxx> // helper for implementations
#include <boost/ptr_container/ptr_vector.hpp>
class BibDataManager; class BibDataManager;
class BibToolBar; class BibToolBar;
...@@ -110,8 +110,8 @@ public: ...@@ -110,8 +110,8 @@ public:
}; };
typedef ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener>* BibToolBarListenerPtr; typedef ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener> BibToolBarListenerRef;
SV_DECL_PTRARR_DEL( BibToolBarListenerArr, BibToolBarListenerPtr, 4 ) typedef boost::ptr_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