Kaydet (Commit) 1c0371a5 authored tarafından Noel Grandin's avatar Noel Grandin

sd: boost::ptr_vector->std::vector

Change-Id: Idff9e260f180ea4d68ae7c04414d61f5f5887f0b
üst afc3f660
......@@ -154,7 +154,7 @@ sal_uInt32 ExSoundCollection::GetId(const OUString& rString)
if (!rString.isEmpty())
{
const sal_uInt32 nSoundCount = maEntries.size();
boost::ptr_vector<ExSoundEntry>::const_iterator iter;
std::vector<ExSoundEntry>::const_iterator iter;
for (iter = maEntries.begin(); iter != maEntries.end(); ++iter, ++nSoundId)
{
......@@ -164,13 +164,12 @@ sal_uInt32 ExSoundCollection::GetId(const OUString& rString)
if ( nSoundId++ == nSoundCount )
{
ExSoundEntry* pEntry = new ExSoundEntry( rString );
if ( pEntry->GetFileSize() )
maEntries.push_back(pEntry);
ExSoundEntry aEntry( rString );
if ( aEntry.GetFileSize() )
maEntries.push_back(aEntry);
else
{
nSoundId = 0; // only insert sounds that are accessible
delete pEntry;
}
}
}
......@@ -183,7 +182,7 @@ sal_uInt32 ExSoundCollection::GetSize() const
if (!maEntries.empty())
{
nSize += 8 + 12; // size of SoundCollectionContainerHeader + SoundCollAtom
boost::ptr_vector<ExSoundEntry>::const_iterator iter;
std::vector<ExSoundEntry>::const_iterator iter;
sal_uInt32 i = 1;
for ( iter = maEntries.begin(); iter != maEntries.end(); ++iter, ++i)
nSize += iter->GetSize(i);
......@@ -204,7 +203,7 @@ void ExSoundCollection::Write( SvStream& rSt ) const
// create SoundCollAtom ( reference to the next free SoundId );
rSt.WriteUInt32( EPP_SoundCollAtom << 16 ).WriteUInt32( 4 ).WriteUInt32( nSoundCount );
boost::ptr_vector<ExSoundEntry>::const_iterator iter;
std::vector<ExSoundEntry>::const_iterator iter;
for ( iter = maEntries.begin(); iter != maEntries.end(); ++iter, ++i)
iter->Write(rSt,i);
}
......
......@@ -20,7 +20,7 @@
#ifndef INCLUDED_SD_SOURCE_FILTER_EPPT_PPTEXSOUNDCOLLECTION_HXX
#define INCLUDED_SD_SOURCE_FILTER_EPPT_PPTEXSOUNDCOLLECTION_HXX
#include <boost/ptr_container/ptr_vector.hpp>
#include <vector>
#ifdef DBG_ANIM_LOG
#include <stdio.h>
......@@ -34,7 +34,7 @@ namespace ppt
class ExSoundEntry
{
sal_uInt32 nFileSize;
sal_uInt32 nFileSize;
OUString aSoundURL;
OUString ImplGetName() const;
......@@ -43,13 +43,13 @@ class ExSoundEntry
public:
bool IsSameURL(const OUString& rURL) const;
sal_uInt32 GetFileSize( ) const { return nFileSize; };
sal_uInt32 GetFileSize( ) const { return nFileSize; };
ExSoundEntry(const OUString& rSoundURL);
ExSoundEntry(const OUString& rSoundURL);
/// @return size of a complete SoundContainer.
sal_uInt32 GetSize( sal_uInt32 nId ) const;
void Write( SvStream& rSt, sal_uInt32 nId ) const;
sal_uInt32 GetSize( sal_uInt32 nId ) const;
void Write( SvStream& rSt, sal_uInt32 nId ) const;
};
class ExSoundCollection
......@@ -64,7 +64,7 @@ class ExSoundCollection
private:
boost::ptr_vector<ExSoundEntry> maEntries;
std::vector<ExSoundEntry> maEntries;
};
} // namespace ppt
......
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