diff options
author | Michael Stahl <mstahl@redhat.com> | 2016-01-13 16:58:45 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-01-13 17:53:12 +0100 |
commit | 1713124948122b44763d2241503f2daa1e207538 (patch) | |
tree | a594aa54dec93de315b838fa33dafc7ea4a6515b /sc | |
parent | 3071ff2693fc9cb4541b240f758997402d5eb9fc (diff) |
sc: replace boost::ptr_map with std::map<std::unique_ptr>
Change-Id: Ie38b2150187129723a112f707428ebfc88546ab5
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/excel/xechart.cxx | 12 | ||||
-rw-r--r-- | sc/source/filter/inc/xechart.hxx | 7 |
2 files changed, 12 insertions, 7 deletions
diff --git a/sc/source/filter/excel/xechart.cxx b/sc/source/filter/excel/xechart.cxx index eac9364bd6dc..a4978a732232 100644 --- a/sc/source/filter/excel/xechart.cxx +++ b/sc/source/filter/excel/xechart.cxx @@ -53,6 +53,8 @@ #include <com/sun/star/chart2/StackingDirection.hpp> #include <com/sun/star/chart2/TickmarkStyle.hpp> +#include <o3tl/make_unique.hxx> + #include <tools/gen.hxx> #include <vcl/outdev.hxx> #include <filter/msfilter/escherex.hxx> @@ -2471,7 +2473,7 @@ void XclExpChTypeGroup::ConvertSeries( if (bConnectBars && (maTypeInfo.meTypeCateg == EXC_CHTYPECATEG_BAR)) { sal_uInt16 nKey = EXC_CHCHARTLINE_CONNECT; - maChartLines.insert(nKey, new XclExpChLineFormat(GetChRoot())); + m_ChartLines.insert(std::make_pair(nKey, o3tl::make_unique<XclExpChLineFormat>(GetChRoot()))); } } else @@ -2523,8 +2525,10 @@ void XclExpChTypeGroup::WriteSubRecords( XclExpStream& rStrm ) lclSaveRecord( rStrm, mxLegend ); lclSaveRecord( rStrm, mxUpBar ); lclSaveRecord( rStrm, mxDownBar ); - for( XclExpChLineFormatMap::iterator aLIt = maChartLines.begin(), aLEnd = maChartLines.end(); aLIt != aLEnd; ++aLIt ) - lclSaveRecord( rStrm, aLIt->second, EXC_ID_CHCHARTLINE, aLIt->first ); + for (auto const& it : m_ChartLines) + { + lclSaveRecord( rStrm, it.second.get(), EXC_ID_CHCHARTLINE, it.first ); + } } sal_uInt16 XclExpChTypeGroup::GetFreeFormatIdx() const @@ -2564,7 +2568,7 @@ void XclExpChTypeGroup::CreateAllStockSeries( XclExpChLineFormatRef xLineFmt( new XclExpChLineFormat( GetChRoot() ) ); xLineFmt->Convert( GetChRoot(), aSeriesProp, EXC_CHOBJTYPE_HILOLINE ); sal_uInt16 nKey = EXC_CHCHARTLINE_HILO; - maChartLines.insert(nKey, new XclExpChLineFormat(GetChRoot())); + m_ChartLines.insert(std::make_pair(nKey, o3tl::make_unique<XclExpChLineFormat>(GetChRoot()))); } // dropbars if( bHasOpen && bHasClose ) diff --git a/sc/source/filter/inc/xechart.hxx b/sc/source/filter/inc/xechart.hxx index 3292a24097a7..11423c0307de 100644 --- a/sc/source/filter/inc/xechart.hxx +++ b/sc/source/filter/inc/xechart.hxx @@ -26,8 +26,9 @@ #include "xlstyle.hxx" #include "xeroot.hxx" #include "xestring.hxx" -#include <boost/ptr_container/ptr_map.hpp> + #include <memory> +#include <map> class Size; class Rectangle; @@ -920,7 +921,7 @@ private: private: typedef XclExpRecordList< XclExpChSeries > XclExpChSeriesList; - typedef ::boost::ptr_map<sal_uInt16, XclExpChLineFormat> XclExpChLineFormatMap; + typedef ::std::map<sal_uInt16, std::unique_ptr<XclExpChLineFormat>> XclExpChLineFormatMap; XclChTypeGroup maData; /// Contents of the CHTYPEGROUP record. XclExpChType maType; /// Chart type (e.g. CHBAR, CHLINE, ...). @@ -930,7 +931,7 @@ private: XclExpChLegendRef mxLegend; /// Chart legend (CHLEGEND group). XclExpChDropBarRef mxUpBar; /// White dropbars (CHDROPBAR group). XclExpChDropBarRef mxDownBar; /// Black dropbars (CHDROPBAR group). - XclExpChLineFormatMap maChartLines; /// Global line formats (CHCHARTLINE group). + XclExpChLineFormatMap m_ChartLines; /// Global line formats (CHCHARTLINE group). }; typedef std::shared_ptr< XclExpChTypeGroup > XclExpChTypeGroupRef; |