summaryrefslogtreecommitdiff
path: root/sd/source/core
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-08-08 12:29:34 +0200
committerTor Lillqvist <tlillqvist@suse.com>2012-08-08 13:54:06 +0300
commitb10a5e4c3c3e0c95abd1f8b3d102c506b7e54c29 (patch)
tree0a6569fa2aed37898f8aa2fd3d438c3941a1855f /sd/source/core
parent720a130b29e24c5e3b8bfc97a046c1a41694ab8f (diff)
STL'ify CustomShowList
Create SdCustomShowList class to replace usage of tools/list.hxx Change-Id: I0e57e29c8ee9ac8d693fee0edb084ded5286c141
Diffstat (limited to 'sd/source/core')
-rw-r--r--sd/source/core/drawdoc.cxx5
-rw-r--r--sd/source/core/drawdoc3.cxx7
-rw-r--r--sd/source/core/drawdoc_animations.cxx5
3 files changed, 10 insertions, 7 deletions
diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx
index 7d4cc74c6925..6ddcda448750 100644
--- a/sd/source/core/drawdoc.cxx
+++ b/sd/source/core/drawdoc.cxx
@@ -82,6 +82,7 @@
#include "sdiocmpt.hxx"
#include "sdresid.hxx"
#include "cusshow.hxx"
+#include "customshowlist.hxx"
#include "../ui/inc/DrawDocShell.hxx"
#include "../ui/inc/GraphicDocShell.hxx"
#include "../ui/inc/sdxfer.hxx"
@@ -414,10 +415,10 @@ SdDrawDocument::~SdDrawDocument()
if (mpCustomShowList)
{
- for (sal_uLong j = 0; j < mpCustomShowList->Count(); j++)
+ for (sal_uLong j = 0; j < mpCustomShowList->size(); j++)
{
// Ggf. CustomShows loeschen
- SdCustomShow* pCustomShow = (SdCustomShow*) mpCustomShowList->GetObject(j);
+ SdCustomShow* pCustomShow = (*mpCustomShowList)[j];
delete pCustomShow;
}
diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx
index 1c7154f19282..27e9197c0cd6 100644
--- a/sd/source/core/drawdoc3.cxx
+++ b/sd/source/core/drawdoc3.cxx
@@ -58,6 +58,7 @@
#include "sdiocmpt.hxx"
#include "strmname.h"
#include "anminfo.hxx"
+#include "customshowlist.hxx"
#include "../ui/inc/unmovss.hxx"
#include "../ui/inc/unchss.hxx"
@@ -1190,15 +1191,15 @@ void SdDrawDocument::SetAllocDocSh(sal_Bool bAlloc)
|*
\************************************************************************/
-List* SdDrawDocument::GetCustomShowList(sal_Bool bCreate)
+SdCustomShowList* SdDrawDocument::GetCustomShowList(sal_Bool bCreate)
{
if (!mpCustomShowList && bCreate)
{
// Liste erzeugen
- mpCustomShowList = new List();
+ mpCustomShowList = new SdCustomShowList;
}
- return(mpCustomShowList);
+ return mpCustomShowList;
}
/*************************************************************************
diff --git a/sd/source/core/drawdoc_animations.cxx b/sd/source/core/drawdoc_animations.cxx
index 375dd4d6296e..e0f166ef53c1 100644
--- a/sd/source/core/drawdoc_animations.cxx
+++ b/sd/source/core/drawdoc_animations.cxx
@@ -29,6 +29,7 @@
#include "drawdoc.hxx"
#include "cusshow.hxx"
+#include "customshowlist.hxx"
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::presentation;
@@ -40,9 +41,9 @@ void SdDrawDocument::ReplacePageInCustomShows( const SdPage* pOldPage, const SdP
{
if ( mpCustomShowList )
{
- for (sal_uLong i = 0; i < mpCustomShowList->Count(); i++)
+ for (sal_uLong i = 0; i < mpCustomShowList->size(); i++)
{
- SdCustomShow* pCustomShow = (SdCustomShow*) mpCustomShowList->GetObject(i);
+ SdCustomShow* pCustomShow = (*mpCustomShowList)[i];
pCustomShow->ReplacePage(pOldPage, pNewPage);
}
}