Kaydet (Commit) ca5f56a5 authored tarafından Noel Grandin's avatar Noel Grandin Kaydeden (comit) Michael Stahl

Convert SV_DECL_PTRARR_DEL(SwPageFlyCache) to boost::ptr_vector

üst 12a1e53d
......@@ -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;
}
......
......@@ -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; }
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment