summaryrefslogtreecommitdiff
path: root/svx/source/dialog
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/dialog')
-rw-r--r--svx/source/dialog/imapdlg.cxx8
-rw-r--r--svx/source/dialog/imapwnd.cxx8
2 files changed, 3 insertions, 13 deletions
diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx
index 762acd83e45b..6ab22072fae6 100644
--- a/svx/source/dialog/imapdlg.cxx
+++ b/svx/source/dialog/imapdlg.cxx
@@ -284,7 +284,7 @@ void SvxIMapDlg::SetTargetList( const TargetList& rTargetList )
maCbbTarget.Clear();
for ( size_t i = 0, n = aNewList.size(); i < n; ++i )
- maCbbTarget.InsertEntry( *aNewList[ i ] );
+ maCbbTarget.InsertEntry( aNewList[ i ] );
}
void SvxIMapDlg::Update( const Graphic& rGraphic, const ImageMap* pImageMap,
@@ -301,8 +301,6 @@ void SvxIMapDlg::Update( const Graphic& rGraphic, const ImageMap* pImageMap,
// Delete UpdateTargetList, because this method can still be called several
// times before the update timer is turned on
- for ( size_t i = 0, n = pOwnData->aUpdateTargetList.size(); i < n; ++i )
- delete pOwnData->aUpdateTargetList[ i ];
pOwnData->aUpdateTargetList.clear();
// TargetList must be copied, since it is owned by the caller and can be
@@ -313,7 +311,7 @@ void SvxIMapDlg::Update( const Graphic& rGraphic, const ImageMap* pImageMap,
TargetList aTargetList( *pTargetList );
for ( size_t i = 0, n = aTargetList.size(); i < n; ++i )
- pOwnData->aUpdateTargetList.push_back( new String( *aTargetList[ i ] ) );
+ pOwnData->aUpdateTargetList.push_back( aTargetList[ i ] );
}
pOwnData->aTimer.Start();
@@ -746,8 +744,6 @@ IMPL_LINK_NOARG(SvxIMapDlg, UpdateHdl)
}
// Delete the copied list again in the Update method
- for ( size_t i = 0, n = pOwnData->aUpdateTargetList.size(); i < n; ++i )
- delete pOwnData->aUpdateTargetList[ i ];
pOwnData->aUpdateTargetList.clear();
GetBindings().Invalidate( SID_IMAP_EXEC );
diff --git a/svx/source/dialog/imapwnd.cxx b/svx/source/dialog/imapwnd.cxx
index b83a0db07931..76235e0f3adc 100644
--- a/svx/source/dialog/imapwnd.cxx
+++ b/svx/source/dialog/imapwnd.cxx
@@ -70,10 +70,6 @@ IMapWindow::IMapWindow( Window* pParent, const ResId& rResId, const Reference< X
IMapWindow::~IMapWindow()
{
- // Delete Liste
- for ( size_t i = 0, n = aTargetList.size(); i < n; ++i )
- delete aTargetList[ i ];
-
SfxItemPool::Free(pIMapPool);
delete[] pItemInfo;
}
@@ -165,13 +161,11 @@ const ImageMap& IMapWindow::GetImageMap()
void IMapWindow::SetTargetList( TargetList& rTargetList )
{
// Delete old List
- for( size_t i = 0, n = aTargetList.size(); i < n; ++i )
- delete aTargetList[ i ];
aTargetList.clear();
// Fill with the provided list
for( size_t i = 0, n = rTargetList.size(); i < n; ++i )
- aTargetList.push_back( new String( *rTargetList[ i ] ) );
+ aTargetList.push_back( rTargetList[ i ] );
pModel->SetChanged( sal_False );
}