summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-06-12 09:29:01 +0200
committerMichael Stahl <mstahl@redhat.com>2012-06-12 23:25:10 +0200
commit3a27dcd0ccac691307648c3d7a96c28412e0a311 (patch)
treed6311a954f58b5cb2dec4e396e8682f1e6e1b081 /filter
parente19a2e50b723e0871d10cb51198d82c3dc8e57fa (diff)
Convert SV_DECL_PTRARR_DEL(SvxMSDffBLIPInfos) to boost::ptr_vector
Change-Id: I6cd5793b1ba2a29cbedce7fe5a040651e1664a11
Diffstat (limited to 'filter')
-rw-r--r--filter/inc/filter/msfilter/msdffimp.hxx5
-rw-r--r--filter/source/msfilter/msdffimp.cxx9
2 files changed, 5 insertions, 9 deletions
diff --git a/filter/inc/filter/msfilter/msdffimp.hxx b/filter/inc/filter/msfilter/msdffimp.hxx
index f5371d788388..3c4e9e214c77 100644
--- a/filter/inc/filter/msfilter/msdffimp.hxx
+++ b/filter/inc/filter/msfilter/msdffimp.hxx
@@ -43,6 +43,7 @@
#include <filter/msfilter/msfilterdllapi.h>
#include <sot/storage.hxx>
#include <vector>
+#include <boost/ptr_container/ptr_vector.hpp>
class Graphic;
class SvStream;
@@ -177,8 +178,6 @@ public:
#define COL_DEFAULT RGB_COLORDATA( 0xFA, 0xFB, 0xFC )
-typedef SvxMSDffBLIPInfo* SvxMSDffBLIPInfo_Ptr;
-
typedef SvxMSDffShapeInfo* SvxMSDffShapeInfo_Ptr;
typedef ::std::map< sal_Int32, SdrObject* > SvxMSDffShapeIdContainer;
@@ -186,7 +185,7 @@ typedef ::std::map< sal_Int32, SdrObject* > SvxMSDffShapeIdContainer;
#define SVEXT_PERSIST_STREAM "\002OlePres000"
// nach der Reihenfolge des Auftretens sortiert werden:
-SV_DECL_PTRARR_DEL(SvxMSDffBLIPInfos, SvxMSDffBLIPInfo_Ptr, 16)
+typedef boost::ptr_vector<SvxMSDffBLIPInfo> SvxMSDffBLIPInfos;
class SvxMSDffShapeOrders : public std::vector<SvxMSDffShapeOrder*>
{
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index e010d616be52..865bcfd0a131 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -5718,8 +5718,6 @@ void SvxMSDffManager::RemoveFromShapeOrder( SdrObject* pObject ) const
// Hilfs Deklarationen
//---------------------------------------------------------------------------
-SV_IMPL_PTRARR( SvxMSDffBLIPInfos, SvxMSDffBLIPInfo_Ptr );
-
SV_IMPL_OP_PTRARR_SORT( SvxMSDffShapeInfos, SvxMSDffShapeInfo_Ptr );
SV_IMPL_OP_PTRARR_SORT( SvxMSDffShapeTxBxSort, SvxMSDffShapeOrder* );
@@ -6105,8 +6103,7 @@ void SvxMSDffManager::GetDrawingGroupContainerData( SvStream& rSt, sal_uLong nLe
nBLIPCount++;
// Jetzt die Infos fuer spaetere Zugriffe speichern
- pBLIPInfos->Insert( new SvxMSDffBLIPInfo( nInst, nBLIPPos, nBLIPLen ),
- pBLIPInfos->Count() );
+ pBLIPInfos->push_back( new SvxMSDffBLIPInfo( nInst, nBLIPPos, nBLIPLen ) );
}
}
rSt.SeekRel( nLength );
@@ -6446,7 +6443,7 @@ sal_Bool SvxMSDffManager::GetBLIP( sal_uLong nIdx_, Graphic& rData, Rectangle* p
if ( !bOk )
{
sal_uInt16 nIdx = sal_uInt16( nIdx_ );
- if( !nIdx || (pBLIPInfos->Count() < nIdx) ) return sal_False;
+ if( !nIdx || (pBLIPInfos->size() < nIdx) ) return sal_False;
// eventuell alte(s) Errorflag(s) loeschen
if( rStCtrl.GetError() )
@@ -6460,7 +6457,7 @@ sal_Bool SvxMSDffManager::GetBLIP( sal_uLong nIdx_, Graphic& rData, Rectangle* p
sal_uLong nOldPosData = pStData ? pStData->Tell() : nOldPosCtrl;
// passende Info-Struct aus unserem Pointer Array nehmen
- SvxMSDffBLIPInfo& rInfo = *(*pBLIPInfos)[ nIdx-1 ];
+ SvxMSDffBLIPInfo& rInfo = (*pBLIPInfos)[ nIdx-1 ];
// das BLIP Atom im Daten Stream anspringen
pStData->Seek( rInfo.nFilePos );