diff options
author | Noel Grandin <noel@peralex.com> | 2015-11-11 14:54:30 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-11-12 08:01:36 +0200 |
commit | 1c0371a561b336e37b4ba4699842b60685e90125 (patch) | |
tree | c95474f2602c86b453ad2390a90a403168569267 /sd | |
parent | afc3f660cb6b9f48bed24e9ee636ffe4d202f47b (diff) |
sd: boost::ptr_vector->std::vector
Change-Id: Idff9e260f180ea4d68ae7c04414d61f5f5887f0b
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/filter/eppt/pptexsoundcollection.cxx | 13 | ||||
-rw-r--r-- | sd/source/filter/eppt/pptexsoundcollection.hxx | 14 |
2 files changed, 13 insertions, 14 deletions
diff --git a/sd/source/filter/eppt/pptexsoundcollection.cxx b/sd/source/filter/eppt/pptexsoundcollection.cxx index 6521b8cf1aa5..f7d8c160d860 100644 --- a/sd/source/filter/eppt/pptexsoundcollection.cxx +++ b/sd/source/filter/eppt/pptexsoundcollection.cxx @@ -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); } diff --git a/sd/source/filter/eppt/pptexsoundcollection.hxx b/sd/source/filter/eppt/pptexsoundcollection.hxx index 2d9b20b53cda..a104cd4a7eb3 100644 --- a/sd/source/filter/eppt/pptexsoundcollection.hxx +++ b/sd/source/filter/eppt/pptexsoundcollection.hxx @@ -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 |