Kaydet (Commit) 2dcec2f7 authored tarafından Noel Grandin's avatar Noel Grandin

sc: boost::ptr_vector->std::vector<std::unique_ptr>

Change-Id: I95c7c37ca743aede1dcb57b5633f478310fbbd01
üst 024a0753
......@@ -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" );
......
......@@ -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.
......
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