[Libreoffice-commits] core.git: officecfg/registry sc/inc sc/sdi sc/source

Philippe Jung phil.jung at free.fr
Fri Jun 5 06:38:45 PDT 2015


 officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu |   24 ++++
 sc/inc/sc.hrc                                                     |    8 -
 sc/inc/sccommands.h                                               |    2 
 sc/sdi/cellsh.sdi                                                 |    2 
 sc/sdi/scalc.sdi                                                  |   52 ++++++++++
 sc/source/ui/view/cellsh.cxx                                      |    2 
 sc/source/ui/view/cellsh1.cxx                                     |    2 
 sc/source/ui/view/tabview3.cxx                                    |    2 
 8 files changed, 91 insertions(+), 3 deletions(-)

New commits:
commit 1fb3ec2aa48f625388773beab5ca4b2c3e10e930
Author: Philippe Jung <phil.jung at free.fr>
Date:   Fri Jun 5 13:35:12 2015 +0200

    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 at libreoffice.org>
    Reviewed-by: Philippe Jung <phil.jung at free.fr>

diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
index 1d8490f..61b3b5b 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
@@ -1075,6 +1075,18 @@
           <value>1</value>
         </prop>
       </node>
+      <!-- 2015/06 Deprecated, use InsertRowsBefore instead -->
+      <node oor:name=".uno:InsertRows" oor:op="replace">
+        <prop oor:name="Label" oor:type="xs:string">
+          <value xml:lang="en-US">Insert ~Rows Above</value>
+        </prop>
+        <prop oor:name="ContextLabel" oor:type="xs:string">
+          <value xml:lang="en-US">Rows ~Above</value>
+        </prop>
+        <prop oor:name="Properties" oor:type="xs:int">
+          <value>1</value>
+        </prop>
+      </node>
       <node oor:name=".uno:InsertRowsBefore" oor:op="replace">
         <prop oor:name="Label" oor:type="xs:string">
           <value xml:lang="en-US">Insert ~Rows Above</value>
@@ -1086,6 +1098,18 @@
           <value>1</value>
         </prop>
       </node>
+      <!-- 2015/06 Deprecated, use InsertColumnsBefore instead -->
+      <node oor:name=".uno:InsertColumns" oor:op="replace">
+        <prop oor:name="Label" oor:type="xs:string">
+          <value xml:lang="en-US">Insert Co~lumns Left</value>
+        </prop>
+        <prop oor:name="ContextLabel" oor:type="xs:string">
+          <value xml:lang="en-US">Columns ~Left</value>
+        </prop>
+        <prop oor:name="Properties" oor:type="xs:int">
+          <value>1</value>
+        </prop>
+      </node>
       <node oor:name=".uno:InsertColumnsBefore" oor:op="replace">
         <prop oor:name="Label" oor:type="xs:string">
           <value xml:lang="en-US">Insert Co~lumns Left</value>
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index 2cbd8d14..da4678d 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 e931c19..95c5b7f 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 d780e98..f043ebd 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 b59a7ad..744d2de 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 3bfc413..202c4b8 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 b9dd9e3..c1becf7 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 2f2cc9d..ee300f4 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 );


More information about the Libreoffice-commits mailing list