Kaydet (Commit) b4824c89 authored tarafından Noel Grandin's avatar Noel Grandin

convert includes/sfx2/frame.hxx from String to OUString

Change-Id: Ia69548250beb2896cab8c19fe2e635fdc9162f4d
üst aca6fd65
......@@ -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") );
......
......@@ -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 ) );
}
}
}
......
......@@ -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
......
......@@ -51,7 +51,7 @@ class ImageMap;
\************************************************************************/
class Graphic;
typedef ::std::vector< String* > TargetList;
typedef ::std::vector< OUString > TargetList;
class SVX_DLLPUBLIC SvxIMapDlgChildWindow : public SfxChildWindow
{
......
......@@ -54,7 +54,7 @@ class Graphic;
class SdrObject;
class SvxSpellWrapper;
typedef ::std::vector< String* > TargetList;
typedef ::std::vector< OUString > TargetList;
namespace svx{ class SpellDialogChildWindow;}
......
......@@ -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 ];
}
}
......
......@@ -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;
}
}
......
......@@ -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();
......
......@@ -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 );
......
......@@ -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 );
}
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
}
......
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