summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-11-12 10:57:29 +0200
committerNoel Grandin <noel@peralex.com>2015-11-12 12:29:25 +0200
commit2dcec2f7a0a0ee7fb62e0e1aa876d1468d93a31c (patch)
treec2dcbd6fba9ec04f5278137ff954cb7ca96d3b49 /sc
parent024a07537fdcbcbff03c9ca34990520aeb2fc6bb (diff)
sc: boost::ptr_vector->std::vector<std::unique_ptr>
Change-Id: I95c7c37ca743aede1dcb57b5633f478310fbbd01
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/excel/xihelper.cxx13
-rw-r--r--sc/source/filter/inc/xihelper.hxx4
2 files changed, 9 insertions, 8 deletions
diff --git a/sc/source/filter/excel/xihelper.cxx b/sc/source/filter/excel/xihelper.cxx
index 462e89d7cdaa..62c1504a390f 100644
--- a/sc/source/filter/excel/xihelper.cxx
+++ b/sc/source/filter/excel/xihelper.cxx
@@ -36,6 +36,7 @@
#include "stringutil.hxx"
#include "scmatrix.hxx"
#include "documentimport.hxx"
+#include <o3tl/make_unique.hxx>
// Excel->Calc cell address/range conversion ==================================
@@ -850,7 +851,7 @@ XclImpCachedMatrix::XclImpCachedMatrix( XclImpStream& rStrm ) :
for( SCSIZE nScRow = 0; nScRow < mnScRows; ++nScRow )
for( SCSIZE nScCol = 0; nScCol < mnScCols; ++nScCol )
- maValueList.push_back( new XclImpCachedValue( rStrm ) );
+ maValueList.push_back( o3tl::make_unique<XclImpCachedValue>( rStrm ) );
}
XclImpCachedMatrix::~XclImpCachedMatrix()
@@ -869,23 +870,23 @@ ScMatrixRef XclImpCachedMatrix::CreateScMatrix( svl::SharedStringPool& rPool ) c
{
for( SCSIZE nScCol = 0; nScCol < mnScCols; ++nScCol )
{
- switch( itValue->GetType() )
+ switch( (*itValue)->GetType() )
{
case EXC_CACHEDVAL_EMPTY:
// Excel shows 0.0 here, not an empty cell
xScMatrix->PutEmpty( nScCol, nScRow );
break;
case EXC_CACHEDVAL_DOUBLE:
- xScMatrix->PutDouble( itValue->GetValue(), nScCol, nScRow );
+ xScMatrix->PutDouble( (*itValue)->GetValue(), nScCol, nScRow );
break;
case EXC_CACHEDVAL_STRING:
- xScMatrix->PutString(rPool.intern(itValue->GetString()), nScCol, nScRow);
+ xScMatrix->PutString(rPool.intern((*itValue)->GetString()), nScCol, nScRow);
break;
case EXC_CACHEDVAL_BOOL:
- xScMatrix->PutBoolean( itValue->GetBool(), nScCol, nScRow );
+ xScMatrix->PutBoolean( (*itValue)->GetBool(), nScCol, nScRow );
break;
case EXC_CACHEDVAL_ERROR:
- xScMatrix->PutError( itValue->GetScError(), nScCol, nScRow );
+ xScMatrix->PutError( (*itValue)->GetScError(), nScCol, nScRow );
break;
default:
OSL_FAIL( "XclImpCachedMatrix::CreateScMatrix - unknown value type" );
diff --git a/sc/source/filter/inc/xihelper.hxx b/sc/source/filter/inc/xihelper.hxx
index b8f12e8c2395..e6b90127c7ff 100644
--- a/sc/source/filter/inc/xihelper.hxx
+++ b/sc/source/filter/inc/xihelper.hxx
@@ -22,12 +22,12 @@
#include <editeng/editdata.hxx>
#include <boost/noncopyable.hpp>
-#include <boost/ptr_container/ptr_vector.hpp>
#include "types.hxx"
#include "xladdress.hxx"
#include "xiroot.hxx"
#include "xistring.hxx"
#include <memory>
+#include <vector>
class ScRangeList;
@@ -333,7 +333,7 @@ public:
ScMatrixRef CreateScMatrix( svl::SharedStringPool& rPool ) const;
private:
- typedef boost::ptr_vector< XclImpCachedValue > XclImpValueList;
+ typedef std::vector< std::unique_ptr<XclImpCachedValue> > XclImpValueList;
XclImpValueList maValueList; /// List of cached cell values.
SCSIZE mnScCols; /// Number of cached columns.