summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorPhilippe Jung <phil.jung@free.fr>2015-05-20 16:54:27 +0200
committerYousuf Philips <philipz85@hotmail.com>2015-05-31 17:58:21 +0000
commitf97beeef352fdd9fd4f157a7a4c4f6af8341cbe6 (patch)
tree076844dfeccb7836fab99fc876cfd1488b75cc07 /sc
parent08e278b411a3b824e9af611ebb1763c1f4f80ef2 (diff)
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@libreoffice.org> Reviewed-by: Yousuf Philips <philipz85@hotmail.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/global.hxx6
-rw-r--r--sc/inc/sc.hrc4
-rw-r--r--sc/inc/sccommands.h4
-rw-r--r--sc/qa/unit/ucalc.cxx6
-rw-r--r--sc/qa/unit/ucalc_formula.cxx16
-rw-r--r--sc/qa/unit/ucalc_sharedformula.cxx2
-rw-r--r--sc/sdi/cellsh.sdi4
-rw-r--r--sc/sdi/scalc.sdi4
-rw-r--r--sc/source/ui/docshell/docfunc.cxx34
-rw-r--r--sc/source/ui/docshell/docsh3.cxx4
-rw-r--r--sc/source/ui/miscdlgs/inscldlg.cxx4
-rw-r--r--sc/source/ui/src/hdrcont.src8
-rw-r--r--sc/source/ui/undo/undoblk.cxx12
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx10
-rw-r--r--sc/source/ui/unoobj/docuno.cxx4
-rw-r--r--sc/source/ui/view/cellsh.cxx4
-rw-r--r--sc/source/ui/view/cellsh1.cxx20
-rw-r--r--sc/source/ui/view/tabview3.cxx4
-rw-r--r--sc/source/ui/view/viewfunc.cxx4
-rw-r--r--sc/uiconfig/scalc/menubar/menubar.xml12
-rw-r--r--sc/uiconfig/scalc/toolbar/insertcellsbar.xml6
-rw-r--r--sc/uiconfig/scalc/toolbar/standardbar.xml4
22 files changed, 93 insertions, 83 deletions
diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx
index b95faf5cd305..1691745006e2 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 d70f489d9efa..6def9ba206f6 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 93a770e1ec58..ba8f94cfcdd4 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 dcc8cc17c493..c16dfb89b762 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 fe7d417d6e9d..9a0fb334efac 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 0cc63e5ad3e1..719b27c0d4d2 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 6da3c75b9829..3e6fc6ea4528 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 2fbf3733ff75..bb9b1b6519d4 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 1245ef562de5..aed72151b53b 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 2bb995f36829..218bf4dbba63 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 001d0778f931..de44273ac400 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 91c45393f9fb..8379cb9bf045 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 2154466e9732..29d14e5a608a 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 1201939eafbb..50ad9ec5e90b 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 73f674effbc1..a47b7e055d44 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 aba13687fb3f..0b33924e54da 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 6fd0e5074493..869777932555 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 e7ffbed59dfd..a1054fc893f1 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 3783473fdd90..35b22ff63636 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 46d3da4dcf7a..3843434fffe9 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 64fd28e8c029..a91b10b8adf6 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 40c45b33161a..7848c3582f05 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/>