diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-18 15:43:21 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-21 19:31:47 +0200 |
commit | 501233bf55cc89b146e2dca9a37d749d14486a18 (patch) | |
tree | 4b8600cec63ae91974a7a47f213c94a7d86ee9d8 /dbaccess | |
parent | b25fd58a1ecba62f7967dd118194f5994fcd5c23 (diff) |
loplugin:virtualdead unused param in OTableRowView
Change-Id: Ice8d68284800e12af3e334722cc6109a1614e335
Reviewed-on: https://gerrit.libreoffice.org/81243
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess')
4 files changed, 9 insertions, 9 deletions
diff --git a/dbaccess/source/ui/inc/TableDesignControl.hxx b/dbaccess/source/ui/inc/TableDesignControl.hxx index 8aab2d345655..8c05358d207d 100644 --- a/dbaccess/source/ui/inc/TableDesignControl.hxx +++ b/dbaccess/source/ui/inc/TableDesignControl.hxx @@ -65,9 +65,9 @@ namespace dbaui virtual void InsertRows( long nRow ) = 0; virtual void InsertNewRows( long nRow ) = 0; - virtual bool IsPrimaryKeyAllowed( long nRow ) = 0; + virtual bool IsPrimaryKeyAllowed() = 0; virtual bool IsInsertNewAllowed( long nRow ) = 0; - virtual bool IsDeleteAllowed( long nRow ) = 0; + virtual bool IsDeleteAllowed() = 0; virtual RowStatus GetRowStatus(long nRow) const override; virtual void KeyInput(const KeyEvent& rEvt) override; diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx index 3c31c7bb0b90..6ee67535d414 100644 --- a/dbaccess/source/ui/tabledesign/TEditControl.cxx +++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx @@ -1238,7 +1238,7 @@ void OTableEditorCtrl::paste() } } -bool OTableEditorCtrl::IsDeleteAllowed( long /*nRow*/ ) +bool OTableEditorCtrl::IsDeleteAllowed() { return GetSelectRowCount() != 0 && GetView()->getController().isDropAllowed(); @@ -1259,7 +1259,7 @@ bool OTableEditorCtrl::IsInsertNewAllowed( long nRow ) return bInsertNewAllowed; } -bool OTableEditorCtrl::IsPrimaryKeyAllowed( long /*nRow*/ ) +bool OTableEditorCtrl::IsPrimaryKeyAllowed() { if( !GetSelectRowCount() ) return false; @@ -1368,8 +1368,8 @@ void OTableEditorCtrl::Command(const CommandEvent& rEvt) aContextMenu->EnableItem(aContextMenu->GetItemId("cut"), IsCutAllowed()); aContextMenu->EnableItem(aContextMenu->GetItemId("copy"), IsCopyAllowed()); aContextMenu->EnableItem(aContextMenu->GetItemId("paste"), IsPasteAllowed()); - aContextMenu->EnableItem(aContextMenu->GetItemId("delete"), IsDeleteAllowed(nRow)); - aContextMenu->EnableItem(aContextMenu->GetItemId("primarykey"), IsPrimaryKeyAllowed(nRow)); + aContextMenu->EnableItem(aContextMenu->GetItemId("delete"), IsDeleteAllowed()); + aContextMenu->EnableItem(aContextMenu->GetItemId("primarykey"), IsPrimaryKeyAllowed()); aContextMenu->EnableItem(aContextMenu->GetItemId("insert"), IsInsertNewAllowed(nRow)); aContextMenu->CheckItem("primarykey", IsRowSelected(GetCurRow()) && IsPrimaryKey()); diff --git a/dbaccess/source/ui/tabledesign/TEditControl.hxx b/dbaccess/source/ui/tabledesign/TEditControl.hxx index fe916961ca1a..d9d427b53379 100644 --- a/dbaccess/source/ui/tabledesign/TEditControl.hxx +++ b/dbaccess/source/ui/tabledesign/TEditControl.hxx @@ -107,9 +107,9 @@ namespace dbaui virtual void DeleteRows() override; virtual void InsertNewRows( long nRow ) override; - virtual bool IsPrimaryKeyAllowed( long nRow ) override; + virtual bool IsPrimaryKeyAllowed() override; virtual bool IsInsertNewAllowed( long nRow ) override; - virtual bool IsDeleteAllowed( long nRow ) override; + virtual bool IsDeleteAllowed() override; void ClearModified(); diff --git a/dbaccess/source/ui/tabledesign/TableDesignControl.cxx b/dbaccess/source/ui/tabledesign/TableDesignControl.cxx index f72ba4fa319b..dd7c796dd913 100644 --- a/dbaccess/source/ui/tabledesign/TableDesignControl.cxx +++ b/dbaccess/source/ui/tabledesign/TableDesignControl.cxx @@ -72,7 +72,7 @@ void OTableRowView::Init() void OTableRowView::KeyInput( const KeyEvent& rEvt ) { - if (IsDeleteAllowed(0)) + if (IsDeleteAllowed()) { if (rEvt.GetKeyCode().GetCode() == KEY_DELETE && // Delete rows !rEvt.GetKeyCode().IsShift() && |