summaryrefslogtreecommitdiffstats
path: root/chart2
diff options
context:
space:
mode:
authorRafael Dominguez <venccsralph@gmail.com>2012-03-16 18:42:36 +0000
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-03-23 02:55:30 +0100
commit97b7e088d249a2a312d4f0d6354de2ccd44c2483 (patch)
treefa791784d640ff9d4ef62072c18e43f81de5390c /chart2
parentEnable statistics if chart has any type of errorbars. (diff)
downloadcore-97b7e088d249a2a312d4f0d6354de2ccd44c2483.tar.gz
core-97b7e088d249a2a312d4f0d6354de2ccd44c2483.zip
Get correct errorbar CID depending on the direction.
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/view/charttypes/VSeriesPlotter.cxx9
-rw-r--r--chart2/source/view/inc/VDataSeries.hxx2
-rw-r--r--chart2/source/view/inc/VSeriesPlotter.hxx2
-rw-r--r--chart2/source/view/main/VDataSeries.cxx5
4 files changed, 10 insertions, 8 deletions
diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index 64216c601d12..e0a6f3c73e55 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -365,13 +365,14 @@ uno::Reference< drawing::XShapes > VSeriesPlotter::getLabelsGroupShape( VDataSer
}
uno::Reference< drawing::XShapes > VSeriesPlotter::getErrorBarsGroupShape( VDataSeries& rDataSeries
- , const uno::Reference< drawing::XShapes >& xTarget )
+ , const uno::Reference< drawing::XShapes >& xTarget
+ , bool bYError )
{
uno::Reference< drawing::XShapes > xShapes( rDataSeries.m_xErrorBarsGroupShape );
if(!xShapes.is())
{
//create a group shape for this series and add to logic target:
- xShapes = this->createGroupShape( xTarget,rDataSeries.getErrorBarsCID() );
+ xShapes = this->createGroupShape( xTarget,rDataSeries.getErrorBarsCID(bYError) );
rDataSeries.m_xErrorBarsGroupShape = xShapes;
}
return xShapes;
@@ -941,7 +942,7 @@ void VSeriesPlotter::createErrorBar_X( const drawing::Position3D& rUnscaledLogic
if( xErrorBarProp.is())
{
uno::Reference< drawing::XShapes > xErrorBarsGroup_Shapes(
- this->getErrorBarsGroupShape(rVDataSeries, xTarget) );
+ this->getErrorBarsGroupShape(rVDataSeries, xTarget, false) );
createErrorBar( xErrorBarsGroup_Shapes
, rUnscaledLogicPosition, xErrorBarProp
@@ -963,7 +964,7 @@ void VSeriesPlotter::createErrorBar_Y( const drawing::Position3D& rUnscaledLogic
if( xErrorBarProp.is())
{
uno::Reference< drawing::XShapes > xErrorBarsGroup_Shapes(
- this->getErrorBarsGroupShape(rVDataSeries, xTarget) );
+ this->getErrorBarsGroupShape(rVDataSeries, xTarget, true) );
createErrorBar( xErrorBarsGroup_Shapes
, rUnscaledLogicPosition, xErrorBarProp
diff --git a/chart2/source/view/inc/VDataSeries.hxx b/chart2/source/view/inc/VDataSeries.hxx
index 2d808c843766..8f8aeb0d3e6d 100644
--- a/chart2/source/view/inc/VDataSeries.hxx
+++ b/chart2/source/view/inc/VDataSeries.hxx
@@ -158,7 +158,7 @@ public:
rtl::OUString getCID() const;
rtl::OUString getSeriesParticle() const;
rtl::OUString getPointCID_Stub() const;
- rtl::OUString getErrorBarsCID() const;
+ rtl::OUString getErrorBarsCID( bool bYError ) const;
rtl::OUString getLabelsCID() const;
rtl::OUString getLabelCID_Stub() const;
rtl::OUString getDataCurveCID( sal_Int32 nCurveIndex, bool bAverageLine ) const;
diff --git a/chart2/source/view/inc/VSeriesPlotter.hxx b/chart2/source/view/inc/VSeriesPlotter.hxx
index b393225b765a..e82defa6d7d6 100644
--- a/chart2/source/view/inc/VSeriesPlotter.hxx
+++ b/chart2/source/view/inc/VSeriesPlotter.hxx
@@ -331,7 +331,7 @@ protected: //methods
::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >
getErrorBarsGroupShape( VDataSeries& rDataSeries
, const::com::sun::star:: uno::Reference<
- ::com::sun::star::drawing::XShapes >& xTarget );
+ ::com::sun::star::drawing::XShapes >& xTarget, bool bYError );
::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >
createDataLabel( const ::com::sun::star::uno::Reference<
diff --git a/chart2/source/view/main/VDataSeries.cxx b/chart2/source/view/main/VDataSeries.cxx
index 259d2fd18a14..de9e1d21c22e 100644
--- a/chart2/source/view/main/VDataSeries.cxx
+++ b/chart2/source/view/main/VDataSeries.cxx
@@ -393,9 +393,10 @@ rtl::OUString VDataSeries::getPointCID_Stub() const
{
return m_aPointCID_Stub;
}
-rtl::OUString VDataSeries::getErrorBarsCID() const
+rtl::OUString VDataSeries::getErrorBarsCID(bool bYError) const
{
- rtl::OUString aChildParticle( ObjectIdentifier::getStringForType( OBJECTTYPE_DATA_ERRORS ) );
+ rtl::OUString aChildParticle( ObjectIdentifier::getStringForType(
+ bYError ? OBJECTTYPE_DATA_ERRORS_Y : OBJECTTYPE_DATA_ERRORS_X ) );
aChildParticle+=(C2U("="));
return ObjectIdentifier::createClassifiedIdentifierForParticles(