summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-11-11 12:02:20 +0200
committerNoel Grandin <noel@peralex.com>2015-11-12 08:01:34 +0200
commit1715a995c2d57b9d5e56bc0706f1e56cdb2f732d (patch)
tree2d37fe171f1eb0511d06c97627b40e69ebe7c87a /sfx2
parent9149faa165d314694898dcecb25e36acee3bd1fd (diff)
sfx2: boost::ptr_vector->std::vector<std::unique_ptr>
Change-Id: I13c6ede42f2fba55397addf7a48adeb80c6a3cb6
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/control/shell.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx
index 17550aeeca7a..a073b46c1bd4 100644
--- a/sfx2/source/control/shell.cxx
+++ b/sfx2/source/control/shell.cxx
@@ -46,7 +46,8 @@
#include <com/sun/star/ui/dialogs/XSLTFilterDialog.hpp>
#include <boost/ptr_container/ptr_map.hpp>
-#include <boost/ptr_container/ptr_vector.hpp>
+#include <vector>
+#include <memory>
// Maps the Which() field to a pointer to a SfxPoolItem
typedef boost::ptr_map<sal_uInt16, SfxPoolItem> SfxItemPtrMap;
@@ -67,7 +68,7 @@ struct SfxShell_Impl: public SfxBroadcaster
sal_uIntPtr nHelpId;
svtools::AsynchronLink* pExecuter;
svtools::AsynchronLink* pUpdater;
- boost::ptr_vector<SfxSlot> aSlotArr;
+ std::vector<std::unique_ptr<SfxSlot> > aSlotArr;
css::uno::Sequence < css::embed::VerbDescriptor > aVerbList;
::sfx2::sidebar::ContextChangeBroadcaster maContextChangeBroadcaster;
@@ -572,14 +573,14 @@ void SfxShell::SetVerbs(const css::uno::Sequence < css::embed::VerbDescriptor >&
if (!pImp->aSlotArr.empty())
{
- SfxSlot& rSlot = pImp->aSlotArr[0];
+ SfxSlot& rSlot = *pImp->aSlotArr[0].get();
pNewSlot->pNextSlot = rSlot.pNextSlot;
rSlot.pNextSlot = pNewSlot;
}
else
pNewSlot->pNextSlot = pNewSlot;
- pImp->aSlotArr.insert(pImp->aSlotArr.begin() + (sal_uInt16) n, pNewSlot);
+ pImp->aSlotArr.insert(pImp->aSlotArr.begin() + (sal_uInt16) n, std::unique_ptr<SfxSlot>(pNewSlot));
}
pImp->aVerbList = aVerbs;
@@ -640,7 +641,7 @@ const SfxSlot* SfxShell::GetVerbSlot_Impl(sal_uInt16 nId) const
DBG_ASSERT(nIndex < rList.getLength(),"Wrong VerbId!");
if (nIndex < rList.getLength())
- return &pImp->aSlotArr[nIndex];
+ return pImp->aSlotArr[nIndex].get();
else
return nullptr;
}