diff options
author | Noel Grandin <noel@peralex.com> | 2012-04-26 10:04:46 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-05-09 08:52:59 +0200 |
commit | ca5f56a571c79b254af7c1fcb2e8256fa98d521f (patch) | |
tree | 3797986e2796158614ffb909045e68354561e4ec | |
parent | 12a1e53de414f7e35e370372217d08ed7906a071 (diff) |
Convert SV_DECL_PTRARR_DEL(SwPageFlyCache) to boost::ptr_vector
-rw-r--r-- | sw/source/core/layout/laycache.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/layout/layhelp.hxx | 7 |
2 files changed, 4 insertions, 7 deletions
diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx index 5cad47c52cac..b924dac9e163 100644 --- a/sw/source/core/layout/laycache.cxx +++ b/sw/source/core/layout/laycache.cxx @@ -70,8 +70,6 @@ using namespace ::com::sun::star; -SV_IMPL_PTRARR( SwPageFlyCache, SwFlyCachePtr ) - /* * Reading and writing of the layout cache. * The layout cache is not necessary, but it improves @@ -158,7 +156,7 @@ sal_Bool SwLayCacheImpl::Read( SvStream& rStream ) aIo.GetStream() >> nPgNum >> nIndex >> nX >> nY >> nW >> nH; SwFlyCache* pFly = new SwFlyCache( nPgNum, nIndex, nX, nY, nW, nH ); - aFlyCache.Insert( pFly, aFlyCache.Count() ); + aFlyCache.push_back( pFly ); aIo.CloseRec( SW_LAYCACHE_IO_REC_FLY ); break; } diff --git a/sw/source/core/layout/layhelp.hxx b/sw/source/core/layout/layhelp.hxx index 1a6d4cb45184..afaf6feb9903 100644 --- a/sw/source/core/layout/layhelp.hxx +++ b/sw/source/core/layout/layhelp.hxx @@ -56,8 +56,7 @@ class SvStream; *************************************************************************/ class SwFlyCache; -typedef SwFlyCache* SwFlyCachePtr; -SV_DECL_PTRARR_DEL( SwPageFlyCache, SwFlyCachePtr, 0 ) +typedef boost::ptr_vector<SwFlyCache> SwPageFlyCache; class SwLayCacheImpl : public std::vector<sal_uLong> { @@ -75,8 +74,8 @@ public: xub_StrLen GetBreakOfst( size_t nIdx ) const { return aOffset[ nIdx ]; } sal_uInt16 GetBreakType( sal_uInt16 nIdx ) const { return aType[ nIdx ]; } - sal_uInt16 GetFlyCount() const { return aFlyCache.Count(); } - SwFlyCache *GetFlyCache( sal_uInt16 nIdx ) const { return aFlyCache[ nIdx ]; } + sal_uInt16 GetFlyCount() const { return aFlyCache.size(); } + SwFlyCache *GetFlyCache( sal_uInt16 nIdx ) { return &aFlyCache[ nIdx ]; } sal_Bool IsUseFlyCache() const { return bUseFlyCache; } }; |