diff --git a/chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx b/chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx index 52e4a42770bf..b21fd148a3b7 100644 --- a/chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx +++ b/chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx @@ -67,7 +67,9 @@ InsertErrorBarsDialog::InsertErrorBarsDialog( /* bNoneAvailable = */ true, eType )) { FreeResource(); - this->SetText( ObjectNameProvider::getName_ObjectForAllSeries( OBJECTTYPE_DATA_ERRORS ) ); + ObjectType objType = eType == ErrorBarResources::ERROR_BAR_Y ? OBJECTTYPE_DATA_ERRORS : OBJECTTYPE_DATA_ERRORS_X; + + this->SetText( ObjectNameProvider::getName_ObjectForAllSeries(objType) ); m_apErrorBarResources->SetChartDocumentForRangeChoosing( xChartDocument ); } 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