summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chart2/source/view/main/VDataSeries.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/chart2/source/view/main/VDataSeries.cxx b/chart2/source/view/main/VDataSeries.cxx
index db15072d2414..1631b0397172 100644
--- a/chart2/source/view/main/VDataSeries.cxx
+++ b/chart2/source/view/main/VDataSeries.cxx
@@ -522,9 +522,13 @@ void VDataSeries::getMinMaxXValue(double& fMin, double& fMax) const
{
double aValue;
- fMax = fMin = aValuesX[0];
+ sal_Int32 i = 0;
+ while ( i < aValuesX.getLength() && ::rtl::math::isNan( aValuesX[i] ) )
+ i++;
+ if ( i < aValuesX.getLength() )
+ fMax = fMin = aValuesX[i++];
- for (sal_Int32 i = 1; i < aValuesX.getLength(); i++)
+ for ( ; i < aValuesX.getLength(); i++)
{
aValue = aValuesX[i];
if ( aValue > fMax)