Kaydet (Commit) ea327726 authored tarafından Caolán McNamara's avatar Caolán McNamara

Resolves: fdo#76206 show 'Delete table' instead of 'Delete row'

on deleting a full table

Change-Id: I03af8bcbae41e78229163a945a74387f53787ca5
üst 5a67883e
......@@ -588,7 +588,8 @@ public:
bool InsertRow( sal_uInt16 nCnt, bool bBehind );
bool InsertCol( sal_uInt16 nCnt, bool bBehind ); // 0 == at the end.
sal_Bool DeleteCol();
sal_Bool DeleteRow();
sal_Bool DeleteTable();
sal_Bool DeleteRow(bool bCompleteTable = false);
sal_Bool DeleteTblSel(); ///< Current selection, may be whole table.
......
......@@ -167,7 +167,8 @@ enum SwUndoId
UNDO_UI_DELETE_INVISIBLECNTNT,
UNDO_UI_REPLACE_STYLE,
UNDO_UI_DELETE_PAGE_BREAK,
UNDO_UI_TEXT_CORRECTION
UNDO_UI_TEXT_CORRECTION,
UNDO_UI_TABLE_DELETE
};
#endif
......
......@@ -334,7 +334,12 @@ sal_Bool SwFEShell::DeleteCol()
return bRet;
}
sal_Bool SwFEShell::DeleteRow()
sal_Bool SwFEShell::DeleteTable()
{
return DeleteRow(true);
}
sal_Bool SwFEShell::DeleteRow(bool bCompleteTable)
{
// check if Point/Mark of current cursor are in a table
SwFrm *pFrm = GetCurrFrm();
......@@ -441,9 +446,9 @@ sal_Bool SwFEShell::DeleteRow()
}
// now delete the lines
StartUndo(UNDO_ROW_DELETE);
StartUndo(bCompleteTable ? UNDO_UI_TABLE_DELETE : UNDO_ROW_DELETE);
bRet = GetDoc()->DeleteRowCol( aBoxes );
EndUndo(UNDO_ROW_DELETE);
EndUndo(bCompleteTable ? UNDO_UI_TABLE_DELETE : UNDO_ROW_DELETE);
}
else
bRet = sal_False;
......
......@@ -1039,7 +1039,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
rSh.StartAction();
rSh.StartUndo();
rSh.GetView().GetViewFrame()->GetDispatcher()->Execute(FN_TABLE_SELECT_ALL);
rSh.DeleteRow();
rSh.DeleteTable();
rSh.EndUndo();
rSh.EndAction();
}
......
......@@ -162,7 +162,8 @@
#define STR_REPLACE_STYLE (UI_UNDO_BEGIN + 12)
#define STR_DELETE_PAGE_BREAK (UI_UNDO_BEGIN + 13)
#define STR_TEXT_CORRECTION (UI_UNDO_BEGIN + 14)
#define UI_UNDO_END STR_TEXT_CORRECTION
#define STR_UNDO_TABLE_DELETE (UI_UNDO_BEGIN + 15)
#define UI_UNDO_END STR_UNDO_TABLE_DELETE
#define UNDO_MORE_STRINGS_BEGIN (UI_UNDO_END + 1)
#define STR_OCCURRENCES_OF (UNDO_MORE_STRINGS_BEGIN)
......
......@@ -651,5 +651,8 @@ String STR_UNDO_FLYFRMFMT_DESCRITPTION
{
Text[ en-US ] = "Change object description of $1";
};
String STR_UNDO_TABLE_DELETE
{
Text [ en-US ] = "Delete table" ;
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment