[Libreoffice-commits] .: binfilter/bf_xmloff
Joseph Powers
jpowers at kemper.freedesktop.org
Wed Jan 12 21:26:21 PST 2011
binfilter/bf_xmloff/source/draw/sdxmlexp_impl.hxx | 3 +-
binfilter/bf_xmloff/source/draw/xmloff_sdxmlexp.cxx | 25 +++++++++-----------
2 files changed, 14 insertions(+), 14 deletions(-)
New commits:
commit 455f52189f5175aec29cf844b8baa90031001efb
Author: Joseph Powers <jpowers27 at cox.net>
Date: Wed Jan 12 21:21:40 2011 -0800
Remove DECLARE_LIST(ImpXMLAutoLayoutInfoList, ImpXMLAutoLayoutInfo*)
diff --git a/binfilter/bf_xmloff/source/draw/sdxmlexp_impl.hxx b/binfilter/bf_xmloff/source/draw/sdxmlexp_impl.hxx
index 91cd670..36a3523 100644
--- a/binfilter/bf_xmloff/source/draw/sdxmlexp_impl.hxx
+++ b/binfilter/bf_xmloff/source/draw/sdxmlexp_impl.hxx
@@ -56,7 +56,7 @@ class OUStringsSort_Impl;
class ImpPresPageDrawStylePropMapper;
class ImpXMLEXPPageMasterInfo;
class ImpXMLDrawPageInfoList;
-class ImpXMLAutoLayoutInfoList;
+class ImpXMLAutoLayoutInfo;
class SvXMLAutoStylePoolP;
class XMLSdPropHdlFactory;
class ImpXMLShapeStyleInfo;
@@ -64,6 +64,7 @@ class XMLShapeExportPropertyMapper;
class XMLPageExportPropertyMapper;
typedef ::std::vector< ImpXMLEXPPageMasterInfo* > ImpXMLEXPPageMasterList;
+typedef ::std::vector< ImpXMLAutoLayoutInfo* > ImpXMLAutoLayoutInfoList;
//////////////////////////////////////////////////////////////////////////////
diff --git a/binfilter/bf_xmloff/source/draw/xmloff_sdxmlexp.cxx b/binfilter/bf_xmloff/source/draw/xmloff_sdxmlexp.cxx
index 44a687a..8fed627 100644
--- a/binfilter/bf_xmloff/source/draw/xmloff_sdxmlexp.cxx
+++ b/binfilter/bf_xmloff/source/draw/xmloff_sdxmlexp.cxx
@@ -385,8 +385,6 @@ ImpXMLAutoLayoutInfo::ImpXMLAutoLayoutInfo(sal_uInt16 nTyp, ImpXMLEXPPageMasterI
maPresRect.SetSize(aLayoutSize);
}
-DECLARE_LIST(ImpXMLAutoLayoutInfoList, ImpXMLAutoLayoutInfo*)//STRIP007;
-
//////////////////////////////////////////////////////////////////////////////
// #110680#
@@ -398,7 +396,7 @@ SdXMLExport::SdXMLExport(
mpPageMasterUsageList(new ImpXMLEXPPageMasterList()),
mpNotesPageMasterUsageList(new ImpXMLEXPPageMasterList()),
mpHandoutPageMaster(NULL),
- mpAutoLayoutInfoList(new ImpXMLAutoLayoutInfoList(1, 4, 4)),
+ mpAutoLayoutInfoList(new ImpXMLAutoLayoutInfoList()),
mpSdPropHdlFactory(0L),
mpPropertySetMapper(0L),
mpPresPagePropsMapper(0L),
@@ -683,8 +681,9 @@ SdXMLExport::~SdXMLExport()
// clear auto-layout infos
if(mpAutoLayoutInfoList)
{
- while(mpAutoLayoutInfoList->Count())
- delete mpAutoLayoutInfoList->Remove(mpAutoLayoutInfoList->Count() - 1L);
+ for ( size_t i = mpAutoLayoutInfoList->size(); i > 0; )
+ delete (*mpAutoLayoutInfoList)[ --i ];
+ mpAutoLayoutInfoList->clear();
delete mpAutoLayoutInfoList;
mpAutoLayoutInfoList = 0L;
}
@@ -763,21 +762,21 @@ BOOL SdXMLExport::ImpPrepAutoLayoutInfo(const uno::Reference<drawing::XDrawPage>
ImpXMLAutoLayoutInfo* pNew = new ImpXMLAutoLayoutInfo(nType, pInfo);
BOOL bDidExist(FALSE);
- for(sal_uInt32 nCnt = 0L; !bDidExist && nCnt < mpAutoLayoutInfoList->Count(); nCnt++)
+ for( size_t nCnt = 0L; !bDidExist && nCnt < mpAutoLayoutInfoList->size(); nCnt++)
{
- if(*mpAutoLayoutInfoList->GetObject(nCnt) == *pNew)
+ if( *(*mpAutoLayoutInfoList)[ nCnt ] == *pNew)
{
delete pNew;
- pNew = mpAutoLayoutInfoList->GetObject(nCnt);
+ pNew = (*mpAutoLayoutInfoList)[ nCnt ];
bDidExist = TRUE;
}
}
if(!bDidExist)
{
- mpAutoLayoutInfoList->Insert(pNew, LIST_APPEND);
+ mpAutoLayoutInfoList->push_back( pNew );
OUString sNewName = OUString(RTL_CONSTASCII_USTRINGPARAM("AL"));
- sNewName += OUString::valueOf(sal_Int32(mpAutoLayoutInfoList->Count() - 1));
+ sNewName += OUString::valueOf(sal_Int32(mpAutoLayoutInfoList->size() - 1));
sNewName += OUString(RTL_CONSTASCII_USTRINGPARAM("T"));
sNewName += OUString::valueOf(sal_Int32(nType));
pNew->SetLayoutName(sNewName);
@@ -796,11 +795,11 @@ BOOL SdXMLExport::ImpPrepAutoLayoutInfo(const uno::Reference<drawing::XDrawPage>
void SdXMLExport::ImpWriteAutoLayoutInfos()
{
- if(mpAutoLayoutInfoList->Count())
+ if(mpAutoLayoutInfoList->size())
{
- for(sal_uInt32 nCnt = 0L; nCnt < mpAutoLayoutInfoList->Count(); nCnt++)
+ for( size_t nCnt = 0L; nCnt < mpAutoLayoutInfoList->size(); nCnt++)
{
- ImpXMLAutoLayoutInfo* pInfo = mpAutoLayoutInfoList->GetObject(nCnt);
+ ImpXMLAutoLayoutInfo* pInfo = (*mpAutoLayoutInfoList)[ nCnt ];
if(pInfo)
{
// prepare presentation-page layout attributes, style-name
More information about the Libreoffice-commits
mailing list