summaryrefslogtreecommitdiffstats
path: root/framework
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-06-07 14:58:34 +0200
committerMichael Stahl <mstahl@redhat.com>2012-06-12 23:25:09 +0200
commit059f0fd3bd6977a9e29a32f5292262b14e8ff679 (patch)
tree0cda1cdf73c2f3cbbc83683b82489b1fa5e5b348 /framework
parentConvert SV_DECL_PTRARR_DEL(XModifyListenerArr_Impl) to ptr_vector (diff)
downloadcore-059f0fd3bd6977a9e29a32f5292262b14e8ff679.tar.gz
core-059f0fd3bd6977a9e29a32f5292262b14e8ff679.zip
Convert SV_DECL_PTRARR_DEL( ImageListDescriptor) to boost::ptr_vector
Change-Id: Iea01a7d7c01bb9da80ccae001157c60d6090348b
Diffstat (limited to 'framework')
-rw-r--r--framework/inc/xml/imagesconfiguration.hxx4
-rw-r--r--framework/source/uiconfiguration/imagemanagerimpl.cxx6
-rw-r--r--framework/source/xml/imagesconfiguration.cxx1
-rw-r--r--framework/source/xml/imagesdocumenthandler.cxx6
4 files changed, 8 insertions, 9 deletions
diff --git a/framework/inc/xml/imagesconfiguration.hxx b/framework/inc/xml/imagesconfiguration.hxx
index 4b2876a38dc6..5a6c2b6d4f43 100644
--- a/framework/inc/xml/imagesconfiguration.hxx
+++ b/framework/inc/xml/imagesconfiguration.hxx
@@ -40,6 +40,7 @@
#include <com/sun/star/io/XOutputStream.hpp>
#include <vector>
+#include <boost/ptr_container/ptr_vector.hpp>
namespace framework
{
@@ -86,8 +87,7 @@ struct ImageListItemDescriptor
String aHighContrastMaskURL; // an URL to an optional high contrast bitmap as a mask
};
-typedef ImageListItemDescriptor* ImageListItemDescriptorPtr;
-SV_DECL_PTRARR_DEL( ImageListDescriptor, ImageListItemDescriptorPtr, 10 )
+typedef boost::ptr_vector<ImageListItemDescriptor> ImageListDescriptor;
struct ImageListsDescriptor
{
diff --git a/framework/source/uiconfiguration/imagemanagerimpl.cxx b/framework/source/uiconfiguration/imagemanagerimpl.cxx
index 7931cbfff640..52e498e30aed 100644
--- a/framework/source/uiconfiguration/imagemanagerimpl.cxx
+++ b/framework/source/uiconfiguration/imagemanagerimpl.cxx
@@ -504,9 +504,9 @@ sal_Bool ImageManagerImpl::implts_loadUserImages(
xInputStream,
aUserImageListInfo );
if (( aUserImageListInfo.pImageList != 0 ) &&
- ( aUserImageListInfo.pImageList->Count() > 0 ))
+ ( !aUserImageListInfo.pImageList->empty() ))
{
- ImageListItemDescriptor* pList = aUserImageListInfo.pImageList->GetObject(0);
+ ImageListItemDescriptor* pList = &aUserImageListInfo.pImageList->front();
sal_Int32 nCount = pList->pImageItemList->Count();
std::vector< OUString > aUserImagesVector;
aUserImagesVector.reserve(nCount);
@@ -580,7 +580,7 @@ sal_Bool ImageManagerImpl::implts_storeUserImages(
aUserImageListInfo.pImageList = new ImageListDescriptor;
ImageListItemDescriptor* pList = new ImageListItemDescriptor;
- aUserImageListInfo.pImageList->Insert( pList, 0 );
+ aUserImageListInfo.pImageList->push_back( pList );
pList->pImageItemList = new ImageItemListDescriptor;
for ( sal_uInt16 i=0; i < pImageList->GetImageCount(); i++ )
diff --git a/framework/source/xml/imagesconfiguration.cxx b/framework/source/xml/imagesconfiguration.cxx
index ba7aa9450334..7f2f51b45eb6 100644
--- a/framework/source/xml/imagesconfiguration.cxx
+++ b/framework/source/xml/imagesconfiguration.cxx
@@ -63,7 +63,6 @@ namespace framework
SV_IMPL_PTRARR( ImageItemListDescriptor, ImageItemDescriptorPtr );
SV_IMPL_PTRARR( ExternalImageItemListDescriptor, ExternalImageItemDescriptorPtr );
-SV_IMPL_PTRARR( ImageListDescriptor, ImageListItemDescriptorPtr );
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 deade3d825d8..4eb19610c531 100644
--- a/framework/source/xml/imagesdocumenthandler.cxx
+++ b/framework/source/xml/imagesdocumenthandler.cxx
@@ -545,7 +545,7 @@ throw( SAXException, RuntimeException )
if ( m_pImages )
{
if ( m_aImageList.pImageList )
- m_aImageList.pImageList->Insert( m_pImages, m_aImageList.pImageList->Count() );
+ m_aImageList.pImageList->push_back( m_pImages );
m_pImages = NULL;
}
m_bImagesStartFound = sal_False;
@@ -681,9 +681,9 @@ void OWriteImagesDocumentHandler::WriteImagesDocument() throw
{
ImageListDescriptor* pImageList = m_aImageListsItems.pImageList;
- for ( sal_uInt16 i = 0; i < m_aImageListsItems.pImageList->Count(); i++ )
+ for ( sal_uInt16 i = 0; i < m_aImageListsItems.pImageList->size(); i++ )
{
- const ImageListItemDescriptor* pImageItems = (*pImageList)[i];
+ const ImageListItemDescriptor* pImageItems = &(*pImageList)[i];
WriteImageList( pImageItems );
}
}