summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-11-12 14:04:14 +0200
committerNoel Grandin <noel@peralex.com>2015-11-13 10:54:18 +0200
commit0f611e670a36d22c66d91ee309eccac1ea65e0e9 (patch)
treeea05633104caa73ca5bb0f7fe1a30e23bee8e67f /sc
parent9265f9bd35ff6ef0e4ab285dd9fecebce6976e8d (diff)
sc: boost::ptr_vector->std::vector<std::unique_ptr>
Change-Id: Ie5d21180d49a7d82d4cc1f5b9a71152bb86d0555
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/inc/condformatbuffer.hxx7
-rw-r--r--sc/source/filter/oox/condformatbuffer.cxx6
-rw-r--r--sc/source/filter/oox/extlstcontext.cxx4
3 files changed, 8 insertions, 9 deletions
diff --git a/sc/source/filter/inc/condformatbuffer.hxx b/sc/source/filter/inc/condformatbuffer.hxx
index b2dd6c145a59..ccb498c11c76 100644
--- a/sc/source/filter/inc/condformatbuffer.hxx
+++ b/sc/source/filter/inc/condformatbuffer.hxx
@@ -26,8 +26,7 @@
#include "rangelst.hxx"
#include <memory>
-
-#include <boost/ptr_container/ptr_vector.hpp>
+#include <vector>
class ScColorScaleFormat;
class ScDataBarFormat;
@@ -293,7 +292,7 @@ public:
/** Imports settings from the CONDFORMATTING record. */
CondFormatRef importCondFormatting( SequenceInputStream& rStrm );
ExtCfDataBarRuleRef createExtCfDataBarRule(ScDataBarFormatData* pTarget);
- boost::ptr_vector<ExtCfCondFormat>& importExtCondFormat();
+ std::vector< std::unique_ptr<ExtCfCondFormat> >& importExtCondFormat();
/** Converts an OOXML condition operator token to the API constant. */
static sal_Int32 convertToApiOperator( sal_Int32 nToken );
@@ -307,7 +306,7 @@ private:
typedef RefVector< ExtCfDataBarRule > ExtCfDataBarRuleVec;
CondFormatVec maCondFormats; /// All conditional formatting in a sheet.
ExtCfDataBarRuleVec maCfRules; /// All external conditional formatting rules in a sheet.
- boost::ptr_vector<ExtCfCondFormat> maExtCondFormats;
+ std::vector< std::unique_ptr<ExtCfCondFormat> > maExtCondFormats;
};
} // namespace xls
diff --git a/sc/source/filter/oox/condformatbuffer.cxx b/sc/source/filter/oox/condformatbuffer.cxx
index 87d8b9723239..4ab87edf6271 100644
--- a/sc/source/filter/oox/condformatbuffer.cxx
+++ b/sc/source/filter/oox/condformatbuffer.cxx
@@ -1147,7 +1147,7 @@ void CondFormatBuffer::finalizeImport()
{
ScDocument* pDoc = &getScDocument();
- const ScRangeList& rRange = itr->getRange();
+ const ScRangeList& rRange = (*itr)->getRange();
SCTAB nTab = rRange.front()->aStart.Tab();
ScConditionalFormat* pFormat = findFormatByRange(rRange, pDoc, nTab);
if (!pFormat)
@@ -1159,7 +1159,7 @@ void CondFormatBuffer::finalizeImport()
pDoc->AddCondFormatData(rRange, nTab, nKey);
}
- const std::vector< std::unique_ptr<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));
@@ -1181,7 +1181,7 @@ ExtCfDataBarRuleRef CondFormatBuffer::createExtCfDataBarRule(ScDataBarFormatData
return extRule;
}
-boost::ptr_vector<ExtCfCondFormat>& CondFormatBuffer::importExtCondFormat()
+std::vector< std::unique_ptr<ExtCfCondFormat> >& CondFormatBuffer::importExtCondFormat()
{
return maExtCondFormats;
}
diff --git a/sc/source/filter/oox/extlstcontext.cxx b/sc/source/filter/oox/extlstcontext.cxx
index 852ba7862f81..1739bcb3348c 100644
--- a/sc/source/filter/oox/extlstcontext.cxx
+++ b/sc/source/filter/oox/extlstcontext.cxx
@@ -163,8 +163,8 @@ void ExtConditionalFormattingContext::onEndElement()
aRange[i]->aEnd.SetTab(nTab);
}
- boost::ptr_vector<ExtCfCondFormat>& rExtFormats = getCondFormats().importExtCondFormat();
- rExtFormats.push_back(new ExtCfCondFormat(aRange, maEntries));
+ std::vector< std::unique_ptr<ExtCfCondFormat> >& rExtFormats = getCondFormats().importExtCondFormat();
+ rExtFormats.push_back(o3tl::make_unique<ExtCfCondFormat>(aRange, maEntries));
}
break;
case XLS14_TOKEN(cfRule):