summaryrefslogtreecommitdiff
path: root/chart2/source/tools/ObjectIdentifier.cxx
diff options
context:
space:
mode:
authorRafael Dominguez <venccsralph@gmail.com>2012-03-16 19:29:07 +0000
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-03-23 02:55:30 +0100
commitb9b5496636285c2f920f1a0b6f6fe7ced30a5caf (patch)
tree409ec73160236bb02385d1b9a14cf290331521ac /chart2/source/tools/ObjectIdentifier.cxx
parent97b7e088d249a2a312d4f0d6354de2ccd44c2483 (diff)
Return the correct errorbar property set.
Select the errorbar propertyset according to the errorbar direction instead of only using Y errorbar propertyset in ObjectIdentifier::getObjectPropertySet function.
Diffstat (limited to 'chart2/source/tools/ObjectIdentifier.cxx')
-rw-r--r--chart2/source/tools/ObjectIdentifier.cxx20
1 files changed, 13 insertions, 7 deletions
diff --git a/chart2/source/tools/ObjectIdentifier.cxx b/chart2/source/tools/ObjectIdentifier.cxx
index 7b3b231bcc1c..5dcc2cf68d07 100644
--- a/chart2/source/tools/ObjectIdentifier.cxx
+++ b/chart2/source/tools/ObjectIdentifier.cxx
@@ -1234,6 +1234,9 @@ Reference< beans::XPropertySet > ObjectIdentifier::getObjectPropertySet(
break;
}
case OBJECTTYPE_DATA_ERRORS:
+ case OBJECTTYPE_DATA_ERRORS_X:
+ case OBJECTTYPE_DATA_ERRORS_Y:
+ case OBJECTTYPE_DATA_ERRORS_Z:
{
Reference< XDataSeries > xSeries( ObjectIdentifier::getDataSeriesForCID(
rObjectCID, xChartModel ) );
@@ -1243,18 +1246,21 @@ Reference< beans::XPropertySet > ObjectIdentifier::getObjectPropertySet(
Reference< beans::XPropertySet > xErrorBarProp;
if( xSeriesProp.is() )
{
- xSeriesProp->getPropertyValue( C2U( "ErrorBarY" )) >>= xErrorBarProp;
+ OUString errorBar;
+
+ if ( eObjectType == OBJECTTYPE_DATA_ERRORS_X)
+ errorBar = C2U("ErrorBarX");
+ else if (eObjectType == OBJECTTYPE_DATA_ERRORS_Y || eObjectType == OBJECTTYPE_DATA_ERRORS)
+ errorBar = C2U("ErrorBarY");
+ else
+ errorBar = C2U("ErrorBarZ");
+
+ xSeriesProp->getPropertyValue( errorBar ) >>= xErrorBarProp;
xObjectProperties = Reference< beans::XPropertySet >( xErrorBarProp, uno::UNO_QUERY );
}
}
break;
}
- case OBJECTTYPE_DATA_ERRORS_X:
- break;
- case OBJECTTYPE_DATA_ERRORS_Y:
- break;
- case OBJECTTYPE_DATA_ERRORS_Z:
- break;
case OBJECTTYPE_DATA_AVERAGE_LINE:
case OBJECTTYPE_DATA_CURVE:
case OBJECTTYPE_DATA_CURVE_EQUATION: