diff --git a/chart2/source/view/charttypes/AreaChart.cxx b/chart2/source/view/charttypes/AreaChart.cxx index df6164adc9cf..1bc61f8ca0e8 100644 --- a/chart2/source/view/charttypes/AreaChart.cxx +++ b/chart2/source/view/charttypes/AreaChart.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: AreaChart.cxx,v $ - * $Revision: 1.53 $ + * $Revision: 1.54 $ * * This file is part of OpenOffice.org. * @@ -45,8 +45,10 @@ #include "LabelPositionHelper.hxx" #include "Clipping.hxx" #include "Stripe.hxx" + #include #include +#include #include #include #include @@ -707,6 +709,23 @@ void AreaChart::createShapes() if(!pSeries) continue; + sal_Int32 nMissingValueTreatment = pSeries->getMissingValueTreatment(); + switch( nMissingValueTreatment ) + { + case ::com::sun::star::chart::MissingValueTreatment::LEAVE_GAP: + if( !m_bArea ) + m_eNanHandling = NAN_AS_GAP; + break; + case ::com::sun::star::chart::MissingValueTreatment::USE_ZERO: + m_eNanHandling = NAN_AS_ZERO; + break; + case ::com::sun::star::chart::MissingValueTreatment::CONTINUE: + m_eNanHandling = NAN_AS_INTERPOLATED; + break; + default: + break; + } + /* #i70133# ignore points outside of series length in standard area charts. Stacked area charts will use missing points as zeros. In standard charts, pSeriesList contains only one series. */