summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-07-23 23:36:28 +0200
committerMichael Stahl <mstahl@redhat.com>2015-07-24 10:58:56 +0200
commitb772f022192d2150aa6b33b1ce086c4645277023 (patch)
tree491da7a70f6b85caa2d3758a7145989cb6c0c0fd /filter
parent355865211c50303095582f6e1dfbd5d209802b7b (diff)
filter: convert boost::ptr_vector to std::vector
... and move it out of the header since it's only used in that class. Change-Id: Icd5cc86428c97bdaaa07d56e17393846629721e5
Diffstat (limited to 'filter')
-rw-r--r--filter/source/msfilter/msdffimp.cxx24
1 files changed, 18 insertions, 6 deletions
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 1e62f40032dd..1a49e875efa1 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -149,6 +149,18 @@ using namespace container ;
static sal_uInt32 nMSOleObjCntr = 0;
#define MSO_OLE_Obj "MSO_OLE_Obj"
+struct SvxMSDffBLIPInfo
+{
+ sal_uInt16 nBLIPType; ///< type of BLIP: e.g. 6 for PNG
+ sal_uLong nFilePos; ///< offset of the BLIP in data strem
+ sal_uLong nBLIPSize; ///< number of bytes that the BLIP needs in stream
+ SvxMSDffBLIPInfo(sal_uInt16 nBType, sal_uLong nFPos, sal_uLong nBSize):
+ nBLIPType( nBType ), nFilePos( nFPos ), nBLIPSize( nBSize ){}
+};
+
+/// the following will be sorted by the order of their appearance:
+struct SvxMSDffBLIPInfos : public std::vector<SvxMSDffBLIPInfo> {};
+
/************************************************************************/
void Impl_OlePres::Write( SvStream & rStm )
{
@@ -5528,7 +5540,7 @@ SvxMSDffManager::SvxMSDffManager(SvStream& rStCtrl_,
bool bSkipImages )
:DffPropertyReader( *this ),
pFormModel( NULL ),
- pBLIPInfos( new SvxMSDffBLIPInfos ),
+ m_pBLIPInfos( new SvxMSDffBLIPInfos ),
m_xShapeInfosByTxBxComp( new SvxMSDffShapeInfos_ByTxBxComp ),
pShapeOrders( new SvxMSDffShapeOrders ),
nOffsDgg( nOffsDgg_ ),
@@ -5577,7 +5589,7 @@ SvxMSDffManager::SvxMSDffManager(SvStream& rStCtrl_,
SvxMSDffManager::SvxMSDffManager( SvStream& rStCtrl_, const OUString& rBaseURL )
:DffPropertyReader( *this ),
pFormModel( NULL ),
- pBLIPInfos( new SvxMSDffBLIPInfos ),
+ m_pBLIPInfos( new SvxMSDffBLIPInfos ),
m_xShapeInfosByTxBxComp( new SvxMSDffShapeInfos_ByTxBxComp ),
pShapeOrders( new SvxMSDffShapeOrders ),
nOffsDgg( 0 ),
@@ -5603,7 +5615,7 @@ SvxMSDffManager::SvxMSDffManager( SvStream& rStCtrl_, const OUString& rBaseURL )
SvxMSDffManager::~SvxMSDffManager()
{
delete pSecPropSet;
- delete pBLIPInfos;
+ delete m_pBLIPInfos;
delete pShapeOrders;
delete pFormModel;
}
@@ -5879,7 +5891,7 @@ void SvxMSDffManager::GetDrawingGroupContainerData( SvStream& rSt, sal_uLong nLe
nBLIPCount++;
// now save the info for later access
- pBLIPInfos->push_back( new SvxMSDffBLIPInfo( nInst, nBLIPPos, nBLIPLen ) );
+ m_pBLIPInfos->push_back(SvxMSDffBLIPInfo(nInst, nBLIPPos, nBLIPLen));
}
rSt.SeekRel( nLength );
}
@@ -6217,7 +6229,7 @@ bool SvxMSDffManager::GetBLIP( sal_uLong nIdx_, Graphic& rData, Rectangle* pVisA
if ( !bOk )
{
sal_uInt16 nIdx = sal_uInt16( nIdx_ );
- if( !nIdx || (pBLIPInfos->size() < nIdx) )
+ if (!nIdx || (m_pBLIPInfos->size() < nIdx))
return false;
// possibly delete old error flag(s)
@@ -6232,7 +6244,7 @@ bool SvxMSDffManager::GetBLIP( sal_uLong nIdx_, Graphic& rData, Rectangle* pVisA
sal_uLong nOldPosData = pStData ? pStData->Tell() : nOldPosCtrl;
// fetch matching info struct out of the pointer array
- SvxMSDffBLIPInfo& rInfo = (*pBLIPInfos)[ nIdx-1 ];
+ SvxMSDffBLIPInfo& rInfo = (*m_pBLIPInfos)[ nIdx-1 ];
// jump to the BLIP atom in the data stream
pStData->Seek( rInfo.nFilePos );
// possibly reset error status