summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-11-12 12:49:26 +0200
committerNoel Grandin <noel@peralex.com>2015-11-13 10:54:17 +0200
commit6618e503b3f6acf282c0c97150f591e643f8db8b (patch)
treebcf450cb1ce48b6b786d886a4c8876a56e5e27fb /sc
parent6f6668c1f28ddb42b940c56f7fa24c37fd2e1850 (diff)
sc: boost::ptr_vector->std::vector<std::unique_ptr>
Change-Id: I253d36fba39b7022da7b4612881fcf5758bfd820
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/ftools/fprogressbar.cxx5
-rw-r--r--sc/source/filter/inc/fprogressbar.hxx5
2 files changed, 6 insertions, 4 deletions
diff --git a/sc/source/filter/ftools/fprogressbar.cxx b/sc/source/filter/ftools/fprogressbar.cxx
index 84deda9ec4a2..932444fb6714 100644
--- a/sc/source/filter/ftools/fprogressbar.cxx
+++ b/sc/source/filter/ftools/fprogressbar.cxx
@@ -21,6 +21,7 @@
#include "global.hxx"
#include "progress.hxx"
#include <osl/diagnose.h>
+#include <o3tl/make_unique.hxx>
ScfProgressBar::ScfProgressSegment::ScfProgressSegment( sal_Size nSize ) :
mnSize( nSize ),
@@ -69,7 +70,7 @@ ScfProgressBar::ScfProgressSegment* ScfProgressBar::GetSegment( sal_Int32 nSegme
{
if( nSegment < 0 )
return nullptr;
- return &(maSegments.at( nSegment ));
+ return maSegments.at( nSegment ).get();
}
void ScfProgressBar::SetCurrSegment( ScfProgressSegment* pSegment )
@@ -139,7 +140,7 @@ sal_Int32 ScfProgressBar::AddSegment( sal_Size nSize )
if( nSize == 0 )
return SCF_INV_SEGMENT;
- maSegments.push_back( new ScfProgressSegment( nSize ) );
+ maSegments.push_back( o3tl::make_unique<ScfProgressSegment>( nSize ) );
mnTotalSize += nSize;
return static_cast< sal_Int32 >( maSegments.size() - 1 );
}
diff --git a/sc/source/filter/inc/fprogressbar.hxx b/sc/source/filter/inc/fprogressbar.hxx
index 03442890b074..03bceec92d09 100644
--- a/sc/source/filter/inc/fprogressbar.hxx
+++ b/sc/source/filter/inc/fprogressbar.hxx
@@ -21,7 +21,8 @@
#define INCLUDED_SC_SOURCE_FILTER_INC_FPROGRESSBAR_HXX
#include <boost/noncopyable.hpp>
-#include <boost/ptr_container/ptr_vector.hpp>
+#include <vector>
+#include <memory>
#include "globstr.hrc"
#include "ftools.hxx"
#include "scdllapi.h"
@@ -161,7 +162,7 @@ private:
};
typedef ::std::unique_ptr< ScProgress > ScProgressPtr;
- typedef boost::ptr_vector< ScfProgressSegment > ScfSegmentList;
+ typedef std::vector< std::unique_ptr<ScfProgressSegment> > ScfSegmentList;
ScfSegmentList maSegments; /// List of progress segments.
OUString maText; /// UI string for system progress.