From 3e964eeb7ca1b662705b5d6ce54102d33f310705 Mon Sep 17 00:00:00 2001 From: Rafael Dominguez Date: Wed, 14 Mar 2012 18:40:44 +0000 Subject: Set chart objecttype depending on errorbar type. --- chart2/source/controller/main/ChartController_Insert.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'chart2/source/controller/main') diff --git a/chart2/source/controller/main/ChartController_Insert.cxx b/chart2/source/controller/main/ChartController_Insert.cxx index 09d8a6445b57..9fc38dda011e 100644 --- a/chart2/source/controller/main/ChartController_Insert.cxx +++ b/chart2/source/controller/main/ChartController_Insert.cxx @@ -474,6 +474,8 @@ void ChartController::executeDispatch_InsertTrendline() void ChartController::executeDispatch_InsertErrorBars( bool bYError ) { + ObjectType objType = bYError ? OBJECTTYPE_DATA_ERRORS_Y : OBJECTTYPE_DATA_ERRORS_X; + //if a series is selected insert error bars for that series only: uno::Reference< chart2::XDataSeries > xSeries( ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getModel() ), uno::UNO_QUERY ); @@ -502,7 +504,7 @@ void ChartController::executeDispatch_InsertErrorBars( bool bYError ) aItemConverter.FillItemSet( aItemSet ); ObjectPropertiesDialogParameter aDialogParameter = ObjectPropertiesDialogParameter( ObjectIdentifier::createClassifiedIdentifierWithParent( - OBJECTTYPE_DATA_ERRORS, ::rtl::OUString(), m_aSelection.getSelectedCID())); + objType, ::rtl::OUString(), m_aSelection.getSelectedCID())); aDialogParameter.init( getModel() ); ViewElementListProvider aViewElementListProvider( m_pDrawModelWrapper.get()); SolarMutexGuard aGuard; @@ -531,7 +533,7 @@ void ChartController::executeDispatch_InsertErrorBars( bool bYError ) UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::INSERT, - ObjectNameProvider::getName_ObjectForAllSeries( OBJECTTYPE_DATA_ERRORS ) ), + ObjectNameProvider::getName_ObjectForAllSeries( objType ) ), m_xUndoManager ); try -- cgit