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