summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-01-13 16:52:08 +0100
committerMichael Stahl <mstahl@redhat.com>2016-01-13 17:53:12 +0100
commit3071ff2693fc9cb4541b240f758997402d5eb9fc (patch)
treef188e944df490027786cc4bd2a266d2e9dc55b5d /sc
parent53a7198c9bbb2bc08568347be9ac3af21423acf0 (diff)
sc: replace boost::ptr_map with std::map<std::unique_ptr>
Change-Id: I1be831515ee0c86242dcdbea9704febf6b3c5695
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/excel/xepivotxml.cxx14
-rw-r--r--sc/source/filter/inc/xepivotxml.hxx7
2 files changed, 12 insertions, 9 deletions
diff --git a/sc/source/filter/excel/xepivotxml.cxx b/sc/source/filter/excel/xepivotxml.cxx
index 23e010e9c509..f655c2b6bca7 100644
--- a/sc/source/filter/excel/xepivotxml.cxx
+++ b/sc/source/filter/excel/xepivotxml.cxx
@@ -20,6 +20,8 @@
#include <com/sun/star/sheet/DataPilotOutputRangeType.hpp>
#include <com/sun/star/sheet/GeneralFunction.hpp>
+#include <o3tl/make_unique.hxx>
+
#include <vector>
using namespace oox;
@@ -343,16 +345,16 @@ void XclExpXmlPivotTableManager::Initialize()
sal_Int32 nCacheId = itCache->second;
SCTAB nTab = rDPObj.GetOutRange().aStart.Tab();
- TablesType::iterator it = maTables.find(nTab);
- if (it == maTables.end())
+ TablesType::iterator it = m_Tables.find(nTab);
+ if (it == m_Tables.end())
{
// Insert a new instance for this sheet index.
std::pair<TablesType::iterator, bool> r =
- maTables.insert(nTab, new XclExpXmlPivotTables(GetRoot(), maCaches));
+ m_Tables.insert(std::make_pair(nTab, o3tl::make_unique<XclExpXmlPivotTables>(GetRoot(), maCaches)));
it = r.first;
}
- XclExpXmlPivotTables* p = it->second;
+ XclExpXmlPivotTables *const p = it->second.get();
p->AppendTable(&rDPObj, nCacheId, i+1);
}
@@ -366,8 +368,8 @@ XclExpXmlPivotCaches& XclExpXmlPivotTableManager::GetCaches()
XclExpXmlPivotTables* XclExpXmlPivotTableManager::GetTablesBySheet( SCTAB nTab )
{
- TablesType::iterator it = maTables.find(nTab);
- return it == maTables.end() ? nullptr : it->second;
+ TablesType::iterator const it = m_Tables.find(nTab);
+ return it == m_Tables.end() ? nullptr : it->second.get();
}
XclExpXmlPivotTables::Entry::Entry( const ScDPObject* pTable, sal_Int32 nCacheId, sal_Int32 nPivotId ) :
diff --git a/sc/source/filter/inc/xepivotxml.hxx b/sc/source/filter/inc/xepivotxml.hxx
index d04f5b79b24e..ca1e4a527644 100644
--- a/sc/source/filter/inc/xepivotxml.hxx
+++ b/sc/source/filter/inc/xepivotxml.hxx
@@ -13,7 +13,8 @@
#include <xerecord.hxx>
#include <xeroot.hxx>
-#include <boost/ptr_container/ptr_map.hpp>
+#include <memory>
+#include <map>
#include <unordered_map>
class ScDPCache;
@@ -74,7 +75,7 @@ private:
class XclExpXmlPivotTableManager : protected XclExpRoot
{
- typedef boost::ptr_map<SCTAB, XclExpXmlPivotTables> TablesType;
+ typedef std::map<SCTAB, std::unique_ptr<XclExpXmlPivotTables>> TablesType;
typedef std::unordered_map<const ScDPObject*, sal_Int32> CacheIdMapType;
public:
XclExpXmlPivotTableManager( const XclExpRoot& rRoot );
@@ -86,7 +87,7 @@ public:
private:
XclExpXmlPivotCaches maCaches;
- TablesType maTables;
+ TablesType m_Tables;
CacheIdMapType maCacheIdMap;
};