convert ActionDescriptionProvider::ActionType to scoped enum

and remove an unused constant

Change-Id: I8d46d16d3f575aa416bfc5a965986ee5dfb1f93c
This commit is contained in:
Noel Grandin
2016-08-29 12:45:52 +02:00
parent 110528e6a2
commit 2c86c131f7
12 changed files with 70 additions and 83 deletions

View File

@@ -1406,7 +1406,7 @@ void ChartController::executeDispatch_MoveSeries( bool bForward )
UndoGuardWithSelection aUndoGuard(
ActionDescriptionProvider::createDescription(
(bForward ? ActionDescriptionProvider::MOVE_TOTOP : ActionDescriptionProvider::MOVE_TOBOTTOM),
(bForward ? ActionDescriptionProvider::ActionType::MoveToTop : ActionDescriptionProvider::ActionType::MoveToBottom),
SCH_RESSTR(STR_OBJECT_DATASERIES)),
m_xUndoManager );

View File

@@ -89,7 +89,7 @@ void ChartController::executeDispatch_InsertAxes()
{
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::INSERT, SCH_RESSTR( STR_OBJECT_AXES )),
ActionDescriptionProvider::ActionType::Insert, SCH_RESSTR( STR_OBJECT_AXES )),
m_xUndoManager );
try
@@ -127,7 +127,7 @@ void ChartController::executeDispatch_InsertGrid()
{
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::INSERT, SCH_RESSTR( STR_OBJECT_GRIDS )),
ActionDescriptionProvider::ActionType::Insert, SCH_RESSTR( STR_OBJECT_GRIDS )),
m_xUndoManager );
try
@@ -161,7 +161,7 @@ void ChartController::executeDispatch_InsertTitles()
{
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::INSERT, SCH_RESSTR( STR_OBJECT_TITLES )),
ActionDescriptionProvider::ActionType::Insert, SCH_RESSTR( STR_OBJECT_TITLES )),
m_xUndoManager );
try
@@ -192,7 +192,7 @@ void ChartController::executeDispatch_DeleteLegend()
{
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::DELETE, SCH_RESSTR( STR_OBJECT_LEGEND )),
ActionDescriptionProvider::ActionType::Delete, SCH_RESSTR( STR_OBJECT_LEGEND )),
m_xUndoManager );
ChartModel& rModel = dynamic_cast<ChartModel&>(*getModel().get());
@@ -204,7 +204,7 @@ void ChartController::executeDispatch_InsertLegend()
{
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::INSERT, SCH_RESSTR( STR_OBJECT_LEGEND )),
ActionDescriptionProvider::ActionType::Insert, SCH_RESSTR( STR_OBJECT_LEGEND )),
m_xUndoManager );
ChartModel& rModel = dynamic_cast<ChartModel&>(*getModel().get());
@@ -216,7 +216,7 @@ void ChartController::executeDispatch_OpenLegendDialog()
{
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::INSERT, SCH_RESSTR( STR_OBJECT_LEGEND )),
ActionDescriptionProvider::ActionType::Insert, SCH_RESSTR( STR_OBJECT_LEGEND )),
m_xUndoManager );
try
@@ -244,7 +244,7 @@ void ChartController::executeDispatch_InsertMenu_DataLabels()
{
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::INSERT, SCH_RESSTR( STR_OBJECT_DATALABELS )),
ActionDescriptionProvider::ActionType::Insert, SCH_RESSTR( STR_OBJECT_DATALABELS )),
m_xUndoManager );
//if a series is selected insert labels for that series only:
@@ -306,7 +306,7 @@ void ChartController::executeDispatch_InsertMeanValue()
{
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::INSERT, SCH_RESSTR( STR_OBJECT_AVERAGE_LINE )),
ActionDescriptionProvider::ActionType::Insert, SCH_RESSTR( STR_OBJECT_AVERAGE_LINE )),
m_xUndoManager );
lcl_InsertMeanValueLine( m_xCC,
ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(),
@@ -318,7 +318,7 @@ void ChartController::executeDispatch_InsertMenu_MeanValues()
{
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::INSERT, SCH_RESSTR( STR_OBJECT_AVERAGE_LINE )),
ActionDescriptionProvider::ActionType::Insert, SCH_RESSTR( STR_OBJECT_AVERAGE_LINE )),
m_xUndoManager );
uno::Reference< chart2::XDataSeries > xSeries(
@@ -362,7 +362,7 @@ void ChartController::executeDispatch_InsertTrendline()
UndoLiveUpdateGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::INSERT, SCH_RESSTR( STR_OBJECT_CURVE )),
ActionDescriptionProvider::ActionType::Insert, SCH_RESSTR( STR_OBJECT_CURVE )),
m_xUndoManager );
uno::Reference< chart2::XRegressionCurve > xCurve =
@@ -423,7 +423,7 @@ void ChartController::executeDispatch_InsertErrorBars( bool bYError )
{
UndoLiveUpdateGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::INSERT,
ActionDescriptionProvider::ActionType::Insert,
SCH_RESSTR( bYError ? STR_OBJECT_ERROR_BARS_Y : STR_OBJECT_ERROR_BARS_X )),
m_xUndoManager );
@@ -476,7 +476,7 @@ void ChartController::executeDispatch_InsertErrorBars( bool bYError )
//if no series is selected insert error bars for all series
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::INSERT,
ActionDescriptionProvider::ActionType::Insert,
ObjectNameProvider::getName_ObjectForAllSeries( objType ) ),
m_xUndoManager );
@@ -533,7 +533,7 @@ void ChartController::executeDispatch_InsertTrendlineEquation( bool bInsertR2 )
{
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::INSERT, SCH_RESSTR( STR_OBJECT_CURVE_EQUATION )),
ActionDescriptionProvider::ActionType::Insert, SCH_RESSTR( STR_OBJECT_CURVE_EQUATION )),
m_xUndoManager );
xEqProp->setPropertyValue( "ShowEquation", uno::makeAny( true ));
xEqProp->setPropertyValue( "XName", uno::makeAny( OUString("x") ));
@@ -552,7 +552,7 @@ void ChartController::executeDispatch_InsertR2Value()
{
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::INSERT, SCH_RESSTR( STR_OBJECT_CURVE_EQUATION )),
ActionDescriptionProvider::ActionType::Insert, SCH_RESSTR( STR_OBJECT_CURVE_EQUATION )),
m_xUndoManager );
xEqProp->setPropertyValue( "ShowCorrelationCoefficient", uno::makeAny( true ));
aUndoGuard.commit();
@@ -567,7 +567,7 @@ void ChartController::executeDispatch_DeleteR2Value()
{
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::INSERT, SCH_RESSTR( STR_OBJECT_CURVE_EQUATION )),
ActionDescriptionProvider::ActionType::Insert, SCH_RESSTR( STR_OBJECT_CURVE_EQUATION )),
m_xUndoManager );
xEqProp->setPropertyValue( "ShowCorrelationCoefficient", uno::makeAny( false ));
aUndoGuard.commit();
@@ -582,7 +582,7 @@ void ChartController::executeDispatch_DeleteMeanValue()
{
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::DELETE, SCH_RESSTR( STR_OBJECT_AVERAGE_LINE )),
ActionDescriptionProvider::ActionType::Delete, SCH_RESSTR( STR_OBJECT_AVERAGE_LINE )),
m_xUndoManager );
RegressionCurveHelper::removeMeanValueLine( xRegCurveCnt );
aUndoGuard.commit();
@@ -597,7 +597,7 @@ void ChartController::executeDispatch_DeleteTrendline()
{
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::DELETE, SCH_RESSTR( STR_OBJECT_CURVE )),
ActionDescriptionProvider::ActionType::Delete, SCH_RESSTR( STR_OBJECT_CURVE )),
m_xUndoManager );
RegressionCurveHelper::removeAllExceptMeanValueLine( xRegCurveCnt );
aUndoGuard.commit();
@@ -612,7 +612,7 @@ void ChartController::executeDispatch_DeleteTrendlineEquation()
{
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::DELETE, SCH_RESSTR( STR_OBJECT_CURVE_EQUATION )),
ActionDescriptionProvider::ActionType::Delete, SCH_RESSTR( STR_OBJECT_CURVE_EQUATION )),
m_xUndoManager );
RegressionCurveHelper::removeEquations( xRegCurveCnt );
aUndoGuard.commit();
@@ -627,7 +627,7 @@ void ChartController::executeDispatch_DeleteErrorBars( bool bYError )
{
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::DELETE, SCH_RESSTR( STR_OBJECT_CURVE )),
ActionDescriptionProvider::ActionType::Delete, SCH_RESSTR( STR_OBJECT_CURVE )),
m_xUndoManager );
StatisticsHelper::removeErrorBars( xDataSeries, bYError );
aUndoGuard.commit();
@@ -640,7 +640,7 @@ void ChartController::executeDispatch_InsertDataLabels()
ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getModel() ), uno::UNO_QUERY );
if( xSeries.is() )
{
UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::INSERT,
UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::ActionType::Insert,
SCH_RESSTR( STR_OBJECT_DATALABELS )),
m_xUndoManager );
DataSeriesHelper::insertDataLabelsToSeriesAndAllPoints( xSeries );
@@ -650,7 +650,7 @@ void ChartController::executeDispatch_InsertDataLabels()
void ChartController::executeDispatch_InsertDataLabel()
{
UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::INSERT,
UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::ActionType::Insert,
SCH_RESSTR( STR_OBJECT_LABEL )),
m_xUndoManager );
DataSeriesHelper::insertDataLabelToPoint( ObjectIdentifier::getObjectPropertySet( m_aSelection.getSelectedCID(), getModel() ) );
@@ -663,7 +663,7 @@ void ChartController::executeDispatch_DeleteDataLabels()
ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getModel() ), uno::UNO_QUERY );
if( xSeries.is() )
{
UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::DELETE,
UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::ActionType::Delete,
SCH_RESSTR( STR_OBJECT_DATALABELS )),
m_xUndoManager );
DataSeriesHelper::deleteDataLabelsFromSeriesAndAllPoints( xSeries );
@@ -673,7 +673,7 @@ void ChartController::executeDispatch_DeleteDataLabels()
void ChartController::executeDispatch_DeleteDataLabel()
{
UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::DELETE,
UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::ActionType::Delete,
SCH_RESSTR( STR_OBJECT_LABEL )),
m_xUndoManager );
DataSeriesHelper::deleteDataLabelsFromPoint( ObjectIdentifier::getObjectPropertySet( m_aSelection.getSelectedCID(), getModel() ) );
@@ -682,7 +682,7 @@ void ChartController::executeDispatch_DeleteDataLabel()
void ChartController::executeDispatch_ResetAllDataPoints()
{
UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::FORMAT,
UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::ActionType::Format,
SCH_RESSTR( STR_OBJECT_DATAPOINTS )),
m_xUndoManager );
uno::Reference< chart2::XDataSeries > xSeries( ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getModel() ), uno::UNO_QUERY );
@@ -692,7 +692,7 @@ void ChartController::executeDispatch_ResetAllDataPoints()
}
void ChartController::executeDispatch_ResetDataPoint()
{
UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::FORMAT,
UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::ActionType::Format,
SCH_RESSTR( STR_OBJECT_DATAPOINT )),
m_xUndoManager );
uno::Reference< chart2::XDataSeries > xSeries( ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getModel() ), uno::UNO_QUERY );
@@ -712,7 +712,7 @@ void ChartController::executeDispatch_InsertAxisTitle()
{
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::INSERT, SCH_RESSTR( STR_OBJECT_TITLE )),
ActionDescriptionProvider::ActionType::Insert, SCH_RESSTR( STR_OBJECT_TITLE )),
m_xUndoManager );
Reference< XAxis > xAxis = ObjectIdentifier::getAxisForCID( m_aSelection.getSelectedCID(), getModel() );
@@ -744,7 +744,7 @@ void ChartController::executeDispatch_InsertAxis()
{
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::INSERT, SCH_RESSTR( STR_OBJECT_AXIS )),
ActionDescriptionProvider::ActionType::Insert, SCH_RESSTR( STR_OBJECT_AXIS )),
m_xUndoManager );
try
@@ -766,7 +766,7 @@ void ChartController::executeDispatch_DeleteAxis()
{
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::DELETE, SCH_RESSTR( STR_OBJECT_AXIS )),
ActionDescriptionProvider::ActionType::Delete, SCH_RESSTR( STR_OBJECT_AXIS )),
m_xUndoManager );
try
@@ -788,7 +788,7 @@ void ChartController::executeDispatch_InsertMajorGrid()
{
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::INSERT, SCH_RESSTR( STR_OBJECT_GRID )),
ActionDescriptionProvider::ActionType::Insert, SCH_RESSTR( STR_OBJECT_GRID )),
m_xUndoManager );
try
@@ -810,7 +810,7 @@ void ChartController::executeDispatch_DeleteMajorGrid()
{
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::DELETE, SCH_RESSTR( STR_OBJECT_GRID )),
ActionDescriptionProvider::ActionType::Delete, SCH_RESSTR( STR_OBJECT_GRID )),
m_xUndoManager );
try
@@ -832,7 +832,7 @@ void ChartController::executeDispatch_InsertMinorGrid()
{
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::INSERT, SCH_RESSTR( STR_OBJECT_GRID )),
ActionDescriptionProvider::ActionType::Insert, SCH_RESSTR( STR_OBJECT_GRID )),
m_xUndoManager );
try
@@ -856,7 +856,7 @@ void ChartController::executeDispatch_DeleteMinorGrid()
{
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::DELETE, SCH_RESSTR(STR_OBJECT_GRID)),
ActionDescriptionProvider::ActionType::Delete, SCH_RESSTR(STR_OBJECT_GRID)),
m_xUndoManager );
try

View File

@@ -125,7 +125,7 @@ void ChartController::executeDispatch_PositionAndSize()
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::POS_SIZE,
ActionDescriptionProvider::ActionType::PosSize,
ObjectNameProvider::getName( eObjectType)),
m_xUndoManager );

View File

@@ -702,7 +702,7 @@ void ChartController::executeDlg_ObjectProperties( const OUString& rSelectedObje
OUString aObjectCID = lcl_getFormatCIDforSelectedCID( rSelectedObjectCID );
UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::FORMAT,
ActionDescriptionProvider::ActionType::Format,
ObjectNameProvider::getName( ObjectIdentifier::getObjectType( aObjectCID ))),
m_xUndoManager );

View File

@@ -99,7 +99,7 @@ bool lcl_deleteDataSeries(
{
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::DELETE, SCH_RESSTR( STR_OBJECT_DATASERIES )),
ActionDescriptionProvider::ActionType::Delete, SCH_RESSTR( STR_OBJECT_DATASERIES )),
xUndoManager );
Reference< chart2::XDiagram > xDiagram( ChartModelHelper::findDiagram( xModel ) );
@@ -138,7 +138,7 @@ bool lcl_deleteDataCurve(
{
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::DELETE, SCH_RESSTR( STR_OBJECT_CURVE )),
ActionDescriptionProvider::ActionType::Delete, SCH_RESSTR( STR_OBJECT_CURVE )),
xUndoManager );
xRegressionCurveContainer->removeRegressionCurve( xRegressionCurve );
@@ -615,7 +615,7 @@ bool ChartController::executeDispatch_Delete()
{
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::DELETE, SCH_RESSTR( STR_OBJECT_TITLE )),
ActionDescriptionProvider::ActionType::Delete, SCH_RESSTR( STR_OBJECT_TITLE )),
m_xUndoManager );
TitleHelper::removeTitle(
ObjectIdentifier::getTitleTypeForCID( aCID ), getModel() );
@@ -633,7 +633,7 @@ bool ChartController::executeDispatch_Delete()
{
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::DELETE, SCH_RESSTR( STR_OBJECT_LEGEND )),
ActionDescriptionProvider::ActionType::Delete, SCH_RESSTR( STR_OBJECT_LEGEND )),
m_xUndoManager );
xLegendProp->setPropertyValue( "Show", uno::makeAny( false ));
bReturn = true;
@@ -679,7 +679,7 @@ bool ChartController::executeDispatch_Delete()
{
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::DELETE, SCH_RESSTR( STR_OBJECT_AVERAGE_LINE )),
ActionDescriptionProvider::ActionType::Delete, SCH_RESSTR( STR_OBJECT_AVERAGE_LINE )),
m_xUndoManager );
RegressionCurveHelper::removeMeanValueLine( xRegCurveCnt );
bReturn = true;
@@ -704,7 +704,7 @@ bool ChartController::executeDispatch_Delete()
uno::Reference< frame::XModel > xModel( getModel() );
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::DELETE, SCH_RESSTR( STR_OBJECT_CURVE_EQUATION )),
ActionDescriptionProvider::ActionType::Delete, SCH_RESSTR( STR_OBJECT_CURVE_EQUATION )),
m_xUndoManager );
{
ControllerLockGuardUNO aCtlLockGuard( xModel );
@@ -739,7 +739,7 @@ bool ChartController::executeDispatch_Delete()
uno::Reference< frame::XModel > xModel( getModel() );
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::DELETE, SCH_RESSTR( nId )),
ActionDescriptionProvider::ActionType::Delete, SCH_RESSTR( nId )),
m_xUndoManager );
{
ControllerLockGuardUNO aCtlLockGuard( xModel );
@@ -762,7 +762,7 @@ bool ChartController::executeDispatch_Delete()
{
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::DELETE,
ActionDescriptionProvider::ActionType::Delete,
SCH_RESSTR( aObjectType == OBJECTTYPE_DATA_LABEL ? STR_OBJECT_LABEL : STR_OBJECT_DATALABELS )),
m_xUndoManager );
chart2::DataPointLabel aLabel;
@@ -939,7 +939,7 @@ void ChartController::impl_ShapeControllerDispatch( const util::URL& rURL, const
void ChartController::impl_switchDiagramPositioningToExcludingPositioning()
{
UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::POS_SIZE,
ActionDescriptionProvider::ActionType::PosSize,
ObjectNameProvider::getName( OBJECTTYPE_DIAGRAM)),
m_xUndoManager );
ChartModel& rModel = dynamic_cast<ChartModel&>(*m_aModel->getModel().get());

View File

@@ -810,9 +810,9 @@ void ChartController::execute_MouseButtonUp( const MouseEvent& rMEvt )
if( pE3dObject )
aObjectRect = pE3dObject->GetScene()->GetSnapRect();
ActionDescriptionProvider::ActionType eActionType(ActionDescriptionProvider::MOVE);
ActionDescriptionProvider::ActionType eActionType(ActionDescriptionProvider::ActionType::Move);
if( !bIsMoveOnly && m_aSelection.isResizeableObjectSelected() )
eActionType = ActionDescriptionProvider::RESIZE;
eActionType = ActionDescriptionProvider::ActionType::Resize;
ObjectType eObjectType = ObjectIdentifier::getObjectType( m_aSelection.getSelectedCID() );
@@ -1749,9 +1749,9 @@ bool ChartController::impl_moveOrResizeObject(
if( bResult )
{
ActionDescriptionProvider::ActionType eActionType(ActionDescriptionProvider::MOVE);
ActionDescriptionProvider::ActionType eActionType(ActionDescriptionProvider::ActionType::Move);
if( bNeedResize )
eActionType = ActionDescriptionProvider::RESIZE;
eActionType = ActionDescriptionProvider::ActionType::Resize;
ObjectType eObjectType = ObjectIdentifier::getObjectType( rCID );
UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription(

View File

@@ -32,7 +32,7 @@ class DragMethod_Base : public SdrDragMethod
public:
DragMethod_Base( DrawViewWrapper& rDrawViewWrapper, const OUString& rObjectCID
, const css::uno::Reference< css::frame::XModel >& xChartModel
, ActionDescriptionProvider::ActionType eActionType = ActionDescriptionProvider::MOVE );
, ActionDescriptionProvider::ActionType eActionType = ActionDescriptionProvider::ActionType::Move );
virtual ~DragMethod_Base();
OUString getUndoDescription() const;

View File

@@ -47,7 +47,7 @@ DragMethod_RotateDiagram::DragMethod_RotateDiagram( DrawViewWrapper& rDrawViewWr
, const OUString& rObjectCID
, const Reference< frame::XModel >& xChartModel
, RotationDirection eRotationDirection )
: DragMethod_Base( rDrawViewWrapper, rObjectCID, xChartModel, ActionDescriptionProvider::ROTATE )
: DragMethod_Base( rDrawViewWrapper, rObjectCID, xChartModel, ActionDescriptionProvider::ActionType::Rotate )
, m_pScene(nullptr)
, m_aReferenceRect(100,100,100,100)
, m_aStartPos(0,0)

View File

@@ -33,19 +33,17 @@ The name of the object acted on and the type of action needs to be given as inpu
class SVX_DLLPUBLIC ActionDescriptionProvider
{
public:
enum ActionType
enum class ActionType
{
INSERT
, DELETE
, CUT
, MOVE
, RESIZE
, ROTATE
, TRANSFORM
, FORMAT
, MOVE_TOTOP
, MOVE_TOBOTTOM
, POS_SIZE
Insert
, Delete
, Move
, Resize
, Rotate
, Format
, MoveToTop
, MoveToBottom
, PosSize
};
public:

View File

@@ -245,8 +245,7 @@
#define STR_ExchangeBegin (STR_EditEnd+1)
#define STR_ExchangePaste (STR_ExchangeBegin +0)
#define STR_ExchangeClpCut (STR_ExchangeBegin +1)
#define STR_ExchangeEnd (STR_ExchangeClpCut)
#define STR_ExchangeEnd (STR_ExchangePaste)
#define STR_DragBegin (STR_ExchangeEnd+1)
#define STR_DragInsertPoint (STR_DragBegin + 0)

View File

@@ -28,37 +28,31 @@ OUString ActionDescriptionProvider::createDescription( ActionType eActionType
sal_uInt16 nResID=0;
switch( eActionType )
{
case INSERT:
case ActionType::Insert:
nResID=STR_UndoInsertObj;
break;
case DELETE:
case ActionType::Delete:
nResID= STR_EditDelete;
break;
case CUT:
nResID= STR_ExchangeClpCut;
break;
case MOVE:
case ActionType::Move:
nResID= STR_EditMove;
break;
case RESIZE:
case ActionType::Resize:
nResID= STR_EditResize;
break;
case ROTATE:
case ActionType::Rotate:
nResID= STR_EditRotate;
break;
case TRANSFORM:
nResID= STR_EditTransform;
break;
case FORMAT:
case ActionType::Format:
nResID= STR_EditSetAttributes;
break;
case MOVE_TOTOP:
case ActionType::MoveToTop:
nResID= STR_EditMovToTop;
break;
case MOVE_TOBOTTOM:
case ActionType::MoveToBottom:
nResID= STR_EditMovToBtm;
break;
case POS_SIZE:
case ActionType::PosSize:
nResID = STR_EditPosSize;
break;
}

View File

@@ -847,10 +847,6 @@ String STR_ExchangePaste
{
Text [ en-US ] = "Insert object(s)" ;
};
String STR_ExchangeClpCut
{
Text [ en-US ] = "Cut %1" ;
};
String STR_DragInsertPoint
{
Text [ en-US ] = "Insert point to %1" ;