diff options
author | Rafael Dominguez <venccsralph@gmail.com> | 2012-03-17 12:54:20 +0000 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-03-23 02:55:31 +0100 |
commit | 44c00333920da77a8af0ffd483300cf88eee53bb (patch) | |
tree | a014589560a91a40168a0d33243de7a16e91105a /chart2 | |
parent | bb1979b96bcd51c2a2d85508027b42942fceecd1 (diff) |
Handle case XErrorbars in ErrorBarItemConverter::ApplySpecialItem.
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
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<const SfxBoolItem&>(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<const SfxBoolItem&>(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()))); } |