chart43: #i109977# make axes and grids deletable via delete key
This commit is contained in:
parent
bbaf0683e4
commit
7822e88a94
1 changed files with 21 additions and 4 deletions
|
@ -502,8 +502,7 @@ bool ChartController::isObjectDeleteable( const uno::Any& rSelection )
|
|||
if( (rSelection >>= aSelObjCID) && aSelObjCID.getLength() > 0 )
|
||||
{
|
||||
ObjectType aObjectType(ObjectIdentifier::getObjectType( aSelObjCID ));
|
||||
if( (OBJECTTYPE_TITLE == aObjectType) || (OBJECTTYPE_LEGEND == aObjectType)
|
||||
|| (OBJECTTYPE_DATA_SERIES == aObjectType) )
|
||||
if( (OBJECTTYPE_TITLE == aObjectType) || (OBJECTTYPE_LEGEND == aObjectType) )
|
||||
return true;
|
||||
if( (OBJECTTYPE_DATA_SERIES == aObjectType) || (OBJECTTYPE_LEGEND_ENTRY == aObjectType) )
|
||||
return true;
|
||||
|
@ -512,6 +511,8 @@ bool ChartController::isObjectDeleteable( const uno::Any& rSelection )
|
|||
return true;
|
||||
if( (OBJECTTYPE_DATA_LABELS == aObjectType) || (OBJECTTYPE_DATA_LABEL == aObjectType) )
|
||||
return true;
|
||||
if( (OBJECTTYPE_AXIS == aObjectType) || (OBJECTTYPE_GRID == aObjectType) || (OBJECTTYPE_SUBGRID == aObjectType) )
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -539,8 +540,6 @@ bool ChartController::executeDispatch_Delete()
|
|||
return false;
|
||||
|
||||
//remove chart object
|
||||
impl_ClearSelection();
|
||||
|
||||
uno::Reference< chart2::XChartDocument > xChartDoc( m_aModel->getModel(), uno::UNO_QUERY );
|
||||
if( !xChartDoc.is() )
|
||||
return false;
|
||||
|
@ -697,6 +696,24 @@ bool ChartController::executeDispatch_Delete()
|
|||
}
|
||||
break;
|
||||
}
|
||||
case OBJECTTYPE_AXIS:
|
||||
{
|
||||
executeDispatch_DeleteAxis();
|
||||
bReturn = true;
|
||||
break;
|
||||
}
|
||||
case OBJECTTYPE_GRID:
|
||||
{
|
||||
executeDispatch_DeleteMajorGrid();
|
||||
bReturn = true;
|
||||
break;
|
||||
}
|
||||
case OBJECTTYPE_SUBGRID:
|
||||
{
|
||||
executeDispatch_DeleteMinorGrid();
|
||||
bReturn = true;
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue