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

Convert SV_DECL_PTRARR(SfxModuleArr_Impl) to std::vector

Change-Id: I905d17fbbda11199065237b396c52bacc481e414
üst 7f91d56e
......@@ -59,7 +59,7 @@ public:
};
class SfxModule;
SV_DECL_PTRARR( SfxModuleArr_Impl, SfxModule*, 2 )
typedef ::std::vector<SfxModule*> SfxModuleArr_Impl;
class SfxFrame;
typedef ::std::vector<SfxFrame*> SfxFrameArr_Impl;
......
......@@ -89,7 +89,8 @@ class StarBASIC;
class SfxWorkWindow;
class SfxFilterMatcher;
class SfxModule;
class SfxModuleArr_Impl;
class SfxModule;
typedef ::std::vector<SfxModule*> SfxModuleArr_Impl;
class Window;
class INetURLObject;
struct SfxConstant;
......
......@@ -36,6 +36,7 @@
#include <sal/types.h>
#include <tools/fldunit.hxx>
#include <com/sun/star/uno/Reference.hxx>
#include <vector>
class ImageList;
......@@ -43,7 +44,8 @@ class SfxBindings;
class SfxObjectFactory;
class ModalDialog;
class SfxObjectFactory;
class SfxModuleArr_Impl;
class SfxModule;
typedef ::std::vector<SfxModule*> SfxModuleArr_Impl;
class SfxModule_Impl;
class SfxSlotPool;
struct SfxChildWinContextFactory;
......
......@@ -91,7 +91,6 @@ using namespace ::com::sun::star::container;
SV_IMPL_PTRARR( SfxTbxCtrlFactArr_Impl, SfxTbxCtrlFactory* );
SV_IMPL_PTRARR( SfxStbCtrlFactArr_Impl, SfxStbCtrlFactory* );
SV_IMPL_PTRARR( SfxMenuCtrlFactArr_Impl, SfxMenuCtrlFactory* );
SV_IMPL_PTRARR( SfxModuleArr_Impl, SfxModule* );
//===================================================================
......
......@@ -144,7 +144,7 @@ void SfxModule::Construct_Impl()
SfxApplication *pApp = SFX_APP();
SfxModuleArr_Impl& rArr = GetModules_Impl();
SfxModule* pPtr = (SfxModule*)this;
rArr.C40_INSERT( SfxModule, pPtr, rArr.Count() );
rArr.push_back( pPtr );
pImpl = new SfxModule_Impl;
pImpl->pSlotPool = new SfxSlotPool( &pApp->GetAppSlotPool_Impl(), pResMgr );
......@@ -170,11 +170,11 @@ SfxModule::~SfxModule()
// The module will be destroyed before the Deinitialize,
// so remove from the array
SfxModuleArr_Impl& rArr = GetModules_Impl();
for( sal_uInt16 nPos = rArr.Count(); nPos--; )
for( sal_uInt16 nPos = rArr.size(); nPos--; )
{
if( rArr[ nPos ] == this )
{
rArr.Remove( nPos );
rArr.erase( rArr.begin() + nPos );
break;
}
}
......@@ -331,9 +331,9 @@ void SfxModule::DestroyModules_Impl()
if ( pModules )
{
SfxModuleArr_Impl& rModules = *pModules;
for( sal_uInt16 nPos = rModules.Count(); nPos--; )
for( sal_uInt16 nPos = rModules.size(); nPos--; )
{
SfxModule* pMod = rModules.GetObject(nPos);
SfxModule* pMod = rModules[nPos];
delete pMod;
}
delete pModules, pModules = 0;
......
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