summaryrefslogtreecommitdiff
path: root/include/filter
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-07-23 23:02:50 +0200
committerMichael Stahl <mstahl@redhat.com>2015-07-24 10:58:55 +0200
commit9c959736caaaab5a757b0a0ff0abb121062483ab (patch)
treecf969b4da92178ce615de210b98637860fdffe55 /include/filter
parent2ca3569e04bdebf94496ba24829e696493413b90 (diff)
filter: replace boost::ptr_vector with std::vector<std::unique_ptr>
Change-Id: I87f903c6a81b271847f072fa0608fae4669ac307
Diffstat (limited to 'include/filter')
-rw-r--r--include/filter/msfilter/svdfppt.hxx30
1 files changed, 17 insertions, 13 deletions
diff --git a/include/filter/msfilter/svdfppt.hxx b/include/filter/msfilter/svdfppt.hxx
index dd4cfcfb27b9..e355d6537c27 100644
--- a/include/filter/msfilter/svdfppt.hxx
+++ b/include/filter/msfilter/svdfppt.hxx
@@ -36,9 +36,9 @@
#include <filter/msfilter/msfilterdllapi.h>
#include <vcl/font.hxx>
#include <vector>
+#include <memory>
#include <boost/noncopyable.hpp>
#include <boost/optional.hpp>
-#include <boost/ptr_container/ptr_vector.hpp>
class SdrModel;
class SdPage;
@@ -354,23 +354,27 @@ public:
class MSFILTER_DLLPUBLIC PptSlidePersistList: private boost::noncopyable
{
private:
- boost::ptr_vector<PptSlidePersistEntry> mvEntries;
+ typedef std::vector<std::unique_ptr<PptSlidePersistEntry>> Entries_t;
+ Entries_t mvEntries;
public:
PptSlidePersistList();
~PptSlidePersistList();
size_t size() const { return mvEntries.size(); }
- bool is_null( size_t nIdx ) const { return mvEntries.is_null( nIdx ); }
- const PptSlidePersistEntry& operator[]( size_t nIdx ) const { return mvEntries[ nIdx ]; }
- PptSlidePersistEntry& operator[]( size_t nIdx ) { return mvEntries[ nIdx ]; }
- boost::ptr_vector<PptSlidePersistEntry>::iterator begin() { return mvEntries.begin(); }
- void insert( boost::ptr_vector<PptSlidePersistEntry>::iterator it,
- PptSlidePersistEntry* pEntry )
+ bool is_null( size_t nIdx ) const { return mvEntries[ nIdx ] == nullptr; }
+ const PptSlidePersistEntry& operator[](size_t nIdx) const { return *mvEntries[ nIdx ]; }
+ PptSlidePersistEntry& operator[](size_t nIdx) { return *mvEntries[ nIdx ]; }
+ Entries_t::iterator begin() { return mvEntries.begin(); }
+ void insert( Entries_t::iterator it,
+ std::unique_ptr<PptSlidePersistEntry> pEntry )
{
- mvEntries.insert(it, pEntry);
+ mvEntries.insert(it, std::move(pEntry));
+ }
+ void push_back(std::unique_ptr<PptSlidePersistEntry> pEntry)
+ {
+ mvEntries.push_back(std::move(pEntry));
}
- void push_back( PptSlidePersistEntry* pEntry ) { mvEntries.push_back(pEntry); }
sal_uInt16 FindPage( sal_uInt32 nId ) const;
};
@@ -545,9 +549,9 @@ protected:
const PPTStyleSheet* pPPTStyleSheet; // this is the current stylesheet;
const PPTStyleSheet* pDefaultSheet; // this is a sheet we are using if no masterpage can be found, but that should
// never happen just preventing a crash
- PptSlidePersistList* pMasterPages;
- PptSlidePersistList* pSlidePages;
- PptSlidePersistList* pNotePages;
+ PptSlidePersistList* m_pMasterPages;
+ PptSlidePersistList* m_pSlidePages;
+ PptSlidePersistList* m_pNotePages;
sal_uInt16 nAktPageNum;
sal_uLong nDocStreamPos;
sal_uInt16 nPageColorsNum;