summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-08-15 15:34:15 +0200
committerMichael Stahl <mstahl@redhat.com>2012-08-16 18:44:06 +0200
commit0331e26fc6304dc16c876cde0e9a939cfe56bd53 (patch)
tree0c45eb4802a75b794e3526442719b176776c1ba8 /sd
parentf482c9fdf3656d4ee80cfb48e342dbedfcab2467 (diff)
Convert from Container to std::vector
Change-Id: I329867ff6719a2c5a8fd4dca0a4907551be450e2
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/view/sdview3.cxx20
1 files changed, 10 insertions, 10 deletions
diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx
index 511dde2e2925..80c408d8ae6a 100644
--- a/sd/source/ui/view/sdview3.cxx
+++ b/sd/source/ui/view/sdview3.cxx
@@ -112,12 +112,12 @@ struct ImpRememberOrigAndClone
SdrObject* pClone;
};
-SdrObject* ImpGetClone(Container& aConnectorContainer, SdrObject* pConnObj)
+SdrObject* ImpGetClone(std::vector<ImpRememberOrigAndClone*>& aConnectorContainer, SdrObject* pConnObj)
{
- for(sal_uInt32 a(0); a < aConnectorContainer.Count(); a++)
+ for(sal_uInt32 a(0); a < aConnectorContainer.size(); a++)
{
- if(pConnObj == ((ImpRememberOrigAndClone*)aConnectorContainer.GetObject(a))->pOrig)
- return ((ImpRememberOrigAndClone*)aConnectorContainer.GetObject(a))->pClone;
+ if(pConnObj == aConnectorContainer[a]->pOrig)
+ return aConnectorContainer[a]->pClone;
}
return 0L;
}
@@ -438,7 +438,7 @@ sal_Bool View::InsertData( const TransferableDataHelper& rDataHelper,
pMarkList->ForceSort();
// stuff to remember originals and clones
- Container aConnectorContainer(0);
+ std::vector<ImpRememberOrigAndClone*> aConnectorContainer;
sal_uInt32 a, nConnectorCount(0L);
Point aCurPos;
@@ -483,7 +483,7 @@ sal_Bool View::InsertData( const TransferableDataHelper& rDataHelper,
ImpRememberOrigAndClone* pRem = new ImpRememberOrigAndClone;
pRem->pOrig = pM->GetMarkedSdrObj();
pRem->pClone = pObj;
- aConnectorContainer.Insert(pRem, CONTAINER_APPEND);
+ aConnectorContainer.push_back(pRem);
if(pObj->ISA(SdrEdgeObj))
nConnectorCount++;
@@ -493,9 +493,9 @@ sal_Bool View::InsertData( const TransferableDataHelper& rDataHelper,
// try to re-establish connections at clones
if(nConnectorCount)
{
- for(a = 0; a < aConnectorContainer.Count(); a++)
+ for(a = 0; a < aConnectorContainer.size(); a++)
{
- ImpRememberOrigAndClone* pRem = (ImpRememberOrigAndClone*)aConnectorContainer.GetObject(a);
+ ImpRememberOrigAndClone* pRem = aConnectorContainer[a];
if(pRem->pClone->ISA(SdrEdgeObj))
{
@@ -570,8 +570,8 @@ sal_Bool View::InsertData( const TransferableDataHelper& rDataHelper,
}
// cleanup remember classes
- for(a = 0; a < aConnectorContainer.Count(); a++)
- delete (ImpRememberOrigAndClone*)aConnectorContainer.GetObject(a);
+ for(a = 0; a < aConnectorContainer.size(); a++)
+ delete aConnectorContainer[a];
if( pMarkList != mpDragSrcMarkList )
delete pMarkList;