summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorJoseph Powers <jpowers27@cox.net>2011-07-11 05:34:30 -0700
committerJoseph Powers <jpowers27@cox.net>2011-07-11 05:35:06 -0700
commit0a01387f059357600cf3dbccdab65cdae517c709 (patch)
tree9bb50d8093d7652525a31e83a9cdb9612112c191 /toolkit
parent426aecc30ee6ab987a69a31ffc40779f69b2d8f0 (diff)
Replace List with std::vector< VCLXGraphics* >
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/source/awt/vclxgraphics.cxx16
-rw-r--r--toolkit/source/helper/unowrapper.cxx6
2 files changed, 15 insertions, 7 deletions
diff --git a/toolkit/source/awt/vclxgraphics.cxx b/toolkit/source/awt/vclxgraphics.cxx
index dc2c84702664..8f29a5e5e86f 100644
--- a/toolkit/source/awt/vclxgraphics.cxx
+++ b/toolkit/source/awt/vclxgraphics.cxx
@@ -73,9 +73,17 @@ VCLXGraphics::VCLXGraphics()
VCLXGraphics::~VCLXGraphics()
{
- List* pLst = mpOutputDevice ? mpOutputDevice->GetUnoGraphicsList() : NULL;
+ VCLXGraphicsList_impl* pLst = mpOutputDevice ? mpOutputDevice->GetUnoGraphicsList() : NULL;
if ( pLst )
- pLst->Remove( this );
+ {
+ for( VCLXGraphicsList_impl::iterator it = pLst->begin(); it < pLst->end(); ++it )
+ {
+ if( *it == this ) {
+ pLst->erase( it );
+ break;
+ }
+ }
+ }
delete mpClipRegion;
}
@@ -100,10 +108,10 @@ void VCLXGraphics::Init( OutputDevice* pOutDev )
mpClipRegion = NULL;
// Register at OutputDevice
- List* pLst = mpOutputDevice->GetUnoGraphicsList();
+ VCLXGraphicsList_impl* pLst = mpOutputDevice->GetUnoGraphicsList();
if ( !pLst )
pLst = mpOutputDevice->CreateUnoGraphicsList();
- pLst->Insert( this, LIST_APPEND );
+ pLst->push_back( this );
}
void VCLXGraphics::InitOutputDevice( sal_uInt16 nFlags )
diff --git a/toolkit/source/helper/unowrapper.cxx b/toolkit/source/helper/unowrapper.cxx
index b5abb11d632e..cc4992d250e0 100644
--- a/toolkit/source/helper/unowrapper.cxx
+++ b/toolkit/source/helper/unowrapper.cxx
@@ -206,12 +206,12 @@ void UnoWrapper::SetWindowInterface( Window* pWindow, ::com::sun::star::uno::Ref
void UnoWrapper::ReleaseAllGraphics( OutputDevice* pOutDev )
{
- List* pLst = pOutDev->GetUnoGraphicsList();
+ VCLXGraphicsList_impl* pLst = pOutDev->GetUnoGraphicsList();
if ( pLst )
{
- for ( sal_uInt32 n = 0; n < pLst->Count(); n++ )
+ for ( size_t n = 0; n < pLst->size(); n++ )
{
- VCLXGraphics* pGrf = (VCLXGraphics*)pLst->GetObject( n );
+ VCLXGraphics* pGrf = (*pLst)[ n ];
pGrf->SetOutputDevice( NULL );
}
}