summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2011-03-01 20:13:40 -0500
committerKohei Yoshida <kyoshida@novell.com>2011-03-01 20:13:40 -0500
commitf369679dcc2b60567406910f8c621098fb61f149 (patch)
treef89d30085227388b2c26ecc5b8acb5c3c7b72b29 /sc
parent070a499b5ccfc0858f11124d6a79b07fe56199b1 (diff)
More on ScfRefMap to boost::ptr_map.
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/excel/xichart.cxx24
-rw-r--r--sc/source/filter/inc/xichart.hxx4
2 files changed, 14 insertions, 14 deletions
diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx
index 833048c8a4bf..784241a3aa0c 100644
--- a/sc/source/filter/excel/xichart.cxx
+++ b/sc/source/filter/excel/xichart.cxx
@@ -2702,15 +2702,15 @@ void XclImpChTypeGroup::ReadChDropBar( XclImpStream& rStrm )
{
if (maDropBars.find(EXC_CHDROPBAR_UP) == maDropBars.end())
{
- XclImpChDropBarRef p(new XclImpChDropBar(EXC_CHDROPBAR_UP));
+ auto_ptr<XclImpChDropBar> p(new XclImpChDropBar(EXC_CHDROPBAR_UP));
p->ReadRecordGroup(rStrm);
- maDropBars.insert(XclImpChDropBarMap::value_type(EXC_CHDROPBAR_UP, p));
+ maDropBars.insert(EXC_CHDROPBAR_UP, p);
}
else if(maDropBars.find(EXC_CHDROPBAR_DOWN) == maDropBars.end())
{
- XclImpChDropBarRef p(new XclImpChDropBar(EXC_CHDROPBAR_DOWN));
+ auto_ptr<XclImpChDropBar> p(new XclImpChDropBar(EXC_CHDROPBAR_DOWN));
p->ReadRecordGroup(rStrm);
- maDropBars.insert(XclImpChDropBarMap::value_type(EXC_CHDROPBAR_DOWN, p));
+ maDropBars.insert(EXC_CHDROPBAR_DOWN, p);
}
}
@@ -2829,20 +2829,20 @@ void XclImpChTypeGroup::CreateStockSeries( Reference< XChartType > xChartType, s
xHiLoLine->second->Convert( GetChRoot(), aSeriesProp, EXC_CHOBJTYPE_HILOLINE );
}
// white dropbar format
- XclImpChDropBarRef xUpBar = maDropBars.get( EXC_CHDROPBAR_UP );
- Reference< XPropertySet > xWhitePropSet;
- if( xUpBar && aTypeProp.GetProperty( xWhitePropSet, EXC_CHPROP_WHITEDAY ) )
+ XclImpChDropBarMap::const_iterator itr = maDropBars.find(EXC_CHDROPBAR_UP);
+ Reference<XPropertySet> xWhitePropSet;
+ if (itr != maDropBars.end() && aTypeProp.GetProperty(xWhitePropSet, EXC_CHPROP_WHITEDAY))
{
ScfPropertySet aBarProp( xWhitePropSet );
- xUpBar->Convert( GetChRoot(), aBarProp );
+ itr->second->Convert(GetChRoot(), aBarProp);
}
// black dropbar format
- XclImpChDropBarRef xDownBar = maDropBars.get( EXC_CHDROPBAR_DOWN );
- Reference< XPropertySet > xBlackPropSet;
- if( xDownBar && aTypeProp.GetProperty( xBlackPropSet, EXC_CHPROP_BLACKDAY ) )
+ itr = maDropBars.find(EXC_CHDROPBAR_DOWN);
+ Reference<XPropertySet> xBlackPropSet;
+ if (itr != maDropBars.end() && aTypeProp.GetProperty(xBlackPropSet, EXC_CHPROP_BLACKDAY))
{
ScfPropertySet aBarProp( xBlackPropSet );
- xDownBar->Convert( GetChRoot(), aBarProp );
+ itr->second->Convert(GetChRoot(), aBarProp);
}
// insert the series into the chart type object
diff --git a/sc/source/filter/inc/xichart.hxx b/sc/source/filter/inc/xichart.hxx
index 7a12b07b7431..f25b51c39c82 100644
--- a/sc/source/filter/inc/xichart.hxx
+++ b/sc/source/filter/inc/xichart.hxx
@@ -1107,8 +1107,8 @@ private:
private:
typedef ::std::vector< XclImpChSeriesRef > XclImpChSeriesVec;
- typedef ScfRefMap< sal_uInt16, XclImpChDropBar > XclImpChDropBarMap;
- typedef boost::ptr_map< sal_uInt16, XclImpChLineFormat > XclImpChLineFormatMap;
+ typedef boost::ptr_map<sal_uInt16, XclImpChDropBar> XclImpChDropBarMap;
+ typedef boost::ptr_map<sal_uInt16, XclImpChLineFormat> XclImpChLineFormatMap;
typedef ::std::set< sal_uInt16 > UInt16Set;
XclChTypeGroup maData; /// Contents of the CHTYPEGROUP record.