summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorJoseph Powers <jpowers27@cox.net>2011-01-06 22:14:48 -0800
committerJoseph Powers <jpowers27@cox.net>2011-01-06 22:14:48 -0800
commit41ff500e3be1e49ac9a1a62da538ebe7ab6cf5da (patch)
treed543fce61a2c6b81dac4dd80e8a5ec03fb771f89 /xmloff
parenta35f518f8a568742f2313e844d15eb33c05bf9a9 (diff)
Remove DECLARE_LIST(Imp3DLightList, SdXML3DLightContext*)
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/inc/xmloff/shapeimport.hxx7
-rw-r--r--xmloff/source/draw/ximp3dscene.cxx35
2 files changed, 22 insertions, 20 deletions
diff --git a/xmloff/inc/xmloff/shapeimport.hxx b/xmloff/inc/xmloff/shapeimport.hxx
index 6354dc1b41..4473aef0f4 100644
--- a/xmloff/inc/xmloff/shapeimport.hxx
+++ b/xmloff/inc/xmloff/shapeimport.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -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
{
@@ -336,7 +337,7 @@ public:
const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList,
com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes,
const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xFrameAttrList);
- SvXMLImportContext* CreateFrameChildContext(
+ SvXMLImportContext* CreateFrameChildContext(
SvXMLImportContext *pThisContext, USHORT nPrefix, const rtl::OUString& rLocalName,
const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList );
diff --git a/xmloff/source/draw/ximp3dscene.cxx b/xmloff/source/draw/ximp3dscene.cxx
index 1af8b961ce..b97e41a2e6 100644
--- a/xmloff/source/draw/ximp3dscene.cxx
+++ b/xmloff/source/draw/ximp3dscene.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -47,10 +47,10 @@ using namespace ::xmloff::token;
//////////////////////////////////////////////////////////////////////////////
// dr3d:3dlight context
-SdXML3DLightContext::SdXML3DLightContext(
- SvXMLImport& rImport,
+SdXML3DLightContext::SdXML3DLightContext(
+ SvXMLImport& rImport,
sal_uInt16 nPrfx,
- const rtl::OUString& rLName,
+ const rtl::OUString& rLName,
const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList)
: SvXMLImportContext( rImport, nPrfx, rLName),
maDiffuseColor(0x00000000),
@@ -102,13 +102,13 @@ SdXML3DLightContext::~SdXML3DLightContext()
TYPEINIT1( SdXML3DSceneShapeContext, SdXMLShapeContext );
-SdXML3DSceneShapeContext::SdXML3DSceneShapeContext(
+SdXML3DSceneShapeContext::SdXML3DSceneShapeContext(
SvXMLImport& rImport,
- USHORT nPrfx,
+ USHORT nPrfx,
const OUString& rLocalName,
const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList,
uno::Reference< drawing::XShapes >& rShapes,
- sal_Bool bTemporaryShapes)
+ sal_Bool bTemporaryShapes)
: SdXMLShapeContext( rImport, nPrfx, rLocalName, xAttrList, rShapes, bTemporaryShapes ), SdXML3DSceneAttributesHelper( rImport )
{
}
@@ -125,7 +125,7 @@ void SdXML3DSceneShapeContext::StartElement(const uno::Reference< xml::sax::XAtt
{
// create new 3DScene shape and add it to rShapes, use it
// as base for the new 3DScene import
- AddShape( "com.sun.star.drawing.Shape3DSceneObject" );
+ AddShape( "com.sun.star.drawing.Shape3DSceneObject" );
if( mxShape.is() )
{
SetStyle();
@@ -188,7 +188,7 @@ SvXMLImportContext* SdXML3DSceneShapeContext::CreateChildContext( USHORT nPrefix
SvXMLImportContext* pContext = 0L;
// #i68101#
- if( nPrefix == XML_NAMESPACE_SVG &&
+ if( nPrefix == XML_NAMESPACE_SVG &&
(IsXMLToken( rLocalName, XML_TITLE ) || IsXMLToken( rLocalName, XML_DESC ) ) )
{
pContext = new SdXMLDescriptionContext( GetImport(), nPrefix, rLocalName, xAttrList, mxShape );
@@ -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;
@@ -292,7 +293,7 @@ void SdXML3DSceneAttributesHelper::processSceneAttribute( sal_uInt16 nPrefix, co
{
::basegfx::B3DVector aNewVec;
mrImport.GetMM100UnitConverter().convertB3DVector(aNewVec, rValue);
-
+
if(aNewVec != maVPN)
{
maVPN = aNewVec;
@@ -304,7 +305,7 @@ void SdXML3DSceneAttributesHelper::processSceneAttribute( sal_uInt16 nPrefix, co
{
::basegfx::B3DVector aNewVec;
mrImport.GetMM100UnitConverter().convertB3DVector(aNewVec, rValue);
-
+
if(aNewVec != maVUP)
{
maVUP = aNewVec;
@@ -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();