diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-04-18 08:53:29 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-04-18 13:32:40 +0200 |
commit | 42595315324e2b06ec661d1069573c9ec99650a4 (patch) | |
tree | 32519bbdc9fc0b70b3798c66fda37714eb91e447 /sc/source/ui/undo/undoblk.cxx | |
parent | 94c264859f621e8e7c793fad2beb6528659433bf (diff) |
convert DelCellCmd to scoped enum
Change-Id: I4766fc874026f218b33e66944b98562d1ec614d3
Reviewed-on: https://gerrit.libreoffice.org/53088
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/undo/undoblk.cxx')
-rw-r--r-- | sc/source/ui/undo/undoblk.cxx | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx index 6d96cdaeccaf..dbdfbbe35805 100644 --- a/sc/source/ui/undo/undoblk.cxx +++ b/sc/source/ui/undo/undoblk.cxx @@ -345,13 +345,13 @@ ScUndoDeleteCells::ScUndoDeleteCells( ScDocShell* pNewDocShell, pScenarios( pNewScenarios ), eCmd( eNewCmd ) { - if (eCmd == DEL_DELROWS) // whole row? + if (eCmd == DelCellCmd::Rows) // whole row? { aEffRange.aStart.SetCol(0); aEffRange.aEnd.SetCol(MAXCOL); } - if (eCmd == DEL_DELCOLS) // whole column? + if (eCmd == DelCellCmd::Cols) // whole column? { aEffRange.aStart.SetRow(0); aEffRange.aEnd.SetRow(MAXROW); @@ -397,8 +397,8 @@ void ScUndoDeleteCells::DoChange( const bool bUndo ) switch (eCmd) { - case DEL_DELROWS: - case DEL_CELLSUP: + case DelCellCmd::Rows: + case DelCellCmd::CellsUp: for( i=0; i<nCount; i++ ) { if (bUndo) @@ -415,8 +415,8 @@ void ScUndoDeleteCells::DoChange( const bool bUndo ) } } break; - case DEL_DELCOLS: - case DEL_CELLSLEFT: + case DelCellCmd::Cols: + case DelCellCmd::CellsLeft: for( i=0; i<nCount; i++ ) { if (bUndo) @@ -447,7 +447,7 @@ void ScUndoDeleteCells::DoChange( const bool bUndo ) } ScRange aWorkRange( aEffRange ); - if ( eCmd == DEL_CELLSLEFT ) // only "shift left" requires refresh of the moved area + if ( eCmd == DelCellCmd::CellsLeft ) // only "shift left" requires refresh of the moved area aWorkRange.aEnd.SetCol(MAXCOL); for( i=0; i<nCount; i++ ) @@ -460,9 +460,9 @@ void ScUndoDeleteCells::DoChange( const bool bUndo ) if ( !bUndo ) { - if ( eCmd==DEL_DELCOLS || eCmd==DEL_CELLSLEFT ) + if ( eCmd==DelCellCmd::Cols || eCmd==DelCellCmd::CellsLeft ) aWorkRange.aEnd.SetCol(MAXCOL); - if ( eCmd==DEL_DELROWS || eCmd==DEL_CELLSUP ) + if ( eCmd==DelCellCmd::Rows || eCmd==DelCellCmd::CellsUp ) aWorkRange.aEnd.SetRow(MAXROW); ScMarkData aMarkData; aMarkData.SelectOneTable( aWorkRange.aStart.Tab() ); @@ -483,11 +483,11 @@ void ScUndoDeleteCells::DoChange( const bool bUndo ) PaintPartFlags nPaint = PaintPartFlags::Grid; switch (eCmd) { - case DEL_DELROWS: + case DelCellCmd::Rows: nPaint |= PaintPartFlags::Left; aWorkRange.aEnd.SetRow(MAXROW); break; - case DEL_CELLSUP: + case DelCellCmd::CellsUp: for( i=0; i<nCount; i++ ) { aWorkRange.aEnd.SetRow(MAXROW); @@ -499,10 +499,10 @@ void ScUndoDeleteCells::DoChange( const bool bUndo ) } } break; - case DEL_DELCOLS: + case DelCellCmd::Cols: nPaint |= PaintPartFlags::Top; // top bar SAL_FALLTHROUGH; - case DEL_CELLSLEFT: + case DelCellCmd::CellsLeft: for( i=0; i<nCount; i++ ) { aWorkRange.aEnd.SetCol(MAXCOL); // to the far right @@ -534,10 +534,10 @@ void ScUndoDeleteCells::DoChange( const bool bUndo ) { if (comphelper::LibreOfficeKit::isActive()) { - if (eCmd == DEL_DELCOLS || eCmd == DEL_CELLSLEFT) + if (eCmd == DelCellCmd::Cols || eCmd == DelCellCmd::CellsLeft) ScTabViewShell::notifyAllViewsHeaderInvalidation(COLUMN_HEADER, pViewShell->GetViewData().GetTabNo()); - if (eCmd == DEL_DELROWS || eCmd == DEL_CELLSUP) + if (eCmd == DelCellCmd::Rows || eCmd == DelCellCmd::CellsUp) ScTabViewShell::notifyAllViewsHeaderInvalidation(ROW_HEADER, pViewShell->GetViewData().GetTabNo()); } @@ -767,7 +767,7 @@ void ScUndoDeleteMulti::Repeat(SfxRepeatTarget& rTarget) { // if single selection if (dynamic_cast<const ScTabViewTarget*>( &rTarget) != nullptr) - static_cast<ScTabViewTarget&>(rTarget).GetViewShell()->DeleteCells( DEL_DELROWS ); + static_cast<ScTabViewTarget&>(rTarget).GetViewShell()->DeleteCells( DelCellCmd::Rows ); } bool ScUndoDeleteMulti::CanRepeat(SfxRepeatTarget& rTarget) const |