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

Convert SV_DECL_PTRARR_DEL(SfxStbCtrlFactArr_Impl) to std::vector

Change-Id: Id2f35eba75628ed1bc1080e9671378e461e84233
üst a1cedf2b
......@@ -46,7 +46,12 @@ struct SfxTbxCtrlFactory;
SV_DECL_PTRARR_DEL( SfxTbxCtrlFactArr_Impl, SfxTbxCtrlFactory*, 8 )
struct SfxStbCtrlFactory;
SV_DECL_PTRARR_DEL( SfxStbCtrlFactArr_Impl, SfxStbCtrlFactory*, 8 )
class SfxStbCtrlFactArr_Impl : public std::vector<SfxStbCtrlFactory*>
{
public:
// de-allocates child objects
~SfxStbCtrlFactArr_Impl();
};
struct SfxMenuCtrlFactory;
class SfxMenuCtrlFactArr_Impl : public std::vector<SfxMenuCtrlFactory*>
......
......@@ -89,7 +89,6 @@ using namespace ::com::sun::star::container;
//===================================================================
SV_IMPL_PTRARR( SfxTbxCtrlFactArr_Impl, SfxTbxCtrlFactory* );
SV_IMPL_PTRARR( SfxStbCtrlFactArr_Impl, SfxStbCtrlFactory* );
//===================================================================
......@@ -293,4 +292,9 @@ SfxMenuCtrlFactArr_Impl::~SfxMenuCtrlFactArr_Impl()
delete *it;
}
SfxStbCtrlFactArr_Impl::~SfxStbCtrlFactArr_Impl()
{
for( const_iterator it = begin(); it != end(); ++it )
delete *it;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -109,7 +109,7 @@ void SfxApplication::RegisterStatusBarControl_Impl( SfxModule *pMod, SfxStbCtrlF
}
#ifdef DBG_UTIL
for ( sal_uInt16 n=0; n<pAppData_Impl->pStbCtrlFac->Count(); n++ )
for ( sal_uInt16 n=0; n<pAppData_Impl->pStbCtrlFac->size(); n++ )
{
SfxStbCtrlFactory *pF = (*pAppData_Impl->pStbCtrlFac)[n];
if ( pF->nTypeId && pF->nTypeId == pFact->nTypeId &&
......@@ -120,7 +120,7 @@ void SfxApplication::RegisterStatusBarControl_Impl( SfxModule *pMod, SfxStbCtrlF
}
#endif
pAppData_Impl->pStbCtrlFac->C40_INSERT( SfxStbCtrlFactory, pFact, pAppData_Impl->pStbCtrlFac->Count() );
pAppData_Impl->pStbCtrlFac->push_back( pFact );
}
//--------------------------------------------------------------------
......
......@@ -245,7 +245,7 @@ void SfxModule::RegisterStatusBarControl( SfxStbCtrlFactory *pFact )
pImpl->pStbCtrlFac = new SfxStbCtrlFactArr_Impl;
#ifdef DBG_UTIL
for ( sal_uInt16 n=0; n<pImpl->pStbCtrlFac->Count(); n++ )
for ( sal_uInt16 n=0; n<pImpl->pStbCtrlFac->size(); n++ )
{
SfxStbCtrlFactory *pF = (*pImpl->pStbCtrlFac)[n];
if ( pF->nTypeId && pF->nTypeId == pFact->nTypeId &&
......@@ -256,7 +256,7 @@ void SfxModule::RegisterStatusBarControl( SfxStbCtrlFactory *pFact )
}
#endif
pImpl->pStbCtrlFac->C40_INSERT( SfxStbCtrlFactory, pFact, pImpl->pStbCtrlFac->Count() );
pImpl->pStbCtrlFac->push_back( pFact );
}
//-------------------------------------------------------------------------
......
......@@ -653,7 +653,7 @@ SfxStatusBarControl* SfxStatusBarControl::CreateControl
if ( pFactories )
{
SfxStbCtrlFactArr_Impl &rFactories = *pFactories;
for ( sal_uInt16 nFactory = 0; nFactory < rFactories.Count(); ++nFactory )
for ( sal_uInt16 nFactory = 0; nFactory < rFactories.size(); ++nFactory )
if ( rFactories[nFactory]->nTypeId == aSlotType &&
( ( rFactories[nFactory]->nSlotId == 0 ) ||
( rFactories[nFactory]->nSlotId == nSlotID) ) )
......@@ -662,7 +662,7 @@ SfxStatusBarControl* SfxStatusBarControl::CreateControl
}
SfxStbCtrlFactArr_Impl &rFactories = pApp->GetStbCtrlFactories_Impl();
for ( sal_uInt16 nFactory = 0; nFactory < rFactories.Count(); ++nFactory )
for ( sal_uInt16 nFactory = 0; nFactory < rFactories.size(); ++nFactory )
if ( rFactories[nFactory]->nTypeId == aSlotType &&
( ( rFactories[nFactory]->nSlotId == 0 ) ||
( rFactories[nFactory]->nSlotId == nSlotID) ) )
......
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