summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorJoseph Powers <jpowers27@cox.net>2011-01-07 08:44:24 -0800
committerJoseph Powers <jpowers27@cox.net>2011-01-07 08:44:24 -0800
commit9d276e3451b2d69f8736d3eef55efea77a403953 (patch)
tree0e868eaaad5debb169323d5911dcee6ed1c2cde0 /xmloff
parent419c5a29e68c5a5c6fdd176540188d753e319aeb (diff)
Remove DECLARE_LIST(ImpPlaceholderList, SdXMLPresentationPlaceholderContext*)
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/draw/ximpstyl.cxx27
-rw-r--r--xmloff/source/draw/ximpstyl.hxx2
2 files changed, 15 insertions, 14 deletions
diff --git a/xmloff/source/draw/ximpstyl.cxx b/xmloff/source/draw/ximpstyl.cxx
index b3fee8611753..51c3d8b7de1d 100644
--- a/xmloff/source/draw/ximpstyl.cxx
+++ b/xmloff/source/draw/ximpstyl.cxx
@@ -526,7 +526,7 @@ SvXMLImportContext *SdXMLPresentationPageLayoutContext::CreateChildContext(
if(pContext)
{
pContext->AddRef();
- maList.Insert((SdXMLPresentationPlaceholderContext*)pContext, LIST_APPEND);
+ maList.push_back( (SdXMLPresentationPlaceholderContext*)pContext );
}
}
@@ -542,12 +542,12 @@ void SdXMLPresentationPageLayoutContext::EndElement()
// build presentation page layout type here
// calc mnTpeId due to content of maList
// at the moment only use number of types used there
- if(maList.Count())
+ if( !maList.empty() )
{
- SdXMLPresentationPlaceholderContext* pObj0 = maList.GetObject(0);
+ SdXMLPresentationPlaceholderContext* pObj0 = maList[ 0 ];
if(pObj0->GetName().equals(OUString(RTL_CONSTASCII_USTRINGPARAM("handout"))))
{
- switch( maList.Count() )
+ switch( maList.size() )
{
case 1:
mnTypeId = 22; // AUTOLAYOUT_HANDOUT1
@@ -570,7 +570,7 @@ void SdXMLPresentationPageLayoutContext::EndElement()
}
else
{
- switch(maList.Count())
+ switch( maList.size() )
{
case 1:
{
@@ -586,7 +586,7 @@ void SdXMLPresentationPageLayoutContext::EndElement()
}
case 2:
{
- SdXMLPresentationPlaceholderContext* pObj1 = maList.GetObject(1);
+ SdXMLPresentationPlaceholderContext* pObj1 = maList[ 1 ];
if(pObj1->GetName().equals(
OUString(RTL_CONSTASCII_USTRINGPARAM("subtitle"))))
@@ -635,8 +635,8 @@ void SdXMLPresentationPageLayoutContext::EndElement()
}
case 3:
{
- SdXMLPresentationPlaceholderContext* pObj1 = maList.GetObject(1);
- SdXMLPresentationPlaceholderContext* pObj2 = maList.GetObject(2);
+ SdXMLPresentationPlaceholderContext* pObj1 = maList[ 1 ];
+ SdXMLPresentationPlaceholderContext* pObj2 = maList[ 2 ];
if(pObj1->GetName().equals(
OUString(RTL_CONSTASCII_USTRINGPARAM("outline"))))
@@ -707,8 +707,8 @@ void SdXMLPresentationPageLayoutContext::EndElement()
}
case 4:
{
- SdXMLPresentationPlaceholderContext* pObj1 = maList.GetObject(1);
- SdXMLPresentationPlaceholderContext* pObj2 = maList.GetObject(2);
+ SdXMLPresentationPlaceholderContext* pObj1 = maList[ 1 ];
+ SdXMLPresentationPlaceholderContext* pObj2 = maList[ 2 ];
if(pObj1->GetName().equals(
OUString(RTL_CONSTASCII_USTRINGPARAM("object"))))
@@ -730,7 +730,7 @@ void SdXMLPresentationPageLayoutContext::EndElement()
}
case 5:
{
- SdXMLPresentationPlaceholderContext* pObj1 = maList.GetObject(1);
+ SdXMLPresentationPlaceholderContext* pObj1 = maList[ 1 ];
if(pObj1->GetName().equals(
OUString(RTL_CONSTASCII_USTRINGPARAM("object"))))
@@ -758,8 +758,9 @@ void SdXMLPresentationPageLayoutContext::EndElement()
}
// release remembered 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();
}
}
diff --git a/xmloff/source/draw/ximpstyl.hxx b/xmloff/source/draw/ximpstyl.hxx
index a11827d1d9cb..1eaad1df4bac 100644
--- a/xmloff/source/draw/ximpstyl.hxx
+++ b/xmloff/source/draw/ximpstyl.hxx
@@ -165,7 +165,7 @@ public:
sal_Int32 GetWidth() const { return mnWidth; }
sal_Int32 GetHeight() const { return mnHeight; }
};
-DECLARE_LIST(ImpPlaceholderList, SdXMLPresentationPlaceholderContext*)
+typedef ::std::vector< SdXMLPresentationPlaceholderContext* > ImpPlaceholderList;
//////////////////////////////////////////////////////////////////////////////
// style:presentation-page-layout context