Set chart objecttype depending on errorbar type.
This commit is contained in:
parent
2ea77e4926
commit
3e964eeb7c
2 changed files with 7 additions and 3 deletions
|
@ -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 );
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue