diff options
author | Rafael Dominguez <venccsralph@gmail.com> | 2012-03-11 18:02:36 +0000 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-03-23 02:55:29 +0100 |
commit | 2a1d5a428d1957b238359f454989abd0329c9aa5 (patch) | |
tree | 4622ed7f642f299f6016d28f27101fcdc49725e4 /chart2 | |
parent | 7d42654aa4e00b02940d2fcf60c2d803fc371556 (diff) |
Make executeDispatch_InsertYErrorBars a generic function.
- Make the function usable for XError and YError bars.
- Rename executeDispatch_InsertYErrorBars to executeDispatch_InsertErrorBars.
- Add a new parameter that control the error bar direction.
- Update arguments in callers.
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/controller/main/ChartController.cxx | 4 | ||||
-rw-r--r-- | chart2/source/controller/main/ChartController.hxx | 2 | ||||
-rw-r--r-- | chart2/source/controller/main/ChartController_Insert.cxx | 6 |
3 files changed, 7 insertions, 5 deletions
diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx index 3a18968f6243..8fb8adf708cf 100644 --- a/chart2/source/controller/main/ChartController.cxx +++ b/chart2/source/controller/main/ChartController.cxx @@ -1112,7 +1112,7 @@ bool lcl_isFormatObjectCommand( const rtl::OString& aCommand ) else if( aCommand.equals("InsertMenuMeanValues")) this->executeDispatch_InsertMenu_MeanValues(); else if( aCommand.equals("InsertMenuYErrorBars")) - this->executeDispatch_InsertYErrorBars(); + this->executeDispatch_InsertErrorBars(true); else if( aCommand.equals("InsertSymbol")) this->executeDispatch_InsertSpecialCharacter(); else if( aCommand.equals("InsertTrendline")) @@ -1124,7 +1124,7 @@ bool lcl_isFormatObjectCommand( const rtl::OString& aCommand ) else if( aCommand.equals("DeleteMeanValue")) this->executeDispatch_DeleteMeanValue(); else if( aCommand.equals("InsertYErrorBars")) - this->executeDispatch_InsertYErrorBars(); + this->executeDispatch_InsertErrorBars(true); else if( aCommand.equals("DeleteYErrorBars")) this->executeDispatch_DeleteYErrorBars(); else if( aCommand.equals("InsertTrendlineEquation")) diff --git a/chart2/source/controller/main/ChartController.hxx b/chart2/source/controller/main/ChartController.hxx index a1b80bd4e221..4253e2ded90b 100644 --- a/chart2/source/controller/main/ChartController.hxx +++ b/chart2/source/controller/main/ChartController.hxx @@ -629,7 +629,7 @@ private: void executeDispatch_InsertMeanValue(); void executeDispatch_InsertTrendline(); void executeDispatch_InsertTrendlineEquation( bool bInsertR2=false ); - void executeDispatch_InsertYErrorBars(); + void executeDispatch_InsertErrorBars( bool bYError ); void executeDispatch_InsertR2Value(); void executeDispatch_DeleteR2Value(); diff --git a/chart2/source/controller/main/ChartController_Insert.cxx b/chart2/source/controller/main/ChartController_Insert.cxx index a30d6d44146d..4c63d3187aaf 100644 --- a/chart2/source/controller/main/ChartController_Insert.cxx +++ b/chart2/source/controller/main/ChartController_Insert.cxx @@ -472,7 +472,7 @@ void ChartController::executeDispatch_InsertTrendline() } } -void ChartController::executeDispatch_InsertYErrorBars() +void ChartController::executeDispatch_InsertErrorBars( bool bYError ) { //if a series is selected insert error bars for that series only: uno::Reference< chart2::XDataSeries > xSeries( @@ -487,7 +487,9 @@ void ChartController::executeDispatch_InsertYErrorBars() // add error bars with standard deviation uno::Reference< beans::XPropertySet > xErrorBarProp( - StatisticsHelper::addErrorBars( xSeries, m_xCC, ::com::sun::star::chart::ErrorBarStyle::STANDARD_DEVIATION )); + StatisticsHelper::addErrorBars( xSeries, m_xCC, + ::com::sun::star::chart::ErrorBarStyle::STANDARD_DEVIATION, + bYError)); // get an appropriate item converter wrapper::ErrorBarItemConverter aItemConverter( |