summaryrefslogtreecommitdiff
path: root/chart2/source/view
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2009-09-30 00:18:39 -0400
committerKohei Yoshida <kyoshida@novell.com>2009-09-30 00:18:39 -0400
commitc363eab53e44378091b4bb7ab653d1eb074d0094 (patch)
treed8e286a48ed97f06cd597e7ede326900e64ad463 /chart2/source/view
parentddf9f3eea0511c5971f88c9b4eb08a63a8a8d7fd (diff)
parentc4c825af22a19fa4aeb17c86df03256a081cb83a (diff)
rebased to DEV300_m60.
Diffstat (limited to 'chart2/source/view')
-rw-r--r--chart2/source/view/main/VDataSeries.cxx82
1 files changed, 50 insertions, 32 deletions
diff --git a/chart2/source/view/main/VDataSeries.cxx b/chart2/source/view/main/VDataSeries.cxx
index abe8fad1a942..f537612efd8b 100644
--- a/chart2/source/view/main/VDataSeries.cxx
+++ b/chart2/source/view/main/VDataSeries.cxx
@@ -620,24 +620,33 @@ sal_Int32 VDataSeries::getLabelPlacement( sal_Int32 nPointIndex, const uno::Refe
double VDataSeries::getMinimumofAllDifferentYValues( sal_Int32 index ) const
{
- double fY = getYValue( index );
- double fY_Min = getY_Min( index );
- double fY_Max = getY_Max( index );
- double fY_First = getY_First( index );
- double fY_Last = getY_Last( index );
-
double fMin=0.0;
::rtl::math::setInf(&fMin, false);
- if(fMin>fY)
- fMin=fY;
- if(fMin>fY_First)
- fMin=fY_First;
- if(fMin>fY_Last)
- fMin=fY_Last;
- if(fMin>fY_Min)
- fMin=fY_Min;
- if(fMin>fY_Max)
- fMin=fY_Max;
+
+ if( !m_aValues_Y.is() &&
+ (m_aValues_Y_Min.is() || m_aValues_Y_Max.is()
+ || m_aValues_Y_First.is() || m_aValues_Y_Last.is() ) )
+ {
+ double fY_Min = getY_Min( index );
+ double fY_Max = getY_Max( index );
+ double fY_First = getY_First( index );
+ double fY_Last = getY_Last( index );
+
+ if(fMin>fY_First)
+ fMin=fY_First;
+ if(fMin>fY_Last)
+ fMin=fY_Last;
+ if(fMin>fY_Min)
+ fMin=fY_Min;
+ if(fMin>fY_Max)
+ fMin=fY_Max;
+ }
+ else
+ {
+ double fY = getYValue( index );
+ if(fMin>fY)
+ fMin=fY;
+ }
if( ::rtl::math::isInf(fMin) )
::rtl::math::setNan(&fMin);
@@ -647,24 +656,33 @@ double VDataSeries::getMinimumofAllDifferentYValues( sal_Int32 index ) const
double VDataSeries::getMaximumofAllDifferentYValues( sal_Int32 index ) const
{
- double fY = getYValue( index );
- double fY_Min = getY_Min( index );
- double fY_Max = getY_Max( index );
- double fY_First = getY_First( index );
- double fY_Last = getY_Last( index );
-
double fMax=0.0;
::rtl::math::setInf(&fMax, true);
- if(fMax<fY)
- fMax=fY;
- if(fMax<fY_First)
- fMax=fY_First;
- if(fMax<fY_Last)
- fMax=fY_Last;
- if(fMax<fY_Min)
- fMax=fY_Min;
- if(fMax<fY_Max)
- fMax=fY_Max;
+
+ if( !m_aValues_Y.is() &&
+ (m_aValues_Y_Min.is() || m_aValues_Y_Max.is()
+ || m_aValues_Y_First.is() || m_aValues_Y_Last.is() ) )
+ {
+ double fY_Min = getY_Min( index );
+ double fY_Max = getY_Max( index );
+ double fY_First = getY_First( index );
+ double fY_Last = getY_Last( index );
+
+ if(fMax<fY_First)
+ fMax=fY_First;
+ if(fMax<fY_Last)
+ fMax=fY_Last;
+ if(fMax<fY_Min)
+ fMax=fY_Min;
+ if(fMax<fY_Max)
+ fMax=fY_Max;
+ }
+ else
+ {
+ double fY = getYValue( index );
+ if(fMax<fY)
+ fMax=fY;
+ }
if( ::rtl::math::isInf(fMax) )
::rtl::math::setNan(&fMax);