summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cui/source/dialogs/cuiimapwnd.cxx2
-rw-r--r--cui/source/dialogs/hltpbase.cxx6
-rw-r--r--include/sfx2/frame.hxx2
-rw-r--r--include/svx/imapdlg.hxx2
-rw-r--r--include/svx/svxdlg.hxx2
-rw-r--r--sc/source/ui/view/drawvie3.cxx4
-rw-r--r--sd/source/ui/view/drviewsc.cxx2
-rw-r--r--sfx2/source/view/frame.cxx10
-rw-r--r--svx/source/dialog/imapdlg.cxx8
-rw-r--r--svx/source/dialog/imapwnd.cxx8
-rw-r--r--sw/source/ui/chrdlg/chardlg.cxx9
-rw-r--r--sw/source/ui/frmdlg/frmpage.cxx6
-rw-r--r--sw/source/ui/shells/basesh.cxx2
13 files changed, 16 insertions, 47 deletions
diff --git a/cui/source/dialogs/cuiimapwnd.cxx b/cui/source/dialogs/cuiimapwnd.cxx
index 1c9e971f9f3b..7f1455d921f8 100644
--- a/cui/source/dialogs/cuiimapwnd.cxx
+++ b/cui/source/dialogs/cuiimapwnd.cxx
@@ -65,7 +65,7 @@ URLDlg::URLDlg( Window* pWindow, const String& rURL, const String& rAlternativeT
m_pEdtName->SetText( rName );
for( size_t i = 0, n = rTargetList.size(); i < n; ++i )
- m_pCbbTargets->InsertEntry( *rTargetList[ i ] );
+ m_pCbbTargets->InsertEntry( rTargetList[ i ] );
if( !rTarget.Len() )
m_pCbbTargets->SetText( OUString("_self") );
diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx
index 773b82136349..2ede80c294dc 100644
--- a/cui/source/dialogs/hltpbase.cxx
+++ b/cui/source/dialogs/hltpbase.cxx
@@ -58,11 +58,7 @@ SvxFramesComboBox::SvxFramesComboBox ( Window* pParent, const ResId& rResId,
size_t i;
for ( i = 0; i < nCount; i++ )
{
- InsertEntry( *pList->at( i ) );
- }
- for ( i = nCount; i; )
- {
- delete pList->at( --i );
+ InsertEntry( pList->at( i ) );
}
}
}
diff --git a/include/sfx2/frame.hxx b/include/sfx2/frame.hxx
index 5d5554e52174..7bff40381ee9 100644
--- a/include/sfx2/frame.hxx
+++ b/include/sfx2/frame.hxx
@@ -81,7 +81,7 @@ class SystemWindow;
class SfxFrame;
typedef ::std::vector<SfxFrame*> SfxFrameArr_Impl;
-typedef ::std::vector< String* > TargetList;
+typedef ::std::vector<OUString> TargetList;
#define SFXFRAME_HASTITLE 0x0001
diff --git a/include/svx/imapdlg.hxx b/include/svx/imapdlg.hxx
index 9afd8b01a6fa..5c1fdfd90106 100644
--- a/include/svx/imapdlg.hxx
+++ b/include/svx/imapdlg.hxx
@@ -51,7 +51,7 @@ class ImageMap;
\************************************************************************/
class Graphic;
-typedef ::std::vector< String* > TargetList;
+typedef ::std::vector< OUString > TargetList;
class SVX_DLLPUBLIC SvxIMapDlgChildWindow : public SfxChildWindow
{
diff --git a/include/svx/svxdlg.hxx b/include/svx/svxdlg.hxx
index 42da4c5c7f91..f42d3cb5b269 100644
--- a/include/svx/svxdlg.hxx
+++ b/include/svx/svxdlg.hxx
@@ -54,7 +54,7 @@ class Graphic;
class SdrObject;
class SvxSpellWrapper;
-typedef ::std::vector< String* > TargetList;
+typedef ::std::vector< OUString > TargetList;
namespace svx{ class SpellDialogChildWindow;}
diff --git a/sc/source/ui/view/drawvie3.cxx b/sc/source/ui/view/drawvie3.cxx
index f65a0d40237d..6d38e04b6fe4 100644
--- a/sc/source/ui/view/drawvie3.cxx
+++ b/sc/source/ui/view/drawvie3.cxx
@@ -219,10 +219,6 @@ void ScDrawView::UpdateIMap( SdrObject* pObj )
}
ScIMapDlgSet( aGraphic, pImageMap, &aTargetList, pObj ); // aus imapwrap
-
- // TargetListe kann von uns wieder geloescht werden
- for ( size_t i = 0, n = aTargetList.size(); i < n; ++i )
- delete aTargetList[ i ];
}
}
diff --git a/sd/source/ui/view/drviewsc.cxx b/sd/source/ui/view/drviewsc.cxx
index 3649dea72fc9..4cdcdfc127b3 100644
--- a/sd/source/ui/view/drviewsc.cxx
+++ b/sd/source/ui/view/drviewsc.cxx
@@ -350,8 +350,6 @@ void DrawViewShell::UpdateIMapDlg( SdrObject* pObj )
// We can delete the target list
if ( pTargetList )
{
- for ( size_t i = 0, n = pTargetList->size(); i < n; ++i )
- delete pTargetList->at( i );
delete pTargetList;
}
}
diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx
index 8476a92e8c31..674bc0f8d0de 100644
--- a/sfx2/source/view/frame.cxx
+++ b/sfx2/source/view/frame.cxx
@@ -467,11 +467,11 @@ void SfxFrame::GetTargetList( TargetList& rList ) const
if ( !GetParentFrame() )
{
// An empty string for 'No Target'
- rList.push_back( new String() );
- rList.push_back( new String( "_top" ) );
- rList.push_back( new String( "_parent" ) );
- rList.push_back( new String( "_blank" ) );
- rList.push_back( new String( "_self" ) );
+ rList.push_back( String() );
+ rList.push_back( String( "_top" ) );
+ rList.push_back( String( "_parent" ) );
+ rList.push_back( String( "_blank" ) );
+ rList.push_back( String( "_self" ) );
}
SfxViewFrame* pView = GetCurrentViewFrame();
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 );
}
diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx
index 5fccdce8c52a..fea0de728ba0 100644
--- a/sw/source/ui/chrdlg/chardlg.cxx
+++ b/sw/source/ui/chrdlg/chardlg.cxx
@@ -177,15 +177,10 @@ SwCharURLPage::SwCharURLPage(Window* pParent, const SfxItemSet& rCoreSet)
if ( !pList->empty() )
{
size_t nCount = pList->size();
- size_t i;
- for ( i = 0; i < nCount; i++ )
+ for ( size_t i = 0; i < nCount; i++ )
{
- m_pTargetFrmLB->InsertEntry( *pList->at( i ) );
- }
- for ( i = nCount; i; )
- {
- delete pList->at( --i );
+ m_pTargetFrmLB->InsertEntry( pList->at( i ) );
}
}
delete pList;
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index 02a14cd47504..cae822c4ac83 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -2709,11 +2709,7 @@ void SwFrmURLPage::Reset( const SfxItemSet &rSet )
size_t nCount = pList->size();
for ( size_t i = 0; i < nCount; i++ )
{
- pFrameCB->InsertEntry( *pList->at( i ) );
- }
- for ( size_t i = nCount; i; )
- {
- delete pList->at( --i );
+ pFrameCB->InsertEntry( pList->at( i ) );
}
}
delete pList;
diff --git a/sw/source/ui/shells/basesh.cxx b/sw/source/ui/shells/basesh.cxx
index 9e67bc1fb4d2..e8764a8e7afc 100644
--- a/sw/source/ui/shells/basesh.cxx
+++ b/sw/source/ui/shells/basesh.cxx
@@ -166,8 +166,6 @@ static void lcl_UpdateIMapDlg( SwWrtShell& rSh )
SvxIMapDlgChildWindow::UpdateIMapDlg(
aGrf, rURL.GetMap(), pList, pEditObj );
- for ( size_t i = 0, n = pList->size(); i < n; ++i )
- delete pList->at( i );
delete pList;
}