summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-08-13 15:23:04 +0200
committerMichael Stahl <mstahl@redhat.com>2012-08-13 22:48:15 +0200
commitbf70f37c9243b6c94318f093871563c8c3784aa6 (patch)
tree926a1e8948ea10c69bba7e428231bf938295e54c /sd
parent0beb6bc4b39caca5c62bdb6c17d89210119a12e5 (diff)
Convert aTimeList field in AnimationWindow from tools/list.hxx to std::vector
Change-Id: I45893027fc33ee07e4fbddec06ab8949c58ed316
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/dlg/animobjs.cxx34
-rw-r--r--sd/source/ui/inc/animobjs.hxx2
2 files changed, 18 insertions, 18 deletions
diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx
index 2bdb9b2d311d..5d2e7dfe9008 100644
--- a/sd/source/ui/dlg/animobjs.cxx
+++ b/sd/source/ui/dlg/animobjs.cxx
@@ -231,9 +231,9 @@ AnimationWindow::~AnimationWindow()
aBmpExList.Clear();
// Timeliste bereinigen
- for( i = 0, nCount = aTimeList.Count(); i < nCount; i++ )
- delete static_cast< Time* >( aTimeList.GetObject( i ) );
- aTimeList.Clear();
+ for( i = 0, nCount = aTimeList.size(); i < nCount; i++ )
+ delete aTimeList[ i ];
+ aTimeList.clear();
// die Clones loeschen
delete pMyDoc;
@@ -280,7 +280,7 @@ IMPL_LINK( AnimationWindow, ClickPlayHdl, void *, p )
if( aRbtBitmap.IsChecked() )
{
for( sal_uLong i = 0; i < nCount; i++ )
- aTime += *static_cast< Time* >( aTimeList.GetObject( i ) );
+ aTime += *aTimeList[ i ];
nFullTime = aTime.GetMSFromTime();
}
else
@@ -318,7 +318,7 @@ IMPL_LINK( AnimationWindow, ClickPlayHdl, void *, p )
if( aRbtBitmap.IsChecked() )
{
- Time* pTime = static_cast< Time* >( aTimeList.GetObject( i ) );
+ Time* pTime = aTimeList[i];
DBG_ASSERT( pTime, "Keine Zeit gefunden!" );
aTimeField.SetTime( *pTime );
@@ -400,7 +400,7 @@ IMPL_LINK( AnimationWindow, ClickRbtHdl, void *, p )
sal_uLong n = static_cast<sal_uLong>(aNumFldBitmap.GetValue());
if( n > 0 )
{
- Time* pTime = static_cast< Time* >( aTimeList.GetObject( n - 1 ) );
+ Time* pTime = aTimeList[ n - 1 ];
if( pTime )
aTimeField.SetTime( *pTime );
}
@@ -442,11 +442,11 @@ IMPL_LINK( AnimationWindow, ClickRemoveBitmapHdl, void *, pBtn )
aBmpExList.Remove();
pBitmapEx = static_cast< BitmapEx* >( aBmpExList.GetCurObject() );
}
- Time* pTime = static_cast< Time* >( aTimeList.GetObject( nPos ) );
+ Time* pTime = aTimeList[ nPos ];
if( pTime )
{
delete pTime;
- aTimeList.Remove( nPos );
+ aTimeList.erase( aTimeList.begin() + nPos );
}
pObject = pPage->GetObj( nPos );
@@ -490,12 +490,12 @@ IMPL_LINK( AnimationWindow, ClickRemoveBitmapHdl, void *, pBtn )
aBmpExList.Clear();
// Timeliste bereinigen
- nCount = aTimeList.Count();
+ nCount = aTimeList.size();
for( i = 0; i < nCount; i++ )
{
- delete static_cast< Time* >( aTimeList.GetObject( i ) );
+ delete aTimeList[ i ];
}
- aTimeList.Clear();
+ aTimeList.clear();
}
}
@@ -554,7 +554,7 @@ IMPL_LINK_NOARG(AnimationWindow, ModifyTimeHdl)
{
sal_uLong nPos = static_cast<sal_uLong>(aNumFldBitmap.GetValue() - 1);
- Time* pTime = static_cast< Time* >( aTimeList.GetObject( nPos ) );
+ Time* pTime = aTimeList[ nPos ];
DBG_ASSERT( pTime, "Zeit nicht gefunden!" );
*pTime = aTimeField.GetTime();
@@ -919,7 +919,7 @@ void AnimationWindow::AddObj (::sd::View& rView )
// Time
long nTime = rAnimBmp.nWait;
Time* pTime = new Time( 0, 0, nTime / 100, nTime % 100 );
- aTimeList.Insert( pTime, aBmpExList.GetCurPos() + 1 );
+ aTimeList.insert( aTimeList.begin() + aBmpExList.GetCurPos() + 1, pTime );
// Weiterschalten der BitmapListe
aBmpExList.Next();
@@ -944,7 +944,7 @@ void AnimationWindow::AddObj (::sd::View& rView )
// Time
Time* pTime = new Time( aTimeField.GetTime() );
- aTimeList.Insert( pTime, aBmpExList.GetCurPos() + 1 );
+ aTimeList.insert( aTimeList.begin() + aBmpExList.GetCurPos() + 1, pTime );
// Clone
pPage->InsertObject( pSnapShot->Clone(), aBmpExList.GetCurPos() + 1 );
@@ -963,7 +963,7 @@ void AnimationWindow::AddObj (::sd::View& rView )
// Time
Time* pTime = new Time( aTimeField.GetTime() );
- aTimeList.Insert( pTime, aBmpExList.GetCurPos() + 1 );
+ aTimeList.insert( aTimeList.begin() + aBmpExList.GetCurPos() + 1, pTime );
}
@@ -991,7 +991,7 @@ void AnimationWindow::AddObj (::sd::View& rView )
// Time
Time* pTime = new Time( aTimeField.GetTime() );
- aTimeList.Insert( pTime, aBmpExList.GetCurPos() + 1 );
+ aTimeList.insert( aTimeList.begin() + aBmpExList.GetCurPos() + 1, pTime );
pPage->InsertObject( pObject->Clone(), aBmpExList.GetCurPos() + 1 );
@@ -1075,7 +1075,7 @@ void AnimationWindow::CreateAnimObj (::sd::View& rView )
for( i = 0; i < nCount; i++ )
{
- Time* pTime = static_cast< Time* >( aTimeList.GetObject( i ) );
+ Time* pTime = aTimeList[i];
long nTime = pTime->Get100Sec();
nTime += pTime->GetSec() * 100;
diff --git a/sd/source/ui/inc/animobjs.hxx b/sd/source/ui/inc/animobjs.hxx
index 77ac160ee84e..7008edc13fe8 100644
--- a/sd/source/ui/inc/animobjs.hxx
+++ b/sd/source/ui/inc/animobjs.hxx
@@ -130,7 +130,7 @@ private:
::Window* pWin;
List aBmpExList;
- List aTimeList;
+ std::vector<Time*> aTimeList;
SdDrawDocument* pMyDoc;
BitmapEx* pBitmapEx;