summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-06-07 15:35:43 +0200
committerMichael Stahl <mstahl@redhat.com>2012-06-12 23:25:09 +0200
commit0169c40e133bafa9d7c1226d1fa747d7958a1d4f (patch)
tree79b66764d3a39a87a8a488d2aa37c227a154bb5a /framework
parent059f0fd3bd6977a9e29a32f5292262b14e8ff679 (diff)
Convert SV_DECL_PTRARR_DEL(ExternalImageItemListDescriptor) to ptr_vector
Change-Id: I29e61ac8c932d0920f326f268aa62acc4aaec5c5
Diffstat (limited to 'framework')
-rw-r--r--framework/inc/xml/imagesconfiguration.hxx3
-rw-r--r--framework/source/xml/imagesconfiguration.cxx1
-rw-r--r--framework/source/xml/imagesdocumenthandler.cxx6
3 files changed, 4 insertions, 6 deletions
diff --git a/framework/inc/xml/imagesconfiguration.hxx b/framework/inc/xml/imagesconfiguration.hxx
index 5a6c2b6d4f43..fcf8b3f68fb5 100644
--- a/framework/inc/xml/imagesconfiguration.hxx
+++ b/framework/inc/xml/imagesconfiguration.hxx
@@ -68,8 +68,7 @@ struct ExternalImageItemDescriptor
typedef ImageItemDescriptor* ImageItemDescriptorPtr;
SV_DECL_PTRARR_DEL( ImageItemListDescriptor, ImageItemDescriptorPtr, 10 )
-typedef ExternalImageItemDescriptor* ExternalImageItemDescriptorPtr;
-SV_DECL_PTRARR_DEL( ExternalImageItemListDescriptor, ExternalImageItemDescriptorPtr, 10 )
+typedef boost::ptr_vector<ExternalImageItemDescriptor> ExternalImageItemListDescriptor;
struct ImageListItemDescriptor
{
diff --git a/framework/source/xml/imagesconfiguration.cxx b/framework/source/xml/imagesconfiguration.cxx
index 7f2f51b45eb6..d6e934d97a34 100644
--- a/framework/source/xml/imagesconfiguration.cxx
+++ b/framework/source/xml/imagesconfiguration.cxx
@@ -62,7 +62,6 @@ namespace framework
{
SV_IMPL_PTRARR( ImageItemListDescriptor, ImageItemDescriptorPtr );
-SV_IMPL_PTRARR( ExternalImageItemListDescriptor, ExternalImageItemDescriptorPtr );
static Reference< XParser > GetSaxParser(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory
diff --git a/framework/source/xml/imagesdocumenthandler.cxx b/framework/source/xml/imagesdocumenthandler.cxx
index 4eb19610c531..ce7cec331579 100644
--- a/framework/source/xml/imagesdocumenthandler.cxx
+++ b/framework/source/xml/imagesdocumenthandler.cxx
@@ -512,7 +512,7 @@ throw( SAXException, RuntimeException )
}
if ( m_pExternalImages )
- m_pExternalImages->Insert( pItem, m_pExternalImages->Count() );
+ m_pExternalImages->push_back( pItem );
else
delete pItem;
}
@@ -800,9 +800,9 @@ void OWriteImagesDocumentHandler::WriteExternalImageList( const ExternalImageIte
m_xWriteDocumentHandler->startElement( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_EXTERNALIMAGES )), m_xEmptyList );
m_xWriteDocumentHandler->ignorableWhitespace( ::rtl::OUString() );
- for ( sal_uInt16 i = 0; i < pExternalImageList->Count(); i++ )
+ for ( sal_uInt16 i = 0; i < pExternalImageList->size(); i++ )
{
- ExternalImageItemDescriptor* pItem = (*pExternalImageList)[i];
+ const ExternalImageItemDescriptor* pItem = &(*pExternalImageList)[i];
WriteExternalImage( pItem );
}