summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx9
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())));
}