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

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

Change-Id: I1e225446cfbcf9a9b155eec58f1e45bd812298f7
üst e666bd8e
......@@ -116,6 +116,7 @@
#include <tools/date.hxx>
#include <i18nlangtag/lang.h>
#include <comphelper/extract.hxx>
#include <o3tl/make_unique.hxx>
using namespace com::sun::star;
using namespace xmloff::token;
......@@ -403,8 +404,8 @@ void ScXMLTableRowCellContext::PushFormat(sal_Int32 nBegin, sal_Int32 nEnd, cons
const ScXMLEditAttributeMap& rEditAttrMap = GetScImport().GetEditAttributeMap();
mbHasFormatRuns = true;
maFormats.push_back(new ParaFormat(*mpEditEngine));
ParaFormat& rFmt = maFormats.back();
maFormats.push_back(o3tl::make_unique<ParaFormat>(*mpEditEngine));
ParaFormat& rFmt = *maFormats.back().get();
rFmt.maSelection.nStartPara = rFmt.maSelection.nEndPara = mnCurParagraph;
rFmt.maSelection.nStartPos = nBegin;
rFmt.maSelection.nEndPos = nEnd;
......@@ -1107,7 +1108,7 @@ void ScXMLTableRowCellContext::PutTextCell( const ScAddress& rCurrentPos,
{
ParaFormatsType::const_iterator it = maFormats.begin(), itEnd = maFormats.end();
for (; it != itEnd; ++it)
mpEditEngine->QuickSetAttribs(it->maItemSet, it->maSelection);
mpEditEngine->QuickSetAttribs((*it)->maItemSet, (*it)->maSelection);
}
{
......
......@@ -31,6 +31,7 @@
#include <boost/ptr_container/ptr_vector.hpp>
#include <boost/noncopyable.hpp>
#include <memory>
#include <vector>
class ScXMLImport;
class ScFormulaCell;
......@@ -56,7 +57,7 @@ class ScXMLTableRowCellContext : public ScXMLImportContext
~Field();
};
typedef boost::ptr_vector<ParaFormat> ParaFormatsType;
typedef std::vector<std::unique_ptr<ParaFormat> > ParaFormatsType;
typedef boost::ptr_vector<Field> FieldsType;
typedef std::pair<OUString, OUString> FormulaWithNamespace;
......
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