From 44c00333920da77a8af0ffd483300cf88eee53bb Mon Sep 17 00:00:00 2001 From: Rafael Dominguez Date: Sat, 17 Mar 2012 12:54:20 +0000 Subject: Handle case XErrorbars in ErrorBarItemConverter::ApplySpecialItem. --- .../source/controller/itemsetwrapper/ErrorBarItemConverter.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'chart2/source') diff --git a/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx b/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx index 71082044e8dd..298e41658949 100644 --- a/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx @@ -286,7 +286,9 @@ bool ErrorBarItemConverter::ApplySpecialItem( case SCHATTR_STAT_RANGE_NEG: { // @todo: also be able to deal with x-error bars - const bool bYError = true; + const bool bYError = + static_cast(rItemSet.Get(SCHATTR_STAT_ERRORBAR_TYPE)).GetValue(); + uno::Reference< chart2::data::XDataSource > xErrorBarSource( GetPropertySet(), uno::UNO_QUERY ); uno::Reference< chart2::XChartDocument > xChartDoc( m_xModel, uno::UNO_QUERY ); uno::Reference< chart2::data::XDataProvider > xDataProvider; @@ -437,12 +439,15 @@ void ErrorBarItemConverter::FillSpecialItem( case SCHATTR_STAT_RANGE_POS: case SCHATTR_STAT_RANGE_NEG: { + const bool bYError = + static_cast(rOutItemSet.Get(SCHATTR_STAT_ERRORBAR_TYPE)).GetValue(); + uno::Reference< chart2::data::XDataSource > xErrorBarSource( GetPropertySet(), uno::UNO_QUERY ); if( xErrorBarSource.is()) { uno::Reference< chart2::data::XDataSequence > xSeq( StatisticsHelper::getErrorDataSequenceFromDataSource( - xErrorBarSource, (nWhichId == SCHATTR_STAT_RANGE_POS) /*, true */ /* y */ )); + xErrorBarSource, (nWhichId == SCHATTR_STAT_RANGE_POS), bYError )); if( xSeq.is()) rOutItemSet.Put( SfxStringItem( nWhichId, String( xSeq->getSourceRangeRepresentation()))); } -- cgit