summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-06-13 14:18:39 +0200
committerMichael Stahl <mstahl@redhat.com>2012-06-20 19:46:37 +0200
commita01789ec7c2e65cd3737e180d42ea1c23c3a51bb (patch)
tree944a4cf63bcbfc3c0525929f621fdb6e920e15cd /extensions
parentc513264f19e07d5db247a9af7c661d43ea4005f8 (diff)
Convert SV_DECL_PTRARR_DEL(BibToolBarListenerArr) to boost::ptr_vector
Change-Id: I851a3ef2bda7f427f6562ed946c7889c97ad83a0
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/bibliography/toolbar.cxx10
-rw-r--r--extensions/source/bibliography/toolbar.hxx6
2 files changed, 7 insertions, 9 deletions
diff --git a/extensions/source/bibliography/toolbar.cxx b/extensions/source/bibliography/toolbar.cxx
index 152a41b23355..2db8f807108c 100644
--- a/extensions/source/bibliography/toolbar.cxx
+++ b/extensions/source/bibliography/toolbar.cxx
@@ -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):
ToolBox(pParent,BibResId(RID_BIB_TOOLBAR)),
aImgLst(BibResId( RID_TOOLBAR_IMGLIST )),
@@ -299,9 +297,9 @@ void BibToolBar::InitListener()
pListener=new BibToolBarListener(this,aURL.Complete,nId);
}
- BibToolBarListenerPtr pxInsert = new Reference<frame::XStatusListener>;
+ BibToolBarListenerRef* pxInsert = new Reference<frame::XStatusListener>;
(*pxInsert) = pListener;
- aListenerArr.Insert( pxInsert, aListenerArr.Count() );
+ aListenerArr.push_back( pxInsert );
xDisp->addStatusListener(uno::Reference< frame::XStatusListener > (pListener),aURL);
}
}
@@ -529,9 +527,9 @@ IMPL_LINK( BibToolBar, MenuHdl, ToolBox*, /*pToolbox*/)
void BibToolBar::statusChanged(const frame::FeatureStateEvent& rEvent)
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);
}
}
diff --git a/extensions/source/bibliography/toolbar.hxx b/extensions/source/bibliography/toolbar.hxx
index be2e95c09c8d..80cabc8f6e15 100644
--- a/extensions/source/bibliography/toolbar.hxx
+++ b/extensions/source/bibliography/toolbar.hxx
@@ -37,9 +37,9 @@
#include <vcl/lstbox.hxx>
#include <vcl/edit.hxx>
#include <vcl/fixed.hxx>
-#include <svl/svarray.hxx>
#include <vcl/timer.hxx>
#include <cppuhelper/implbase1.hxx> // helper for implementations
+#include <boost/ptr_container/ptr_vector.hpp>
class BibDataManager;
class BibToolBar;
@@ -110,8 +110,8 @@ public:
};
-typedef ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener>* BibToolBarListenerPtr;
-SV_DECL_PTRARR_DEL( BibToolBarListenerArr, BibToolBarListenerPtr, 4 )
+typedef ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener> BibToolBarListenerRef;
+typedef boost::ptr_vector<BibToolBarListenerRef> BibToolBarListenerArr;
class BibToolBar: public ToolBox
{