diff options
author | Noel Grandin <noel@peralex.com> | 2012-06-07 16:27:06 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-06-12 23:25:09 +0200 |
commit | 153c5e3f07ec26fac352765b776188035e1fdeb2 (patch) | |
tree | a12eb15a87d0d6ac7f937a997f31634d4e0fc6ed /framework | |
parent | Convert SV_DECL_PTRARR_DEL(ExternalImageItemListDescriptor) to ptr_vector (diff) | |
download | core-153c5e3f07ec26fac352765b776188035e1fdeb2.tar.gz core-153c5e3f07ec26fac352765b776188035e1fdeb2.zip |
Convert SV_DECL_PTRARR_DEL(ImageItemListDescriptor) to boost::ptr_vector
Change-Id: Ic3b06e179d182d68288c7c6832149309160cd637
Diffstat (limited to 'framework')
-rw-r--r-- | framework/inc/xml/imagesconfiguration.hxx | 3 | ||||
-rw-r--r-- | framework/source/uiconfiguration/imagemanagerimpl.cxx | 6 | ||||
-rw-r--r-- | framework/source/xml/imagesconfiguration.cxx | 2 | ||||
-rw-r--r-- | framework/source/xml/imagesdocumenthandler.cxx | 6 |
4 files changed, 7 insertions, 10 deletions
diff --git a/framework/inc/xml/imagesconfiguration.hxx b/framework/inc/xml/imagesconfiguration.hxx index fcf8b3f68fb5..8ea756e58d12 100644 --- a/framework/inc/xml/imagesconfiguration.hxx +++ b/framework/inc/xml/imagesconfiguration.hxx @@ -65,8 +65,7 @@ struct ExternalImageItemDescriptor String aURL; // a URL to an external bitmap }; -typedef ImageItemDescriptor* ImageItemDescriptorPtr; -SV_DECL_PTRARR_DEL( ImageItemListDescriptor, ImageItemDescriptorPtr, 10 ) +typedef boost::ptr_vector<ImageItemDescriptor> ImageItemListDescriptor; typedef boost::ptr_vector<ExternalImageItemDescriptor> ExternalImageItemListDescriptor; diff --git a/framework/source/uiconfiguration/imagemanagerimpl.cxx b/framework/source/uiconfiguration/imagemanagerimpl.cxx index 52e498e30aed..9d105ca85ee2 100644 --- a/framework/source/uiconfiguration/imagemanagerimpl.cxx +++ b/framework/source/uiconfiguration/imagemanagerimpl.cxx @@ -507,12 +507,12 @@ sal_Bool ImageManagerImpl::implts_loadUserImages( ( !aUserImageListInfo.pImageList->empty() )) { ImageListItemDescriptor* pList = &aUserImageListInfo.pImageList->front(); - sal_Int32 nCount = pList->pImageItemList->Count(); + sal_Int32 nCount = pList->pImageItemList->size(); std::vector< OUString > aUserImagesVector; aUserImagesVector.reserve(nCount); for ( sal_uInt16 i=0; i < nCount; i++ ) { - const ImageItemDescriptor* pItem = pList->pImageItemList->GetObject(i); + const ImageItemDescriptor* pItem = &(*pList->pImageItemList)[i]; aUserImagesVector.push_back( pItem->aCommandURL ); } @@ -589,7 +589,7 @@ sal_Bool ImageManagerImpl::implts_storeUserImages( pItem->nIndex = i; pItem->aCommandURL = pImageList->GetImageName( i ); - pList->pImageItemList->Insert( pItem, pList->pImageItemList->Count() ); + pList->pImageItemList->push_back( pItem ); } pList->aURL = String::CreateFromAscii("Bitmaps/"); diff --git a/framework/source/xml/imagesconfiguration.cxx b/framework/source/xml/imagesconfiguration.cxx index d6e934d97a34..1823283bff2b 100644 --- a/framework/source/xml/imagesconfiguration.cxx +++ b/framework/source/xml/imagesconfiguration.cxx @@ -61,8 +61,6 @@ using namespace ::com::sun::star::io; namespace framework { -SV_IMPL_PTRARR( ImageItemListDescriptor, ImageItemDescriptorPtr ); - 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 ce7cec331579..f613e17d4b19 100644 --- a/framework/source/xml/imagesdocumenthandler.cxx +++ b/framework/source/xml/imagesdocumenthandler.cxx @@ -393,7 +393,7 @@ throw( SAXException, RuntimeException ) } if ( m_pImages ) - m_pImages->pImageItemList->Insert( pItem, m_pImages->pImageItemList->Count() ); + m_pImages->pImageItemList->push_back( pItem ); } break; @@ -765,8 +765,8 @@ void OWriteImagesDocumentHandler::WriteImageList( const ImageListItemDescriptor* ImageItemListDescriptor* pImageItemList = pImageList->pImageItemList; if ( pImageItemList ) { - for ( sal_uInt16 i = 0; i < pImageItemList->Count(); i++ ) - WriteImage( (*pImageItemList)[i] ); + for ( sal_uInt16 i = 0; i < pImageItemList->size(); i++ ) + WriteImage( &(*pImageItemList)[i] ); } m_xWriteDocumentHandler->endElement( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_IMAGES )) ); |