Kaydet (Commit) 8733b2ab authored tarafından Noel Grandin's avatar Noel Grandin

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

Change-Id: I1634157c56f5aa7a9096ce1bba4df09fd86f7748
üst f24323d4
......@@ -43,7 +43,7 @@ void ScPivotLayoutTreeListLabel::FillLabelFields(ScDPLabelDataVector& rLabelVect
const ScDPLabelData& rLabelData = *it;
ScItemValue* pValue = new ScItemValue(rLabelData.maName, rLabelData.mnCol, rLabelData.mnFuncMask);
maItemValues.push_back(pValue);
maItemValues.push_back(std::unique_ptr<ScItemValue>(pValue));
if (rLabelData.mbDataLayout)
{
maDataItem = maItemValues.size() - 1;
......@@ -71,8 +71,8 @@ bool ScPivotLayoutTreeListLabel::IsDataElement(SCCOL nColumn)
ScItemValue* ScPivotLayoutTreeListLabel::GetItem(SCCOL nColumn)
{
if (nColumn == PIVOT_DATA_FIELD)
return &maItemValues[maDataItem];
return &maItemValues[nColumn];
return maItemValues[maDataItem].get();
return maItemValues[nColumn].get();
}
void ScPivotLayoutTreeListLabel::KeyInput(const KeyEvent& rKeyEvent)
......
......@@ -12,12 +12,13 @@
#define INCLUDED_SC_SOURCE_UI_INC_PIVOTLAYOUTTREELISTLABEL_HXX
#include "PivotLayoutTreeListBase.hxx"
#include <boost/ptr_container/ptr_vector.hpp>
#include <vector>
#include <memory>
class ScPivotLayoutTreeListLabel : public ScPivotLayoutTreeListBase
{
private:
boost::ptr_vector<ScItemValue> maItemValues;
std::vector<std::unique_ptr<ScItemValue> > maItemValues;
SCCOL maDataItem;
public:
......
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