diff --git a/sfx2/inc/pch/precompiled_sfx.hxx b/sfx2/inc/pch/precompiled_sfx.hxx index 30f8c8db141f..8c5132aca1bd 100644 --- a/sfx2/inc/pch/precompiled_sfx.hxx +++ b/sfx2/inc/pch/precompiled_sfx.hxx @@ -44,7 +44,6 @@ #include #include #include -#include #include #include #include diff --git a/sfx2/source/inc/virtmenu.hxx b/sfx2/source/inc/virtmenu.hxx index f353169ab0d7..bf892ee01edc 100644 --- a/sfx2/source/inc/virtmenu.hxx +++ b/sfx2/source/inc/virtmenu.hxx @@ -19,14 +19,15 @@ #ifndef INCLUDED_SFX2_SOURCE_INC_VIRTMENU_HXX #define INCLUDED_SFX2_SOURCE_INC_VIRTMENU_HXX -#include +#include +#include #include class SfxBindings; class SfxMenuImageControl_Impl; -typedef ::boost::ptr_vector SfxMenuCtrlArr_Impl; +typedef std::vector > SfxMenuCtrlArr_Impl; class SAL_DLLPUBLIC_EXPORT SfxVirtualMenu { diff --git a/sfx2/source/menu/virtmenu.cxx b/sfx2/source/menu/virtmenu.cxx index cdf4752a63d0..dc3b36f6da6c 100644 --- a/sfx2/source/menu/virtmenu.cxx +++ b/sfx2/source/menu/virtmenu.cxx @@ -366,7 +366,7 @@ void SfxVirtualMenu::CreateFromSVMenu() pPopup = nullptr; SfxMenuCtrlArr_Impl &rCtrlArr = GetAppCtrl_Impl(); - rCtrlArr.push_back(pMnuCtrl); + rCtrlArr.push_back(std::unique_ptr(pMnuCtrl)); (pItems+nPos)->Bind( nullptr, nSlotId, sItemText, *pBindings); pMnuCtrl->Bind( this, nSlotId, sItemText, *pBindings); @@ -409,7 +409,7 @@ void SfxVirtualMenu::CreateFromSVMenu() if ( pMnuCtrl ) { SfxMenuCtrlArr_Impl &rCtrlArr = GetAppCtrl_Impl(); - rCtrlArr.push_back(pMnuCtrl); + rCtrlArr.push_back(std::unique_ptr(pMnuCtrl)); (pItems+nPos)->Bind( nullptr, nSlotId, sItemText, *pBindings); } } @@ -421,7 +421,7 @@ void SfxVirtualMenu::CreateFromSVMenu() if ( pMnuCtrl ) { SfxMenuCtrlArr_Impl &rCtrlArr = GetAppCtrl_Impl(); - rCtrlArr.push_back(pMnuCtrl); + rCtrlArr.push_back(std::unique_ptr(pMnuCtrl)); (pItems+nPos)->Bind( nullptr, nSlotId, sItemText, *pBindings); } else @@ -691,10 +691,10 @@ void SfxVirtualMenu::BindControllers() for (SfxMenuCtrlArr_Impl::iterator i = rCtrlArr.begin(); i != rCtrlArr.end(); ++i) { - sal_uInt16 nSlotId = i->GetId(); + sal_uInt16 nSlotId = (*i)->GetId(); if (pSVMenu->GetItemCommand(nSlotId).isEmpty()) { - i->ReBind(); + (*i)->ReBind(); } } @@ -718,10 +718,10 @@ void SfxVirtualMenu::UnbindControllers() for (SfxMenuCtrlArr_Impl::iterator i = rCtrlArr.begin(); i != rCtrlArr.end(); ++i) { - if (i->IsBound()) + if ((*i)->IsBound()) { // UnoController is not bound! - i->UnBind(); + (*i)->UnBind(); } }