[Libreoffice-commits] core.git: icon-themes/galaxy icon-themes/tango officecfg/registry sc/inc sc/qa sc/sdi sc/source sc/uiconfig

Philippe Jung phil.jung at free.fr
Sun May 31 10:58:54 PDT 2015


 icon-themes/galaxy/links.txt                                      |    4 +
 icon-themes/tango/links.txt                                       |    4 +
 officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu |   24 +++++--
 sc/inc/global.hxx                                                 |    6 +
 sc/inc/sc.hrc                                                     |    4 -
 sc/inc/sccommands.h                                               |    4 -
 sc/qa/unit/ucalc.cxx                                              |    6 -
 sc/qa/unit/ucalc_formula.cxx                                      |   16 ++--
 sc/qa/unit/ucalc_sharedformula.cxx                                |    2 
 sc/sdi/cellsh.sdi                                                 |    4 -
 sc/sdi/scalc.sdi                                                  |    4 -
 sc/source/ui/docshell/docfunc.cxx                                 |   34 +++++-----
 sc/source/ui/docshell/docsh3.cxx                                  |    4 -
 sc/source/ui/miscdlgs/inscldlg.cxx                                |    4 -
 sc/source/ui/src/hdrcont.src                                      |    8 +-
 sc/source/ui/undo/undoblk.cxx                                     |   12 +--
 sc/source/ui/unoobj/cellsuno.cxx                                  |   10 +-
 sc/source/ui/unoobj/docuno.cxx                                    |    4 -
 sc/source/ui/view/cellsh.cxx                                      |    4 -
 sc/source/ui/view/cellsh1.cxx                                     |   20 ++---
 sc/source/ui/view/tabview3.cxx                                    |    4 -
 sc/source/ui/view/viewfunc.cxx                                    |    4 -
 sc/uiconfig/scalc/menubar/menubar.xml                             |   12 ++-
 sc/uiconfig/scalc/toolbar/insertcellsbar.xml                      |    6 -
 sc/uiconfig/scalc/toolbar/standardbar.xml                         |    4 -
 25 files changed, 121 insertions(+), 87 deletions(-)

New commits:
commit f97beeef352fdd9fd4f157a7a4c4f6af8341cbe6
Author: Philippe Jung <phil.jung at free.fr>
Date:   Wed May 20 16:54:27 2015 +0200

    Calc: Insert row/col before/after [1/2]
    
    This part renames all INSROW / INSCOL to
    INSROWS_BEFORE / INSCOLS_BEFORE which is
    the current (default) behaviour.
    
    Change-Id: Ia084f17a3be8bf09908e5d227ef4e6d09b8420a4
    Reviewed-on: https://gerrit.libreoffice.org/15830
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Yousuf Philips <philipz85 at hotmail.com>

diff --git a/icon-themes/galaxy/links.txt b/icon-themes/galaxy/links.txt
index 0a257a3..dcdf49c 100644
--- a/icon-themes/galaxy/links.txt
+++ b/icon-themes/galaxy/links.txt
@@ -19,6 +19,10 @@ cmd/sc_objectforwardone.png cmd/sc_forward.png
 cmd/lc_objectbackone.png cmd/lc_backward.png
 cmd/sc_objectbackone.png cmd/sc_backward.png
 
+cmd/lc_insertrowsbefore.png cmd/lc_insertrows.png
+cmd/sc_insertrowsbefore.png cmd/sc_insertrows.png
+cmd/lc_insertcolumnsbefore.png cmd/lc_insertcolumns.png
+cmd/sc_insertcolumnsbefore.png cmd/sc_insertcolumns.png
 cmd/lc_insertrowsafter.png cmd/lc_insertrows.png
 cmd/sc_insertrowsafter.png cmd/sc_insertrows.png
 cmd/lc_insertcolumnsafter.png cmd/lc_insertcolumns.png
diff --git a/icon-themes/tango/links.txt b/icon-themes/tango/links.txt
index 628df29..aa1b9c0 100644
--- a/icon-themes/tango/links.txt
+++ b/icon-themes/tango/links.txt
@@ -397,6 +397,10 @@ sc/res/sf02.png sw/imglst/sf04.png
 svx/res/symphony/spacing3.png cmd/sc_spacepara2.png
 cmd/sc_graphicdialog.png cmd/sc_insertgraphic.png
 
+cmd/lc_insertrowsbefore.png cmd/lc_insertrows.png
+cmd/sc_insertrowsbefore.png cmd/sc_insertrows.png
+cmd/lc_insertcolumnsbefore.png cmd/lc_insertcolumns.png
+cmd/sc_insertcolumnsbefore.png cmd/sc_insertcolumns.png
 cmd/lc_insertrowsafter.png cmd/lc_insertrows.png
 cmd/sc_insertrowsafter.png cmd/sc_insertrows.png
 cmd/lc_insertcolumnsafter.png cmd/lc_insertcolumns.png
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
index c380155..f3db21f 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
@@ -1059,23 +1059,39 @@
           <value xml:lang="en-US">~Cells...</value>
         </prop>
       </node>
-      <node oor:name=".uno:InsertRows" oor:op="replace">
+      <node oor:name=".uno:InsertRowsMenu" oor:op="replace">
+        <prop oor:name="Label" oor:type="xs:string">
+          <value xml:lang="en-US">~Rows</value>
+        </prop>
+        <prop oor:name="Properties" oor:type="xs:int">
+          <value>1</value>
+        </prop>
+      </node>
+      <node oor:name=".uno:InsertColumnsMenu" oor:op="replace">
+        <prop oor:name="Label" oor:type="xs:string">
+          <value xml:lang="en-US">Co~lumns</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>
         </prop>
         <prop oor:name="ContextLabel" oor:type="xs:string">
-          <value xml:lang="en-US">~Rows</value>
+          <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:InsertColumns" oor:op="replace">
+      <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>
         </prop>
         <prop oor:name="ContextLabel" oor:type="xs:string">
-          <value xml:lang="en-US">Co~lumns</value>
+          <value xml:lang="en-US">Columns ~Left</value>
         </prop>
         <prop oor:name="Properties" oor:type="xs:int">
           <value>1</value>
diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx
index b95faf5..1691745 100644
--- a/sc/inc/global.hxx
+++ b/sc/inc/global.hxx
@@ -320,8 +320,10 @@ enum InsCellCmd
     {
         INS_CELLSDOWN,
         INS_CELLSRIGHT,
-        INS_INSROWS,
-        INS_INSCOLS,
+        INS_INSROWS_BEFORE,
+        INS_INSROWS_AFTER,
+        INS_INSCOLS_BEFORE,
+        INS_INSCOLS_AFTER,
         INS_NONE
     };
 
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index d70f489..6def9ba 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_ROW             (INSERT_MENU_START + 7)
-#define FID_INS_COLUMN          (INSERT_MENU_START + 8)
+#define FID_INS_ROWS_BEFORE     (INSERT_MENU_START + 7)
+#define FID_INS_COLUMNS_BEFORE  (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)
diff --git a/sc/inc/sccommands.h b/sc/inc/sccommands.h
index 93a770e..ba8f94c 100644
--- a/sc/inc/sccommands.h
+++ b/sc/inc/sccommands.h
@@ -44,9 +44,9 @@
 #define CMD_FID_INS_TABLE                           ".uno:Insert"
 #define CMD_FID_INS_CELL                            ".uno:InsertCell"
 #define CMD_FID_INS_COLBRK                          ".uno:InsertColumnBreak"
-#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_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"
 #define CMD_SID_OBJECT_MIRROR                       ".uno:Mirror"
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index dcc8cc1..c16dfb8 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -4098,7 +4098,7 @@ void Test::testCopyPasteRepeatOneFormula()
     ScRange aRowOne(0,0,0,MAXCOL,0,0);
     aMark.SetMarkArea(aRowOne);
     ScDocFunc& rFunc = getDocShell().GetDocFunc();
-    rFunc.InsertCells(aRowOne, &aMark, INS_INSROWS, true, true, false);
+    rFunc.InsertCells(aRowOne, &aMark, INS_INSROWS_BEFORE, true, true, false);
 
     CPPUNIT_ASSERT_MESSAGE("C1 should be empty.", m_pDoc->GetCellType(ScAddress(2,0,0)) == CELLTYPE_NONE);
 
@@ -4155,7 +4155,7 @@ void Test::testMergedCells()
     ScRange aRange(0,2,0,MAXCOL,2,0);
     ScMarkData aMark;
     aMark.SetMarkArea(aRange);
-    getDocShell().GetDocFunc().InsertCells(aRange, &aMark, INS_INSROWS, true, true);
+    getDocShell().GetDocFunc().InsertCells(aRange, &aMark, INS_INSROWS_BEFORE, true, true);
     m_pDoc->ExtendMerge(1, 1, nEndCol, nEndRow, 0, false);
     CPPUNIT_ASSERT_MESSAGE("did not increase merge area", nEndCol == 3 && nEndRow == 4);
     m_pDoc->DeleteTab(0);
@@ -6590,7 +6590,7 @@ void Test::testUndoDataAnchor()
     ScDocFunc& rFunc = getDocShell().GetDocFunc();
     ScMarkData aMark;
     aMark.SelectOneTable(0);
-    rFunc.InsertCells(ScRange( 0, aOldStart.Row() - 1, 0, MAXCOL, aOldStart.Row(), 0 ), &aMark, INS_INSROWS, true, true, false);
+    rFunc.InsertCells(ScRange( 0, aOldStart.Row() - 1, 0, MAXCOL, aOldStart.Row(), 0 ), &aMark, INS_INSROWS_BEFORE, true, true, false);
 
     pData = ScDrawLayer::GetObjData(pObj, false);
     CPPUNIT_ASSERT_MESSAGE("Failed to retrieve user data for this object.", pData);
diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index fe7d417..9a0fb33 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -1573,7 +1573,7 @@ void Test::testFormulaRefUpdateInsertRows()
     ScMarkData aMark;
     aMark.SelectOneTable(0);
     ScDocFunc& rFunc = getDocShell().GetDocFunc();
-    rFunc.InsertCells(ScRange(0,0,0,MAXCOL,1,0), &aMark, INS_INSROWS, false, true, false);
+    rFunc.InsertCells(ScRange(0,0,0,MAXCOL,1,0), &aMark, INS_INSROWS_BEFORE, false, true, false);
 
     // The raw data should have shifted to B4:B6.
     CPPUNIT_ASSERT_EQUAL(1.0, m_pDoc->GetValue(ScAddress(1,3,0)));
@@ -1597,7 +1597,7 @@ void Test::testFormulaRefUpdateInsertRows()
     CPPUNIT_ASSERT_EQUAL(3.0, m_pDoc->GetValue(ScAddress(0,2,0)));
 
     // Insert 3 rows over 2:4.  This should push A3:A6 to A6:A9.
-    rFunc.InsertCells(ScRange(0,1,0,MAXCOL,3,0), &aMark, INS_INSROWS, false, true, false);
+    rFunc.InsertCells(ScRange(0,1,0,MAXCOL,3,0), &aMark, INS_INSROWS_BEFORE, false, true, false);
     ScFormulaCell* pFC = m_pDoc->GetFormulaCell(ScAddress(0,5,0));
     CPPUNIT_ASSERT(pFC);
     CPPUNIT_ASSERT_MESSAGE("This formula cell should not be an error.", pFC->GetErrCode() == 0);
@@ -1688,7 +1688,7 @@ void Test::testFormulaRefUpdateInsertColumns()
     ScMarkData aMark;
     aMark.SelectOneTable(0);
     ScDocFunc& rFunc = getDocShell().GetDocFunc();
-    rFunc.InsertCells(ScRange(0,0,0,1,MAXROW,0), &aMark, INS_INSCOLS, false, true, false);
+    rFunc.InsertCells(ScRange(0,0,0,1,MAXROW,0), &aMark, INS_INSCOLS_BEFORE, false, true, false);
 
     // Now, the original column B has moved to column D.
     if (!checkFormula(*m_pDoc, ScAddress(3,3,0), "SUM(D1:D3)"))
@@ -2485,7 +2485,7 @@ void Test::testFormulaRefUpdateNameExpandRef()
     ScDocFunc& rFunc = getDocShell().GetDocFunc();
     ScMarkData aMark;
     aMark.SelectOneTable(0);
-    rFunc.InsertCells(ScRange(0,3,0,MAXCOL,3,0), &aMark, INS_INSROWS, false, true, false);
+    rFunc.InsertCells(ScRange(0,3,0,MAXCOL,3,0), &aMark, INS_INSROWS_BEFORE, false, true, false);
     ScRangeData* pName = m_pDoc->GetRangeName()->findByUpperName("MYRANGE");
     CPPUNIT_ASSERT(pName);
     OUString aSymbol;
@@ -2514,7 +2514,7 @@ void Test::testFormulaRefUpdateNameExpandRef()
     CPPUNIT_ASSERT_EQUAL(6.0, m_pDoc->GetValue(0,0,0));
 
     // Insert rows over 3:5 which should expand the range by 3 rows.
-    rFunc.InsertCells(ScRange(0,2,0,MAXCOL,4,0), &aMark, INS_INSROWS, false, true, false);
+    rFunc.InsertCells(ScRange(0,2,0,MAXCOL,4,0), &aMark, INS_INSROWS_BEFORE, false, true, false);
 
     pName = m_pDoc->GetRangeName()->findByUpperName("MYRANGE");
     CPPUNIT_ASSERT(pName);
@@ -2557,7 +2557,7 @@ void Test::testFormulaRefUpdateNameExpandRef()
     CPPUNIT_ASSERT_EQUAL(6.0, m_pDoc->GetValue(ScAddress(4,0,0)));
 
     // Insert a new row at row 3.  This should expand MyData to A1:A4.
-    rFunc.InsertCells(ScRange(0,2,0,MAXCOL,2,0), &aMark, INS_INSROWS, false, true, false);
+    rFunc.InsertCells(ScRange(0,2,0,MAXCOL,2,0), &aMark, INS_INSROWS_BEFORE, false, true, false);
 
     // Set new value to A3.
     m_pDoc->SetValue(ScAddress(0,2,0), 4.0);
@@ -2785,7 +2785,7 @@ void Test::testFormulaRefUpdateValidity()
     aMark.SelectOneTable(0);
 
     // Insert a new column at Column B, to move the list from C2:C4 to D2:D4.
-    bool bInserted = rFunc.InsertCells(ScRange(1,0,0,1,MAXROW,0), &aMark, INS_INSCOLS, true, true, false);
+    bool bInserted = rFunc.InsertCells(ScRange(1,0,0,1,MAXROW,0), &aMark, INS_INSCOLS_BEFORE, true, true, false);
     CPPUNIT_ASSERT_MESSAGE("Column insertion failed.", bInserted);
     CPPUNIT_ASSERT_EQUAL(1.0, m_pDoc->GetValue(ScAddress(3,1,0)));
     CPPUNIT_ASSERT_EQUAL(2.0, m_pDoc->GetValue(ScAddress(3,2,0)));
@@ -3039,7 +3039,7 @@ void Test::testFuncROW()
     ScDocFunc& rFunc = getDocShell().GetDocFunc();
     ScMarkData aMark;
     aMark.SelectOneTable(0);
-    rFunc.InsertCells(ScRange(0,3,0,MAXCOL,3,0), &aMark, INS_INSROWS, false, true, false);
+    rFunc.InsertCells(ScRange(0,3,0,MAXCOL,3,0), &aMark, INS_INSROWS_BEFORE, false, true, false);
     if (!checkFormula(*m_pDoc, ScAddress(0,1,0), "ROW(A6)"))
         CPPUNIT_FAIL("Wrong formula!");
     if (!checkFormula(*m_pDoc, ScAddress(1,1,0), "ROW(B6)"))
diff --git a/sc/qa/unit/ucalc_sharedformula.cxx b/sc/qa/unit/ucalc_sharedformula.cxx
index 0cc63e5..719b27c 100644
--- a/sc/qa/unit/ucalc_sharedformula.cxx
+++ b/sc/qa/unit/ucalc_sharedformula.cxx
@@ -898,7 +898,7 @@ void Test::testSharedFormulasInsertRow()
     ScDocFunc& rFunc = getDocShell().GetDocFunc();
     ScMarkData aMark;
     aMark.SelectOneTable(0);
-    rFunc.InsertCells(ScRange(0,2,0,MAXCOL,2,0), &aMark, INS_INSROWS, true, true, false);
+    rFunc.InsertCells(ScRange(0,2,0,MAXCOL,2,0), &aMark, INS_INSROWS_BEFORE, true, true, false);
 
     bool bResult = aCheck.checkContent(m_pDoc);
     CPPUNIT_ASSERT_MESSAGE("Failed on the initial content check.", bResult);
diff --git a/sc/sdi/cellsh.sdi b/sc/sdi/cellsh.sdi
index 6da3c75..3e6fc6e 100644
--- a/sc/sdi/cellsh.sdi
+++ b/sc/sdi/cellsh.sdi
@@ -116,8 +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_CELLSDOWN       [ ExecMethod = ExecuteEdit; StateMethod = GetBlockState; ]
     FID_INS_CELLSRIGHT      [ ExecMethod = ExecuteEdit; StateMethod = GetBlockState; ]
     SID_DEL_ROWS            [ ExecMethod = ExecuteEdit; StateMethod = GetBlockState; ]
diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi
index 2fbf373..bb9b1b6 100644
--- a/sc/sdi/scalc.sdi
+++ b/sc/sdi/scalc.sdi
@@ -4108,7 +4108,7 @@ SfxVoidItem InsertColumnBreak FID_INS_COLBRK
 ]
 
 
-SfxVoidItem InsertColumns FID_INS_COLUMN
+SfxVoidItem InsertColumnsBefore FID_INS_COLUMNS_BEFORE
 ()
 [
     /* flags: */
@@ -4410,7 +4410,7 @@ SfxVoidItem InsertRowBreak FID_INS_ROWBRK
 ]
 
 
-SfxVoidItem InsertRows FID_INS_ROW
+SfxVoidItem InsertRowsBefore FID_INS_ROWS_BEFORE
 ()
 [
     /* flags: */
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 1245ef5..aed7215 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -1476,7 +1476,7 @@ bool canInsertCellsByPivot(const ScRange& rRange, const ScMarkData& rMarkData, I
     ScRange aRange(rRange); // local copy
     switch (eCmd)
     {
-        case INS_INSROWS:
+        case INS_INSROWS_BEFORE:
         {
             aRange.aStart.SetCol(0);
             aRange.aEnd.SetCol(MAXCOL);
@@ -1512,7 +1512,7 @@ bool canInsertCellsByPivot(const ScRange& rRange, const ScMarkData& rMarkData, I
             }
         }
         break;
-        case INS_INSCOLS:
+        case INS_INSCOLS_BEFORE:
         {
             aRange.aStart.SetRow(0);
             aRange.aEnd.SetRow(MAXROW);
@@ -1700,8 +1700,7 @@ bool ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
 
     SCTAB nSelCount = aMark.GetSelectCount();
 
-    //  zugehoerige Szenarien auch anpassen
-    // Test zusammengefasste
+    // Adjust also related scenarios
 
     SCCOL nMergeTestStartCol = nStartCol;
     SCROW nMergeTestStartRow = nStartRow;
@@ -1720,12 +1719,12 @@ bool ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
         nPaintEndRow = nMergeTestEndRow;
     }
 
-    if ( eCmd == INS_INSROWS )
+    if ( eCmd == INS_INSROWS_BEFORE )
     {
         nMergeTestStartCol = 0;
         nMergeTestEndCol = MAXCOL;
     }
-    if ( eCmd == INS_INSCOLS )
+    if ( eCmd == INS_INSCOLS_BEFORE )
     {
         nMergeTestStartRow = 0;
         nMergeTestEndRow = MAXROW;
@@ -1737,8 +1736,8 @@ bool ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
 
     bool bNeedRefresh = false;
 
-    SCCOL nEditTestEndCol = (eCmd==INS_INSCOLS) ? MAXCOL : nMergeTestEndCol;
-    SCROW nEditTestEndRow = (eCmd==INS_INSROWS) ? MAXROW : nMergeTestEndRow;
+    SCCOL nEditTestEndCol = (eCmd==INS_INSCOLS_BEFORE) ? MAXCOL : nMergeTestEndCol;
+    SCROW nEditTestEndRow = (eCmd==INS_INSROWS_BEFORE) ? MAXROW : nMergeTestEndRow;
     ScEditableTester aTester( &rDoc, nMergeTestStartCol, nMergeTestStartRow, nEditTestEndCol, nEditTestEndRow, aMark );
     if (!aTester.IsEditable())
     {
@@ -1854,7 +1853,7 @@ bool ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
 
             if( bInsertMerge )
             {
-                if( eCmd == INS_INSROWS || eCmd == INS_CELLSDOWN )
+                if( eCmd == INS_INSROWS_BEFORE || eCmd == INS_CELLSDOWN )
                 {
                     nStartRow = aExtendMergeRange.aStart.Row();
                     nEndRow = aExtendMergeRange.aEnd.Row();
@@ -1867,7 +1866,7 @@ bool ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
                         nEndCol = MAXCOL;
                     }
                 }
-                else if( eCmd == INS_CELLSRIGHT || eCmd == INS_INSCOLS )
+                else if( eCmd == INS_CELLSRIGHT || eCmd == INS_INSCOLS_BEFORE )
                 {
 
                     nStartCol = aExtendMergeRange.aStart.Col();
@@ -1912,7 +1911,7 @@ bool ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
             bSuccess = rDoc.InsertRow( nStartCol, 0, nEndCol, MAXTAB, nStartRow, static_cast<SCSIZE>(nEndRow-nStartRow+1), pRefUndoDoc, &aFullMark );
             nPaintEndRow = MAXROW;
             break;
-        case INS_INSROWS:
+        case INS_INSROWS_BEFORE:
             bSuccess = rDoc.InsertRow( 0, 0, MAXCOL, MAXTAB, nStartRow, static_cast<SCSIZE>(nEndRow-nStartRow+1), pRefUndoDoc, &aFullMark );
             nPaintStartCol = 0;
             nPaintEndCol = MAXCOL;
@@ -1923,7 +1922,7 @@ bool ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
             bSuccess = rDoc.InsertCol( nStartRow, 0, nEndRow, MAXTAB, nStartCol, static_cast<SCSIZE>(nEndCol-nStartCol+1), pRefUndoDoc, &aFullMark );
             nPaintEndCol = MAXCOL;
             break;
-        case INS_INSCOLS:
+        case INS_INSCOLS_BEFORE:
             bSuccess = rDoc.InsertCol( 0, 0, MAXROW, MAXTAB, nStartCol, static_cast<SCSIZE>(nEndCol-nStartCol+1), pRefUndoDoc, &aFullMark );
             nPaintStartRow = 0;
             nPaintEndRow = MAXROW;
@@ -1977,11 +1976,11 @@ bool ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
                 switch (eCmd)
                 {
                     case INS_CELLSDOWN:
-                    case INS_INSROWS:
+                    case INS_INSROWS_BEFORE:
                         aRange.aEnd.IncRow(static_cast<SCsCOL>(nEndRow-nStartRow+1));
                         break;
                     case INS_CELLSRIGHT:
-                    case INS_INSCOLS:
+                    case INS_INSCOLS_BEFORE:
                         aRange.aEnd.IncCol(static_cast<SCsCOL>(nEndCol-nStartCol+1));
                         break;
                     default:
@@ -2010,7 +2009,7 @@ bool ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
             else
                 rDoc.RefreshAutoFilter( nMergeTestStartCol, nMergeTestStartRow, nMergeTestEndCol, nMergeTestEndRow, i );
 
-            if ( eCmd == INS_INSROWS || eCmd == INS_INSCOLS )
+            if ( eCmd == INS_INSROWS_BEFORE ||eCmd == INS_INSCOLS_BEFORE )
                 rDoc.UpdatePageBreaks( i );
 
             sal_uInt16 nExtFlags = 0;
@@ -2021,8 +2020,9 @@ bool ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
             for( SCTAB j = i+1; j<nTabCount && rDoc.IsScenario(j); j++ )
                 nScenarioCount ++;
 
-            bool bAdjusted = ( eCmd == INS_INSROWS ) ? AdjustRowHeight(ScRange(0, nStartRow, i, MAXCOL, nEndRow, i+nScenarioCount )) :
-                                                       AdjustRowHeight(ScRange(0, nPaintStartRow, i, MAXCOL, nPaintEndRow, i+nScenarioCount ));
+            bool bAdjusted = ( eCmd == INS_INSROWS_BEFORE ) ?
+                        AdjustRowHeight(ScRange(0, nStartRow, i, MAXCOL, nEndRow, i+nScenarioCount )) :
+                        AdjustRowHeight(ScRange(0, nPaintStartRow, i, MAXCOL, nPaintEndRow, i+nScenarioCount ));
             if (bAdjusted)
             {
                 //  paint only what is not done by AdjustRowHeight
diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx
index 2bb995f..218bf4d 100644
--- a/sc/source/ui/docshell/docsh3.cxx
+++ b/sc/source/ui/docshell/docsh3.cxx
@@ -1020,10 +1020,10 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
                         }
                         break;
                         case SC_CAT_INSERT_ROWS:
-                            GetDocFunc().InsertCells( aSourceRange, NULL, INS_INSROWS, true, false );
+                            GetDocFunc().InsertCells( aSourceRange, NULL, INS_INSROWS_BEFORE, true, false );
                         break;
                         case SC_CAT_INSERT_COLS:
-                            GetDocFunc().InsertCells( aSourceRange, NULL, INS_INSCOLS, true, false );
+                            GetDocFunc().InsertCells( aSourceRange, NULL, INS_INSCOLS_BEFORE, true, false );
                         break;
                         case SC_CAT_DELETE_TABS :
                             GetDocFunc().DeleteTable( aSourceRange.aStart.Tab(), true, false );
diff --git a/sc/source/ui/miscdlgs/inscldlg.cxx b/sc/source/ui/miscdlgs/inscldlg.cxx
index 001d077..de44273 100644
--- a/sc/source/ui/miscdlgs/inscldlg.cxx
+++ b/sc/source/ui/miscdlgs/inscldlg.cxx
@@ -89,12 +89,12 @@ InsCellCmd ScInsertCellDlg::GetInsCellCmd() const
     else if ( m_pBtnInsRow->IsChecked()   )
     {
         nInsItemChecked=2;
-        nReturn = INS_INSROWS;
+        nReturn = INS_INSROWS_BEFORE;
     }
     else if ( m_pBtnInsCol->IsChecked()   )
     {
         nInsItemChecked=3;
-        nReturn = INS_INSCOLS;
+        nReturn = INS_INSCOLS_BEFORE;
     }
 
     return nReturn;
diff --git a/sc/source/ui/src/hdrcont.src b/sc/source/ui/src/hdrcont.src
index 91c4539..8379cb9 100644
--- a/sc/source/ui/src/hdrcont.src
+++ b/sc/source/ui/src/hdrcont.src
@@ -71,8 +71,8 @@ Menu RID_POPUP_ROWHEADER
 
         MenuItem
         {
-            Identifier = FID_INS_ROW ;
-            HelpId = CMD_FID_INS_ROW ;
+            Identifier = FID_INS_ROWS_BEFORE ;
+            HelpId = CMD_FID_INS_ROWS_BEFORE ;
             Text [ en-US ] = "~Insert Rows Above" ;
         };
         MenuItem
@@ -140,8 +140,8 @@ Menu RID_POPUP_COLHEADER
 
         MenuItem
         {
-            Identifier = FID_INS_COLUMN ;
-            HelpId = CMD_FID_INS_COLUMN ;
+            Identifier = FID_INS_COLUMNS_BEFORE ;
+            HelpId = CMD_FID_INS_COLUMNS_BEFORE ;
             Text [ en-US ] = "~Insert Columns Left" ;
         };
         MenuItem
diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx
index 2154466..29d14e5 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)            // whole row?
+    if (eCmd == INS_INSROWS_BEFORE )            // whole row?
     {
         aEffRange.aStart.SetCol(0);
         aEffRange.aEnd.SetCol(MAXCOL);
     }
 
-    if (eCmd == INS_INSCOLS)            // whole column?
+    if (eCmd == INS_INSCOLS_BEFORE )            // whole column?
     {
         aEffRange.aStart.SetRow(0);
         aEffRange.aEnd.SetRow(MAXROW);
@@ -179,7 +179,7 @@ void ScUndoInsertCells::DoChange( const bool bUndo )
 
     switch (eCmd)
     {
-        case INS_INSROWS:
+        case INS_INSROWS_BEFORE:
         case INS_CELLSDOWN:
             for( i=0; i<nCount; i++ )
             {
@@ -191,7 +191,7 @@ void ScUndoInsertCells::DoChange( const bool bUndo )
                     aEffRange.aStart.Row(), static_cast<SCSIZE>(aEffRange.aEnd.Row()-aEffRange.aStart.Row()+1));
             }
             break;
-        case INS_INSCOLS:
+        case INS_INSCOLS_BEFORE:
         case INS_CELLSRIGHT:
             for( i=0; i<nCount; i++ )
             {
@@ -229,7 +229,7 @@ void ScUndoInsertCells::DoChange( const bool bUndo )
     ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
     switch (eCmd)
     {
-        case INS_INSROWS:
+        case INS_INSROWS_BEFORE:
             nPaint |= PAINT_LEFT;
             aWorkRange.aEnd.SetRow(MAXROW);
             break;
@@ -245,7 +245,7 @@ void ScUndoInsertCells::DoChange( const bool bUndo )
                 }
             }
             break;
-        case INS_INSCOLS:
+        case INS_INSCOLS_BEFORE:
             nPaint |= PAINT_TOP;                // top bar
         case INS_CELLSRIGHT:
             for( i=0; i<nCount; i++ )
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 1201939..50ad9ec 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -7211,11 +7211,11 @@ void SAL_CALL ScTableSheetObj::insertCells( const table::CellRangeAddress& rRang
         InsCellCmd eCmd = INS_NONE;
         switch (nMode)
         {
-            case sheet::CellInsertMode_NONE:    bDo = false;            break;
-            case sheet::CellInsertMode_DOWN:    eCmd = INS_CELLSDOWN;   break;
-            case sheet::CellInsertMode_RIGHT:   eCmd = INS_CELLSRIGHT;  break;
-            case sheet::CellInsertMode_ROWS:    eCmd = INS_INSROWS;     break;
-            case sheet::CellInsertMode_COLUMNS: eCmd = INS_INSCOLS;     break;
+            case sheet::CellInsertMode_NONE:    bDo = false;                break;
+            case sheet::CellInsertMode_DOWN:    eCmd = INS_CELLSDOWN;       break;
+            case sheet::CellInsertMode_RIGHT:   eCmd = INS_CELLSRIGHT;      break;
+            case sheet::CellInsertMode_ROWS:    eCmd = INS_INSROWS_BEFORE;  break;
+            case sheet::CellInsertMode_COLUMNS: eCmd = INS_INSCOLS_BEFORE;  break;
             default:
                 OSL_FAIL("insertCells: falscher Mode");
                 bDo = false;
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 73f674ef..a47b7e0 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -3350,7 +3350,7 @@ void SAL_CALL ScTableColumnsObj::insertByIndex( sal_Int32 nPosition, sal_Int32 n
     {
         ScRange aRange( (SCCOL)(nStartCol+nPosition), 0, nTab,
                         (SCCOL)(nStartCol+nPosition+nCount-1), MAXROW, nTab );
-        bDone = pDocShell->GetDocFunc().InsertCells( aRange, NULL, INS_INSCOLS, true, true );
+        bDone = pDocShell->GetDocFunc().InsertCells( aRange, NULL, INS_INSCOLS_BEFORE, true, true );
     }
     if (!bDone)
         throw uno::RuntimeException();      // no other exceptions specified
@@ -3607,7 +3607,7 @@ void SAL_CALL ScTableRowsObj::insertByIndex( sal_Int32 nPosition, sal_Int32 nCou
     {
         ScRange aRange( 0, (SCROW)(nStartRow+nPosition), nTab,
                         MAXCOL, (SCROW)(nStartRow+nPosition+nCount-1), nTab );
-        bDone = pDocShell->GetDocFunc().InsertCells( aRange, NULL, INS_INSROWS, true, true );
+        bDone = pDocShell->GetDocFunc().InsertCells( aRange, NULL, INS_INSROWS_BEFORE, true, true );
     }
     if (!bDone)
         throw uno::RuntimeException();      // no other exceptions specified
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index aba1368..0b33924 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -207,12 +207,12 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet )
                 bDisable = (!bSimpleArea);
                 break;
 
-            case FID_INS_ROW:           // insert rows
+            case FID_INS_ROWS_BEFORE:           // insert rows
             case FID_INS_CELLSDOWN:
                 bDisable = (!bSimpleArea) || GetViewData()->SimpleColMarked();
                 break;
 
-            case FID_INS_COLUMN:        // insert columns
+            case FID_INS_COLUMNS_BEFORE:        // insert columns
             case FID_INS_CELLSRIGHT:
                 bDisable = (!bSimpleArea) || GetViewData()->SimpleRowMarked();
                 break;
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 6fd0e50..8697779 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -142,13 +142,13 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
 
         //  insert / delete cells / rows / columns
 
-        case FID_INS_ROW:
-            pTabViewShell->InsertCells(INS_INSROWS);
+        case FID_INS_ROWS_BEFORE:
+            pTabViewShell->InsertCells(INS_INSROWS_BEFORE);
             rReq.Done();
             break;
 
-        case FID_INS_COLUMN:
-            pTabViewShell->InsertCells(INS_INSCOLS);
+        case FID_INS_COLUMNS_BEFORE:
+            pTabViewShell->InsertCells(INS_INSCOLS_BEFORE);
             rReq.Done();
             break;
 
@@ -189,17 +189,17 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
                         {
                             case 'V': eCmd = INS_CELLSDOWN ;break;
                             case '>': eCmd = INS_CELLSRIGHT ;break;
-                            case 'R': eCmd = INS_INSROWS ;break;
-                            case 'C': eCmd = INS_INSCOLS ;break;
+                            case 'R': eCmd = INS_INSROWS_BEFORE ;break;
+                            case 'C': eCmd = INS_INSCOLS_BEFORE ;break;
                         }
                     }
                 }
                 else
                 {
                     if ( GetViewData()->SimpleColMarked() )
-                        eCmd = INS_INSCOLS;
+                        eCmd = INS_INSCOLS_BEFORE;
                     else if ( GetViewData()->SimpleRowMarked() )
-                        eCmd = INS_INSROWS;
+                        eCmd = INS_INSROWS_BEFORE;
                     else
                     {
                         ScDocument* pDoc = GetViewData()->GetDocument();
@@ -227,8 +227,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
                         {
                             case INS_CELLSDOWN: aParam = "V"; break;
                             case INS_CELLSRIGHT: aParam = ">"; break;
-                            case INS_INSROWS: aParam = "R"; break;
-                            case INS_INSCOLS: aParam = "C"; break;
+                            case INS_INSROWS_BEFORE: aParam = "R"; break;
+                            case INS_INSCOLS_BEFORE: aParam = "C"; break;
                             default:
                             {
                                 // added to avoid warnings
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index e7ffbed..a1054fc 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -407,8 +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_CELL );
     rBindings.Invalidate( FID_INS_CELLSDOWN );
     rBindings.Invalidate( FID_INS_CELLSRIGHT );
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index 3783473..35b22ff 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -1461,9 +1461,9 @@ bool ScViewFunc::InsertCells( InsCellCmd eCmd, bool bRecord, bool bPartOfPaste )
             CellContentChanged();
             ResetAutoSpell();
 
-            if ( eCmd == INS_INSROWS || eCmd == INS_INSCOLS )
+            if ( eCmd == INS_INSROWS_BEFORE || eCmd == INS_INSCOLS_BEFORE )
             {
-                OUString aOperation = ( eCmd == INS_INSROWS) ?
+                OUString aOperation = ( eCmd == INS_INSROWS_BEFORE ) ?
                     OUString("insert-rows"):
                     OUString("insert-columns");
                 HelperNotifyChanges::NotifyIfChangesListeners(*pDocSh, aRange, aOperation);
diff --git a/sc/uiconfig/scalc/menubar/menubar.xml b/sc/uiconfig/scalc/menubar/menubar.xml
index 46d3da4..3843434 100644
--- a/sc/uiconfig/scalc/menubar/menubar.xml
+++ b/sc/uiconfig/scalc/menubar/menubar.xml
@@ -181,8 +181,16 @@
                 </menu:menupopup>
             </menu:menu>
             <menu:menuitem menu:id=".uno:InsertCell"/>
-            <menu:menuitem menu:id=".uno:InsertRows"/>
-            <menu:menuitem menu:id=".uno:InsertColumns"/>
+            <menu:menu menu:id=".uno:InsertRowsMenu">
+                <menu:menupopup>
+                    <menu:menuitem menu:id=".uno:InsertRowsBefore"/>
+                </menu:menupopup>
+            </menu:menu>
+            <menu:menu menu:id=".uno:InsertColumnsMenu">
+                <menu:menupopup>
+                    <menu:menuitem menu:id=".uno:InsertColumnsBefore"/>
+                </menu:menupopup>
+            </menu:menu>
             <menu:menuitem menu:id=".uno:Insert"/>
             <menu:menuitem menu:id=".uno:InsertSheetFromFile"/>
             <menu:menuitem menu:id=".uno:InsertExternalDataSource"/>
diff --git a/sc/uiconfig/scalc/toolbar/insertcellsbar.xml b/sc/uiconfig/scalc/toolbar/insertcellsbar.xml
index 64fd28e..a91b10b 100644
--- a/sc/uiconfig/scalc/toolbar/insertcellsbar.xml
+++ b/sc/uiconfig/scalc/toolbar/insertcellsbar.xml
@@ -20,6 +20,6 @@
 <toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar">
  <toolbar:toolbaritem xlink:href=".uno:InsertCellsDown"/>
  <toolbar:toolbaritem xlink:href=".uno:InsertCellsRight"/>
- <toolbar:toolbaritem xlink:href=".uno:InsertRows"/>
- <toolbar:toolbaritem xlink:href=".uno:InsertColumns"/>
-</toolbar:toolbar>
\ No newline at end of file
+ <toolbar:toolbaritem xlink:href=".uno:InsertRowsBefore"/>
+ <toolbar:toolbaritem xlink:href=".uno:InsertColumnsBefore"/>
+</toolbar:toolbar>
diff --git a/sc/uiconfig/scalc/toolbar/standardbar.xml b/sc/uiconfig/scalc/toolbar/standardbar.xml
index 40c45b3..7848c35 100644
--- a/sc/uiconfig/scalc/toolbar/standardbar.xml
+++ b/sc/uiconfig/scalc/toolbar/standardbar.xml
@@ -46,8 +46,8 @@
  <toolbar:toolbaritem xlink:href=".uno:SpellOnline" toolbar:visible="false"/>
  <toolbar:toolbaritem xlink:href=".uno:Navigator" toolbar:visible="false"/>
  <toolbar:toolbarseparator/>
- <toolbar:toolbaritem xlink:href=".uno:InsertRows"/>
- <toolbar:toolbaritem xlink:href=".uno:InsertColumns"/>
+ <toolbar:toolbaritem xlink:href=".uno:InsertRowsBefore"/>
+ <toolbar:toolbaritem xlink:href=".uno:InsertColumnsBefore"/>
  <toolbar:toolbaritem xlink:href=".uno:DeleteRows"/>
  <toolbar:toolbaritem xlink:href=".uno:DeleteColumns"/>
  <toolbar:toolbarseparator/>


More information about the Libreoffice-commits mailing list