summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-08-15 13:39:56 +0200
committerMichael Stahl <mstahl@redhat.com>2012-08-16 18:44:04 +0200
commitcdd4c1558390efd8a3740ad8fc248248972d9250 (patch)
tree21128eeda18832f439e3ce6651f933cf100a6ed8 /svx
parente5da8190e0edc476eecfe4f49aae4b50a480e414 (diff)
Convert aBuf in SdrUndoGroup class from Container to std::vector
Change-Id: I0635ed333033ce37eb86b360fd0ee0d77b8dc47a
Diffstat (limited to 'svx')
-rw-r--r--svx/inc/svx/svdundo.hxx7
-rw-r--r--svx/source/svdraw/svdundo.cxx6
2 files changed, 6 insertions, 7 deletions
diff --git a/svx/inc/svx/svdundo.hxx b/svx/inc/svx/svdundo.hxx
index 3b0436ad2d06..5451441da902 100644
--- a/svx/inc/svx/svdundo.hxx
+++ b/svx/inc/svx/svdundo.hxx
@@ -31,7 +31,6 @@
#include <svl/solar.hrc>
#include <svl/undo.hxx>
-#include <tools/contnr.hxx>
#include <tools/gen.hxx>
#include <svx/svdtypes.hxx> // fuer enum RepeatFuncts
#include <svx/svdsob.hxx>
@@ -96,7 +95,7 @@ public:
class SVX_DLLPUBLIC SdrUndoGroup : public SdrUndoAction
{
protected:
- Container aBuf;
+ std::vector<SdrUndoAction*> aBuf;
// Beschreibung der Action, nicht expandiert (beinhaltet %O)
String aComment;
@@ -109,8 +108,8 @@ public:
virtual ~SdrUndoGroup();
void Clear();
- sal_uIntPtr GetActionCount() const { return aBuf.Count(); }
- SdrUndoAction* GetAction(sal_uIntPtr nNum) const { return (SdrUndoAction*)(aBuf.GetObject(nNum)); }
+ sal_uIntPtr GetActionCount() const { return aBuf.size(); }
+ SdrUndoAction* GetAction(sal_uIntPtr nNum) const { return aBuf[nNum]; }
void AddAction(SdrUndoAction* pAct);
void SetComment(const String& rStr) { aComment=rStr; }
diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx
index b3fca80dfb3b..0a793f2436b4 100644
--- a/svx/source/svdraw/svdundo.cxx
+++ b/svx/source/svdraw/svdundo.cxx
@@ -103,7 +103,7 @@ XubString SdrUndoAction::GetSdrRepeatComment(SdrView& /*rView*/) const
SdrUndoGroup::SdrUndoGroup(SdrModel& rNewMod)
: SdrUndoAction(rNewMod),
- aBuf(1024,32,32),
+ aBuf(),
eFunction(SDRREPFUNC_OBJ_NONE)
{}
@@ -118,12 +118,12 @@ void SdrUndoGroup::Clear()
SdrUndoAction* pAct=GetAction(nu);
delete pAct;
}
- aBuf.Clear();
+ aBuf.clear();
}
void SdrUndoGroup::AddAction(SdrUndoAction* pAct)
{
- aBuf.Insert(pAct,CONTAINER_APPEND);
+ aBuf.push_back(pAct);
}
void SdrUndoGroup::Undo()