diff options
author | Philippe Jung <phil.jung@free.fr> | 2015-05-20 17:27:08 +0200 |
---|---|---|
committer | Yousuf Philips <philipz85@hotmail.com> | 2015-05-31 17:59:25 +0000 |
commit | 285b5ef45817fe20d3bf9613e0247d395b7c880d (patch) | |
tree | 332003d9e5b710713b5b01869623f8dbbeab242c /sc/source/ui/undo | |
parent | f97beeef352fdd9fd4f157a7a4c4f6af8341cbe6 (diff) |
Calc: Insert row/col before/after [2/2]
This part adds features to add rows/cols
after the selection which is a new behaviour.
Change-Id: Iec1201ae56970cd3dd0622c2ffa1eb6e46ad7446
Reviewed-on: https://gerrit.libreoffice.org/15831
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Yousuf Philips <philipz85@hotmail.com>
Diffstat (limited to 'sc/source/ui/undo')
-rw-r--r-- | sc/source/ui/undo/undoblk.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx index 29d14e5a608a..379d213e3213 100644 --- a/sc/source/ui/undo/undoblk.cxx +++ b/sc/source/ui/undo/undoblk.cxx @@ -97,13 +97,13 @@ ScUndoInsertCells::ScUndoInsertCells( ScDocShell* pNewDocShell, bPartOfPaste( bNewPartOfPaste ), pPasteUndo( NULL ) { - if (eCmd == INS_INSROWS_BEFORE ) // whole row? + if (eCmd == INS_INSROWS_BEFORE || eCmd == INS_INSROWS_AFTER) // whole row? { aEffRange.aStart.SetCol(0); aEffRange.aEnd.SetCol(MAXCOL); } - if (eCmd == INS_INSCOLS_BEFORE ) // whole column? + if (eCmd == INS_INSCOLS_BEFORE || eCmd == INS_INSCOLS_AFTER) // whole column? { aEffRange.aStart.SetRow(0); aEffRange.aEnd.SetRow(MAXROW); @@ -180,6 +180,7 @@ void ScUndoInsertCells::DoChange( const bool bUndo ) switch (eCmd) { case INS_INSROWS_BEFORE: + case INS_INSROWS_AFTER: case INS_CELLSDOWN: for( i=0; i<nCount; i++ ) { @@ -192,6 +193,7 @@ void ScUndoInsertCells::DoChange( const bool bUndo ) } break; case INS_INSCOLS_BEFORE: + case INS_INSCOLS_AFTER: case INS_CELLSRIGHT: for( i=0; i<nCount; i++ ) { @@ -230,6 +232,7 @@ void ScUndoInsertCells::DoChange( const bool bUndo ) switch (eCmd) { case INS_INSROWS_BEFORE: + case INS_INSROWS_AFTER: nPaint |= PAINT_LEFT; aWorkRange.aEnd.SetRow(MAXROW); break; @@ -246,6 +249,7 @@ void ScUndoInsertCells::DoChange( const bool bUndo ) } break; case INS_INSCOLS_BEFORE: + case INS_INSCOLS_AFTER: nPaint |= PAINT_TOP; // top bar case INS_CELLSRIGHT: for( i=0; i<nCount; i++ ) |