diff options
author | Joseph Powers <jpowers27@cox.net> | 2011-01-06 22:14:48 -0800 |
---|---|---|
committer | Joseph Powers <jpowers27@cox.net> | 2011-01-06 22:14:48 -0800 |
commit | d590e9e07fcb248e762adb8af755a36cebf3016d (patch) | |
tree | 85dccdb8e7e7224c40f69a9c8991c2cbbe5d083f /xmloff | |
parent | c5e997d640cd3ff387793de9080f3eee978d0881 (diff) |
Remove DECLARE_LIST(Imp3DLightList, SdXML3DLightContext*)
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/inc/xmloff/shapeimport.hxx | 3 | ||||
-rw-r--r-- | xmloff/source/draw/ximp3dscene.cxx | 13 |
2 files changed, 9 insertions, 7 deletions
diff --git a/xmloff/inc/xmloff/shapeimport.hxx b/xmloff/inc/xmloff/shapeimport.hxx index 07ef44fd7d3b..326c80931c0b 100644 --- a/xmloff/inc/xmloff/shapeimport.hxx +++ b/xmloff/inc/xmloff/shapeimport.hxx @@ -44,6 +44,7 @@ #include "xmloff/table/XMLTableImport.hxx" #include <basegfx/vector/b3dvector.hxx> +#include <vector> class SvXMLImport; class SvXMLImportContext; @@ -209,7 +210,7 @@ public: ////////////////////////////////////////////////////////////////////////////// -DECLARE_LIST(Imp3DLightList, SdXML3DLightContext*) +typedef ::std::vector< SdXML3DLightContext* > Imp3DLightList; class SdXML3DSceneAttributesHelper { diff --git a/xmloff/source/draw/ximp3dscene.cxx b/xmloff/source/draw/ximp3dscene.cxx index 3916fd528cbb..c84bf1c09e08 100644 --- a/xmloff/source/draw/ximp3dscene.cxx +++ b/xmloff/source/draw/ximp3dscene.cxx @@ -245,8 +245,9 @@ SdXML3DSceneAttributesHelper::SdXML3DSceneAttributesHelper( SvXMLImport& rImport SdXML3DSceneAttributesHelper::~SdXML3DSceneAttributesHelper() { // release remembered light contexts, they are no longer needed - while(maList.Count()) - maList.Remove(maList.Count() - 1)->ReleaseRef(); + for ( size_t i = maList.size(); i > 0; ) + maList[ --i ]->ReleaseRef(); + maList.clear(); } /** creates a 3d ligth context and adds it to the internal list for later processing */ @@ -258,7 +259,7 @@ SvXMLImportContext * SdXML3DSceneAttributesHelper::create3DLightContext( sal_uIn if(pContext) { pContext->AddRef(); - maList.Insert((SdXML3DLightContext*)pContext, LIST_APPEND); + maList.push_back( (SdXML3DLightContext*)pContext ); } return pContext; @@ -396,15 +397,15 @@ void SdXML3DSceneAttributesHelper::setSceneAttributes( const com::sun::star::uno aAny <<= mbLightingMode; xPropSet->setPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("D3DSceneTwoSidedLighting")), aAny); - if(maList.Count()) + if( !maList.empty() ) { uno::Any aAny2; uno::Any aAny3; // set lights - for(sal_uInt32 a(0L); a < maList.Count(); a++) + for( size_t a = 0; a < maList.size(); a++) { - SdXML3DLightContext* pCtx = (SdXML3DLightContext*)maList.GetObject(a); + SdXML3DLightContext* pCtx = (SdXML3DLightContext*)maList[ a ]; // set anys aAny <<= pCtx->GetDiffuseColor().GetColor(); |