diff options
author | Michael Stahl <mstahl@redhat.com> | 2016-01-12 11:51:17 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-01-12 12:22:34 +0100 |
commit | 9ec53cce39f8b337cf6f4b9dd381d1e7ff7b02a2 (patch) | |
tree | d6efca55b64b7998bc62a4b349ba1b9666fcd8ee /sc/source | |
parent | 79257f615e87dbd140bd8a6bd191cf7f027c137c (diff) |
sc: replace boost::ptr_map with std::map<std::unique_ptr>
Change-Id: I319c7141749df11f7ec0b03b43f4f86cb743ada5
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/filter/excel/frmbase.cxx | 18 | ||||
-rw-r--r-- | sc/source/filter/inc/formel.hxx | 9 |
2 files changed, 15 insertions, 12 deletions
diff --git a/sc/source/filter/excel/frmbase.cxx b/sc/source/filter/excel/frmbase.cxx index 4e77af817f27..c31d2f8adbbb 100644 --- a/sc/source/filter/excel/frmbase.cxx +++ b/sc/source/filter/excel/frmbase.cxx @@ -19,6 +19,8 @@ #include "formel.hxx" +#include <o3tl/make_unique.hxx> + _ScRangeListTabs::_ScRangeListTabs() { } @@ -55,12 +57,12 @@ void _ScRangeListTabs::Append( const ScAddress& aSRD, SCTAB nTab, const bool b ) if (nTab < 0 || MAXTAB < nTab) return; - TabRangeType::iterator itr = maTabRanges.find(nTab); - if (itr == maTabRanges.end()) + TabRangeType::iterator itr = m_TabRanges.find(nTab); + if (itr == m_TabRanges.end()) { // No entry for this table yet. Insert a new one. std::pair<TabRangeType::iterator, bool> r = - maTabRanges.insert(nTab, new RangeListType); + m_TabRanges.insert(std::make_pair(nTab, o3tl::make_unique<RangeListType>())); if (!r.second) // Insertion failed. @@ -125,12 +127,12 @@ void _ScRangeListTabs::Append( const ScRange& aCRD, SCTAB nTab, bool b ) if (nTab < 0 || MAXTAB < nTab) return; - TabRangeType::iterator itr = maTabRanges.find(nTab); - if (itr == maTabRanges.end()) + TabRangeType::iterator itr = m_TabRanges.find(nTab); + if (itr == m_TabRanges.end()) { // No entry for this table yet. Insert a new one. std::pair<TabRangeType::iterator, bool> r = - maTabRanges.insert(nTab, new RangeListType); + m_TabRanges.insert(std::make_pair(nTab, o3tl::make_unique<RangeListType>())); if (!r.second) // Insertion failed. @@ -145,8 +147,8 @@ const ScRange* _ScRangeListTabs::First( SCTAB n ) { OSL_ENSURE( ValidTab(n), "-_ScRangeListTabs::First(): Good bye!" ); - TabRangeType::iterator itr = maTabRanges.find(n); - if (itr == maTabRanges.end()) + TabRangeType::iterator itr = m_TabRanges.find(n); + if (itr == m_TabRanges.end()) // No range list exists for this table. return nullptr; diff --git a/sc/source/filter/inc/formel.hxx b/sc/source/filter/inc/formel.hxx index e5d1e463961b..76c8a81bd048 100644 --- a/sc/source/filter/inc/formel.hxx +++ b/sc/source/filter/inc/formel.hxx @@ -26,8 +26,9 @@ #include "root.hxx" #include "tokstack.hxx" -#include <boost/ptr_container/ptr_map.hpp> +#include <memory> #include <vector> +#include <map> namespace svl { @@ -60,8 +61,8 @@ enum FORMULA_TYPE class _ScRangeListTabs { typedef ::std::vector<ScRange> RangeListType; - typedef ::boost::ptr_map<SCTAB, RangeListType> TabRangeType; - TabRangeType maTabRanges; + typedef ::std::map<SCTAB, std::unique_ptr<RangeListType>> TabRangeType; + TabRangeType m_TabRanges; RangeListType::const_iterator maItrCur; RangeListType::const_iterator maItrCurEnd; @@ -75,7 +76,7 @@ public: const ScRange* First ( SCTAB nTab = 0 ); const ScRange* Next (); - bool HasRanges () const { return !maTabRanges.empty(); } + bool HasRanges () const { return !m_TabRanges.empty(); } }; class ConverterBase |