diff options
author | Noel Grandin <noel@peralex.com> | 2015-11-12 12:57:34 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-11-13 10:54:17 +0200 |
commit | 33bf2449730c796a41a25f9287aa40e51c2bc464 (patch) | |
tree | 83b7c701dc10f31938e7a229c01fcc431f8e52ce /sc/source/filter/oox | |
parent | sc: boost::ptr_vector->std::vector<std::unique_ptr> (diff) | |
download | core-33bf2449730c796a41a25f9287aa40e51c2bc464.tar.gz core-33bf2449730c796a41a25f9287aa40e51c2bc464.zip |
sc: boost::ptr_vector->std::vector<std::unique_ptr>
Change-Id: Ib53a084c16eaf0c7a44573ec8f4fabd782684b7c
Diffstat (limited to 'sc/source/filter/oox')
-rw-r--r-- | sc/source/filter/oox/condformatbuffer.cxx | 10 | ||||
-rw-r--r-- | sc/source/filter/oox/extlstcontext.cxx | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/sc/source/filter/oox/condformatbuffer.cxx b/sc/source/filter/oox/condformatbuffer.cxx index df133a4a4182..87d8b9723239 100644 --- a/sc/source/filter/oox/condformatbuffer.cxx +++ b/sc/source/filter/oox/condformatbuffer.cxx @@ -1159,10 +1159,10 @@ void CondFormatBuffer::finalizeImport() pDoc->AddCondFormatData(rRange, nTab, nKey); } - const boost::ptr_vector<ScFormatEntry>& rEntries = itr->getEntries(); + const std::vector< std::unique_ptr<ScFormatEntry> >& rEntries = itr->getEntries(); for (auto i = rEntries.begin(); i != rEntries.end(); ++i) { - pFormat->AddEntry(i->Clone(pDoc)); + pFormat->AddEntry((*i)->Clone(pDoc)); } } } @@ -1328,10 +1328,10 @@ void ExtCfDataBarRule::importCfvo( const AttributeList& rAttribs ) maModel.maColorScaleType = rAttribs.getString( XML_type, OUString() ); } -ExtCfCondFormat::ExtCfCondFormat(const ScRangeList& rRange, boost::ptr_vector<ScFormatEntry>& rEntries): +ExtCfCondFormat::ExtCfCondFormat(const ScRangeList& rRange, std::vector< std::unique_ptr<ScFormatEntry> >& rEntries): maRange(rRange) { - maEntries.transfer(maEntries.begin(), rEntries.begin(), rEntries.end(), rEntries); + maEntries.swap(rEntries); } ExtCfCondFormat::~ExtCfCondFormat() @@ -1343,7 +1343,7 @@ const ScRangeList& ExtCfCondFormat::getRange() return maRange; } -const boost::ptr_vector<ScFormatEntry>& ExtCfCondFormat::getEntries() +const std::vector< std::unique_ptr<ScFormatEntry> >& ExtCfCondFormat::getEntries() { return maEntries; } diff --git a/sc/source/filter/oox/extlstcontext.cxx b/sc/source/filter/oox/extlstcontext.cxx index b7ff5de9b5a6..852ba7862f81 100644 --- a/sc/source/filter/oox/extlstcontext.cxx +++ b/sc/source/filter/oox/extlstcontext.cxx @@ -16,6 +16,7 @@ #include "document.hxx" #include "rangeutl.hxx" +#include <o3tl/make_unique.hxx> using ::oox::core::ContextHandlerRef; @@ -79,7 +80,7 @@ ContextHandlerRef ExtConditionalFormattingContext::onCreateContext(sal_Int32 nEl { if (mpCurrentRule) { - ScFormatEntry& rFormat = *maEntries.rbegin(); + ScFormatEntry& rFormat = *maEntries.rbegin()->get(); assert(rFormat.GetType() == condformat::ICONSET); ScIconSetFormat& rIconSet = static_cast<ScIconSetFormat&>(rFormat); ScDocument* pDoc = &getScDocument(); @@ -111,8 +112,7 @@ ContextHandlerRef ExtConditionalFormattingContext::onCreateContext(sal_Int32 nEl { ScDocument* pDoc = &getScDocument(); mpCurrentRule = new IconSetRule(*this); - ScIconSetFormat* pIconSet = new ScIconSetFormat(pDoc); - maEntries.push_back(pIconSet); + maEntries.push_back(o3tl::make_unique<ScIconSetFormat>(pDoc)); return new IconSetContext(*this, mpCurrentRule); } else |