diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-10-10 03:10:45 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-11-19 13:47:35 +0100 |
commit | 12c7995028c1442bff0cb9f81fd28f86e04573ab (patch) | |
tree | 06c29562e2a4cf902ee39df25245cd0cb3b8c917 /chart2 | |
parent | fcfb42808464ea909ace4a892803c2e8e9e3bd1d (diff) |
small clean up in chart code
Change-Id: I42c1b4aa4e174917199d1635a044b8698d8ae851
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/view/charttypes/BarChart.cxx | 2 | ||||
-rw-r--r-- | chart2/source/view/charttypes/VSeriesPlotter.cxx | 7 | ||||
-rw-r--r-- | chart2/source/view/main/ChartView.cxx | 2 |
3 files changed, 5 insertions, 6 deletions
diff --git a/chart2/source/view/charttypes/BarChart.cxx b/chart2/source/view/charttypes/BarChart.cxx index ef9e1a19a38c..96386d85c553 100644 --- a/chart2/source/view/charttypes/BarChart.cxx +++ b/chart2/source/view/charttypes/BarChart.cxx @@ -117,8 +117,6 @@ drawing::Direction3D BarChart::getPreferredDiagramAspectRatio() const bool BarChart::keepAspectRatio() const { - if( m_nDimension == 3 ) - return true; return true; } diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx index be9af9f707c7..444ee2e4dc0d 100644 --- a/chart2/source/view/charttypes/VSeriesPlotter.cxx +++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx @@ -110,7 +110,7 @@ VDataSeriesGroup::~VDataSeriesGroup() void VDataSeriesGroup::deleteSeries() { //delete all data series help objects: - ::std::vector< VDataSeries* >::const_iterator aIter = m_aSeriesVector.begin(); + ::std::vector< VDataSeries* >::const_iterator aIter = m_aSeriesVector.begin(); const ::std::vector< VDataSeries* >::const_iterator aEnd = m_aSeriesVector.end(); for( ; aIter != aEnd; ++aIter ) { @@ -168,8 +168,8 @@ VSeriesPlotter::~VSeriesPlotter() while( aPosIt != m_aSecondaryPosHelperMap.end() ) { PlottingPositionHelper* pPosHelper = aPosIt->second; - if( pPosHelper ) - delete pPosHelper; + delete pPosHelper; + ++aPosIt; } m_aSecondaryPosHelperMap.clear(); @@ -2418,7 +2418,6 @@ VSeriesPlotter* VSeriesPlotter::createSeriesPlotter( { OUString aChartType = xChartTypeModel->getChartType(); - //@todo: in future the plotter should be instanciated via service factory VSeriesPlotter* pRet=NULL; if( aChartType.equalsIgnoreAsciiCase( CHART2_SERVICE_NAME_CHARTTYPE_COLUMN ) ) pRet = new BarChart(xChartTypeModel,nDimensionCount); diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index ae309b4f7cb8..ae48bbb4d030 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -679,6 +679,7 @@ void SeriesPlotterContainer::initializeCooSysAndSeriesPlotter( VSeriesPlotter* pPlotter = VSeriesPlotter::createSeriesPlotter( xChartType, nDimensionCount, bExcludingPositioning ); if( !pPlotter ) continue; + m_aSeriesPlotterList.push_back( pPlotter ); pPlotter->setNumberFormatsSupplier( xNumberFormatsSupplier ); pPlotter->setColorScheme( xColorScheme ); @@ -693,6 +694,7 @@ void SeriesPlotterContainer::initializeCooSysAndSeriesPlotter( OSL_ASSERT( xDataSeriesContainer.is()); if( !xDataSeriesContainer.is() ) continue; + sal_Int32 zSlot=-1; sal_Int32 xSlot=-1; sal_Int32 ySlot=-1; |