diff options
author | Kurt Zenker <kz@openoffice.org> | 2009-09-14 10:57:16 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2009-09-14 10:57:16 +0000 |
commit | 8fb4e719e4d0e90afdc3685edd4d9cf3a097cfa6 (patch) | |
tree | ce4e8c2e1c37f6d98e048fd96a33eaea079d0e0d /chart2 | |
parent | 6c08543a370b759d495b0f4a593b1f7cd329de64 (diff) |
CWS-TOOLING: integrate CWS chart41
2009-09-07 11:17:59 +0200 iha r275880 : #i104854# ODF: Fallback to bar chart for surface charts as long as surface charts are not implemented
2009-09-03 10:07:24 +0200 iha r275745 : #i104020# Y axis scaling problem with stock chart
2009-09-02 17:11:42 +0200 iha r275723 : #i103984# XChartDataArray / setDataArray broken
2009-09-02 17:05:16 +0200 iha r275721 : #i103984# XChartDataArray / setDataArray broken
2009-08-31 18:18:21 +0200 iha r275629 : #i103076# ODF, chart from MS-Office2007sp2 doesn't load caused be different xlink:href syntax
2009-08-28 18:35:52 +0200 iha r275548 : #i103460# ODF charts without svg:width and svg:height are not imported correctly
2009-08-28 18:35:25 +0200 iha r275547 : #i103460# ODF charts without svg:width and svg:height are not imported correctly
2009-08-28 18:25:45 +0200 iha r275546 : #i103460# ODF charts without svg:width and svg:height are not imported correctly
2009-08-28 18:23:21 +0200 iha r275544 : #i103460# ODF charts without svg:width and svg:height are not imported correctly
2009-08-28 18:18:34 +0200 iha r275543 : #i103460# ODF charts without svg:width and svg:height are not imported correctly
2009-08-27 15:57:20 +0200 iha r275490 : #i104160# report designer broken
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/tools/InternalDataProvider.cxx | 10 | ||||
-rw-r--r-- | chart2/source/view/main/VDataSeries.cxx | 82 |
2 files changed, 56 insertions, 36 deletions
diff --git a/chart2/source/tools/InternalDataProvider.cxx b/chart2/source/tools/InternalDataProvider.cxx index 880cd5c72984..4d8f7be112ff 100644 --- a/chart2/source/tools/InternalDataProvider.cxx +++ b/chart2/source/tools/InternalDataProvider.cxx @@ -393,8 +393,8 @@ void InternalData::swapAllDataAtIndexWithNext( sal_Int32 nAtIndex, bool bDataInC bool InternalData::enlargeData( sal_Int32 nColumnCount, sal_Int32 nRowCount ) { - sal_Int32 nNewColumnCount( ::std::max<sal_Int32>(1, ::std::max<sal_Int32>( m_nColumnCount, nColumnCount ))); - sal_Int32 nNewRowCount( ::std::max<sal_Int32>(1, ::std::max<sal_Int32>( m_nRowCount, nRowCount ))); + sal_Int32 nNewColumnCount( ::std::max<sal_Int32>( m_nColumnCount, nColumnCount ) ); + sal_Int32 nNewRowCount( ::std::max<sal_Int32>( m_nRowCount, nRowCount ) ); sal_Int32 nNewSize( nNewColumnCount*nNewRowCount ); bool bGrow = (nNewSize > m_nColumnCount*m_nRowCount); @@ -412,9 +412,9 @@ bool InternalData::enlargeData( sal_Int32 nColumnCount, sal_Int32 nRowCount ) m_aData.resize( nNewSize ); m_aData = aNewData; - m_nColumnCount = nNewColumnCount; - m_nRowCount = nNewRowCount; } + m_nColumnCount = nNewColumnCount; + m_nRowCount = nNewRowCount; return bGrow; } @@ -739,6 +739,8 @@ Sequence< Reference< chart2::data::XLabeledDataSequence > > { ::std::vector< OUString > aLabels( rInternalData.getColumnLabels()); OSL_ASSERT( static_cast< size_t >( nNewIndex ) < aLabels.size()); + if( aLabels.size() <= static_cast< size_t >( nNewIndex ) ) + aLabels.resize( nNewIndex+1 ); aLabels[nNewIndex] = impl::FlattenStringSequence( xLabel->getTextualData()); rInternalData.setColumnLabels( aLabels ); Reference< chart2::data::XDataSequence > xNewLabel( 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); |