[Libreoffice-commits] .: xmloff/source
Joseph Powers
jpowers at kemper.freedesktop.org
Fri Jan 7 08:44:30 PST 2011
xmloff/source/draw/ximpstyl.cxx | 27 ++++++++++++++-------------
xmloff/source/draw/ximpstyl.hxx | 2 +-
2 files changed, 15 insertions(+), 14 deletions(-)
New commits:
commit 20c7bb186b1750dd8833f350a942b6762dc29cb1
Author: Joseph Powers <jpowers27 at cox.net>
Date: Fri Jan 7 08:44:24 2011 -0800
Remove DECLARE_LIST(ImpPlaceholderList, SdXMLPresentationPlaceholderContext*)
diff --git a/xmloff/source/draw/ximpstyl.cxx b/xmloff/source/draw/ximpstyl.cxx
index 237df6d..cfa1f9e 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 245791e..093cc17 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
More information about the Libreoffice-commits
mailing list