Kaydet (Commit) 581978b9 authored tarafından Rafael Dominguez's avatar Rafael Dominguez Kaydeden (comit) Markus Mohrhard

Get correct datasource when calculating errorbar length.

üst 6294d8f4
...@@ -637,7 +637,8 @@ double lcl_getErrorBarLogicLength( ...@@ -637,7 +637,8 @@ double lcl_getErrorBarLogicLength(
uno::Reference< beans::XPropertySet > xProp, uno::Reference< beans::XPropertySet > xProp,
sal_Int32 nErrorBarStyle, sal_Int32 nErrorBarStyle,
sal_Int32 nIndex, sal_Int32 nIndex,
bool bPositive ) bool bPositive,
bool bYError )
{ {
double fResult; double fResult;
::rtl::math::setNan( & fResult ); ::rtl::math::setNan( & fResult );
...@@ -706,7 +707,7 @@ double lcl_getErrorBarLogicLength( ...@@ -706,7 +707,7 @@ double lcl_getErrorBarLogicLength(
uno::Reference< chart2::data::XDataSource > xErrorBarData( xProp, uno::UNO_QUERY ); uno::Reference< chart2::data::XDataSource > xErrorBarData( xProp, uno::UNO_QUERY );
if( xErrorBarData.is()) if( xErrorBarData.is())
fResult = StatisticsHelper::getErrorFromDataSource( fResult = StatisticsHelper::getErrorFromDataSource(
xErrorBarData, nIndex, bPositive); xErrorBarData, nIndex, bPositive, bYError);
} }
break; break;
} }
...@@ -851,7 +852,7 @@ void VSeriesPlotter::createErrorBar( ...@@ -851,7 +852,7 @@ void VSeriesPlotter::createErrorBar(
if( bShowPositive ) if( bShowPositive )
{ {
double fLength = lcl_getErrorBarLogicLength( aData, xErrorBarProperties, nErrorBarStyle, nIndex, true ); double fLength = lcl_getErrorBarLogicLength( aData, xErrorBarProperties, nErrorBarStyle, nIndex, true, bYError );
if( ::rtl::math::isFinite( fLength ) ) if( ::rtl::math::isFinite( fLength ) )
{ {
double fLocalX = fX; double fLocalX = fX;
...@@ -874,7 +875,7 @@ void VSeriesPlotter::createErrorBar( ...@@ -874,7 +875,7 @@ void VSeriesPlotter::createErrorBar(
if( bShowNegative ) if( bShowNegative )
{ {
double fLength = lcl_getErrorBarLogicLength( aData, xErrorBarProperties, nErrorBarStyle, nIndex, false ); double fLength = lcl_getErrorBarLogicLength( aData, xErrorBarProperties, nErrorBarStyle, nIndex, false, bYError );
if( ::rtl::math::isFinite( fLength ) ) if( ::rtl::math::isFinite( fLength ) )
{ {
double fLocalX = fX; double fLocalX = fX;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment