[Libreoffice-commits] .: binfilter/bf_xmloff
Joseph Powers
jpowers at kemper.freedesktop.org
Wed Jan 12 20:47:32 PST 2011
binfilter/bf_xmloff/source/draw/ximpstyl.hxx | 2 -
binfilter/bf_xmloff/source/draw/xmloff_ximpstyl.cxx | 25 ++++++++++----------
2 files changed, 14 insertions(+), 13 deletions(-)
New commits:
commit a0fc265e4ebd99db1c6ad5d058c973648c1530ad
Author: Joseph Powers <jpowers27 at cox.net>
Date: Wed Jan 12 20:38:26 2011 -0800
Remove DECLARE_LIST(ImpPlaceholderList, SdXMLPresentationPlaceholderContext*)
diff --git a/binfilter/bf_xmloff/source/draw/ximpstyl.hxx b/binfilter/bf_xmloff/source/draw/ximpstyl.hxx
index 26f752e..2dffc9a 100644
--- a/binfilter/bf_xmloff/source/draw/ximpstyl.hxx
+++ b/binfilter/bf_xmloff/source/draw/ximpstyl.hxx
@@ -168,7 +168,7 @@ public:
sal_Int32 GetWidth() const { return mnWidth; }
sal_Int32 GetHeight() const { return mnHeight; }
};
-DECLARE_LIST(ImpPlaceholderList, SdXMLPresentationPlaceholderContext*)//STRIP008 ;
+typedef ::std::vector< SdXMLPresentationPlaceholderContext* > ImpPlaceholderList;
//////////////////////////////////////////////////////////////////////////////
// style:presentation-page-layout context
diff --git a/binfilter/bf_xmloff/source/draw/xmloff_ximpstyl.cxx b/binfilter/bf_xmloff/source/draw/xmloff_ximpstyl.cxx
index fa3d37c..a191f28 100644
--- a/binfilter/bf_xmloff/source/draw/xmloff_ximpstyl.cxx
+++ b/binfilter/bf_xmloff/source/draw/xmloff_ximpstyl.cxx
@@ -432,7 +432,7 @@ SvXMLImportContext *SdXMLPresentationPageLayoutContext::CreateChildContext(
if(pContext)
{
pContext->AddRef();
- maList.Insert((SdXMLPresentationPlaceholderContext*)pContext, LIST_APPEND);
+ maList.push_back( (SdXMLPresentationPlaceholderContext*)pContext );
}
}
@@ -448,12 +448,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
@@ -473,7 +473,7 @@ void SdXMLPresentationPageLayoutContext::EndElement()
}
else
{
- switch(maList.Count())
+ switch( maList.size() )
{
case 1:
{
@@ -482,7 +482,7 @@ void SdXMLPresentationPageLayoutContext::EndElement()
}
case 2:
{
- SdXMLPresentationPlaceholderContext* pObj1 = maList.GetObject(1);
+ SdXMLPresentationPlaceholderContext* pObj1 = maList[ 1 ];
if(pObj1->GetName().equals(
OUString(RTL_CONSTASCII_USTRINGPARAM("subtitle"))))
@@ -531,8 +531,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"))))
@@ -603,8 +603,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"))))
@@ -633,8 +633,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 = 0, n = maList.size(); i < n; ++i )
+ maList[ i ]->ReleaseRef();
+ maList.clear();
}
}
More information about the Libreoffice-commits
mailing list