diff options
author | Philippe Jung <phil.jung@free.fr> | 2015-06-05 13:35:12 +0200 |
---|---|---|
committer | Philippe Jung <phil.jung@free.fr> | 2015-06-05 13:38:20 +0000 |
commit | 1fb3ec2aa48f625388773beab5ca4b2c3e10e930 (patch) | |
tree | 4ad6ad3313f076765efd9a6555621ae53ae75c13 /sc | |
parent | 55bcba1e0aba237a873ee1f788761045a8eff846 (diff) |
CALC: readd InsertRows/InsertCols
Following ESC decision, uno commands InsertRows / InsertColumns
must be added to the current one InsertRowsBefore /
InsertColumnsBefore and InsertRowsAfter / InsertColumnsAfter.
This will guarantee ascending compatibility while making more
explicit the behaviour thanks to the new commands.
For Calc, these commands are equivalent to InsertxxxBefore
Change-Id: I3aada5c9b03c504e6728c33cad2b2d569df1d60a
Reviewed-on: https://gerrit.libreoffice.org/16099
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Philippe Jung <phil.jung@free.fr>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/sc.hrc | 8 | ||||
-rw-r--r-- | sc/inc/sccommands.h | 2 | ||||
-rw-r--r-- | sc/sdi/cellsh.sdi | 2 | ||||
-rw-r--r-- | sc/sdi/scalc.sdi | 52 | ||||
-rw-r--r-- | sc/source/ui/view/cellsh.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/cellsh1.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/tabview3.cxx | 2 |
7 files changed, 67 insertions, 3 deletions
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc index 2cbd8d14ab77..da4678d7a081 100644 --- a/sc/inc/sc.hrc +++ b/sc/inc/sc.hrc @@ -322,8 +322,8 @@ #define FID_DEL_COLBRK (INSERT_MENU_START + 4) #define FID_INS_CELL_CONTENTS (INSERT_MENU_START + 5) #define FID_INS_CELL (INSERT_MENU_START + 6) -#define FID_INS_ROWS_BEFORE (INSERT_MENU_START + 7) -#define FID_INS_COLUMNS_BEFORE (INSERT_MENU_START + 8) +#define FID_INS_ROW (INSERT_MENU_START + 7) +#define FID_INS_COLUMN (INSERT_MENU_START + 8) #define FID_INS_TABLE (INSERT_MENU_START + 9) #define SID_INS_FUNCTION (INSERT_MENU_START + 10) #define FID_DEFINE_NAME (INSERT_MENU_START + 11) @@ -336,7 +336,9 @@ #define FID_INS_CELLSRIGHT (INSERT_MENU_START + 19) #define FID_INS_ROWS_AFTER (INSERT_MENU_START + 20) #define FID_INS_COLUMNS_AFTER (INSERT_MENU_START + 21) -#define INSERT_MENU_END (INSERT_MENU_START + 22) +#define FID_INS_ROWS_BEFORE (INSERT_MENU_START + 22) +#define FID_INS_COLUMNS_BEFORE (INSERT_MENU_START + 23) +#define INSERT_MENU_END (INSERT_MENU_START + 24) #define FORMAT_MENU_START (INSERT_MENU_END) #define FID_CELL_FORMAT (FORMAT_MENU_START) diff --git a/sc/inc/sccommands.h b/sc/inc/sccommands.h index e931c1939615..95c5b7f0ad84 100644 --- a/sc/inc/sccommands.h +++ b/sc/inc/sccommands.h @@ -45,9 +45,11 @@ #define CMD_FID_INS_CELL ".uno:InsertCell" #define CMD_FID_INS_COLBRK ".uno:InsertColumnBreak" #define CMD_FID_INS_COLUMNS_AFTER ".uno:InsertColumnsAfter" +#define CMD_FID_INS_COLUMN ".uno:InsertColumns" #define CMD_FID_INS_COLUMNS_BEFORE ".uno:InsertColumnsBefore" #define CMD_FID_INS_ROWBRK ".uno:InsertRowBreak" #define CMD_FID_INS_ROWS_AFTER ".uno:InsertRowsAfter" +#define CMD_FID_INS_ROW ".uno:InsertRows" #define CMD_FID_INS_ROWS_BEFORE ".uno:InsertRowsBefore" #define CMD_FID_MERGE_ON ".uno:MergeCells" #define CMD_FID_MERGE_OFF ".uno:SplitCell" diff --git a/sc/sdi/cellsh.sdi b/sc/sdi/cellsh.sdi index d780e988181d..f043ebd0cb7d 100644 --- a/sc/sdi/cellsh.sdi +++ b/sc/sdi/cellsh.sdi @@ -116,6 +116,8 @@ interface CellSelection SID_DETECTIVE_MARK_SUCC [ ExecMethod = ExecuteEdit; StateMethod = GetState; ] SID_INSERT_CURRENT_DATE [ ExecMethod = ExecuteEdit; StateMethod = GetState; ] SID_INSERT_CURRENT_TIME [ ExecMethod = ExecuteEdit; StateMethod = GetState; ] + FID_INS_ROW [ ExecMethod = ExecuteEdit; StateMethod = GetBlockState; ] + FID_INS_COLUMN [ ExecMethod = ExecuteEdit; StateMethod = GetBlockState; ] FID_INS_ROWS_BEFORE [ ExecMethod = ExecuteEdit; StateMethod = GetBlockState; ] FID_INS_COLUMNS_BEFORE [ ExecMethod = ExecuteEdit; StateMethod = GetBlockState; ] FID_INS_ROWS_AFTER [ ExecMethod = ExecuteEdit; StateMethod = GetBlockState; ] diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi index b59a7ad7e5f6..744d2de2fa76 100644 --- a/sc/sdi/scalc.sdi +++ b/sc/sdi/scalc.sdi @@ -4108,6 +4108,32 @@ SfxVoidItem InsertColumnBreak FID_INS_COLBRK ] +/* 2015/06 Deprecated, use InsertColumnsBefore instead */ +SfxVoidItem InsertColumns FID_INS_COLUMN +() +[ + /* flags: */ + AutoUpdate = FALSE, + Cachable = Cachable, + FastCall = FALSE, + HasCoreId = FALSE, + HasDialog = FALSE, + ReadOnlyDoc = TRUE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + Synchron; + + /* config: */ + AccelConfig = TRUE, + MenuConfig = TRUE, + StatusBarConfig = FALSE, + ToolBoxConfig = TRUE, + GroupId = GID_INSERT; +] + + SfxVoidItem InsertColumnsBefore FID_INS_COLUMNS_BEFORE () [ @@ -4435,6 +4461,32 @@ SfxVoidItem InsertRowBreak FID_INS_ROWBRK ] +/* 2015/06 Deprecated, use InsertRowsBefore instead */ +SfxVoidItem InsertRows FID_INS_ROW +() +[ + /* flags: */ + AutoUpdate = FALSE, + Cachable = Cachable, + FastCall = FALSE, + HasCoreId = FALSE, + HasDialog = FALSE, + ReadOnlyDoc = TRUE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + Synchron; + + /* config: */ + AccelConfig = TRUE, + MenuConfig = TRUE, + StatusBarConfig = FALSE, + ToolBoxConfig = TRUE, + GroupId = GID_INSERT; +] + + SfxVoidItem InsertRowsBefore FID_INS_ROWS_BEFORE () [ diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx index 3bfc41315c27..202c4b82d8a9 100644 --- a/sc/source/ui/view/cellsh.cxx +++ b/sc/source/ui/view/cellsh.cxx @@ -207,12 +207,14 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet ) bDisable = (!bSimpleArea); break; + case FID_INS_ROW: case FID_INS_ROWS_BEFORE: // insert rows case FID_INS_ROWS_AFTER: case FID_INS_CELLSDOWN: bDisable = (!bSimpleArea) || GetViewData()->SimpleColMarked(); break; + case FID_INS_COLUMN: case FID_INS_COLUMNS_BEFORE: // insert columns case FID_INS_COLUMNS_AFTER: case FID_INS_CELLSRIGHT: diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx index b9dd9e3f55ed..c1becf754681 100644 --- a/sc/source/ui/view/cellsh1.cxx +++ b/sc/source/ui/view/cellsh1.cxx @@ -142,11 +142,13 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) // insert / delete cells / rows / columns + case FID_INS_ROW: case FID_INS_ROWS_BEFORE: pTabViewShell->InsertCells(INS_INSROWS_BEFORE); rReq.Done(); break; + case FID_INS_COLUMN: case FID_INS_COLUMNS_BEFORE: pTabViewShell->InsertCells(INS_INSCOLS_BEFORE); rReq.Done(); diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx index 2f2cc9d03558..ee300f42671f 100644 --- a/sc/source/ui/view/tabview3.cxx +++ b/sc/source/ui/view/tabview3.cxx @@ -407,6 +407,8 @@ void ScTabView::SelectionChanged() rBindings.Invalidate( SID_PASTE ); rBindings.Invalidate( SID_PASTE_SPECIAL ); + rBindings.Invalidate( FID_INS_ROW ); + rBindings.Invalidate( FID_INS_COLUMN ); rBindings.Invalidate( FID_INS_ROWS_BEFORE ); rBindings.Invalidate( FID_INS_COLUMNS_BEFORE ); rBindings.Invalidate( FID_INS_ROWS_AFTER ); |