summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-10-18 15:43:21 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-10-21 19:31:47 +0200
commit501233bf55cc89b146e2dca9a37d749d14486a18 (patch)
tree4b8600cec63ae91974a7a47f213c94a7d86ee9d8
parentb25fd58a1ecba62f7967dd118194f5994fcd5c23 (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>
-rw-r--r--compilerplugins/clang/virtualdead.unusedparams.results6
-rw-r--r--dbaccess/source/ui/inc/TableDesignControl.hxx4
-rw-r--r--dbaccess/source/ui/tabledesign/TEditControl.cxx8
-rw-r--r--dbaccess/source/ui/tabledesign/TEditControl.hxx4
-rw-r--r--dbaccess/source/ui/tabledesign/TableDesignControl.cxx2
5 files changed, 9 insertions, 15 deletions
diff --git a/compilerplugins/clang/virtualdead.unusedparams.results b/compilerplugins/clang/virtualdead.unusedparams.results
index e4f4db66e909..73874d79ef24 100644
--- a/compilerplugins/clang/virtualdead.unusedparams.results
+++ b/compilerplugins/clang/virtualdead.unusedparams.results
@@ -52,12 +52,6 @@ dbaccess/source/core/inc/containerapprove.hxx:53
dbaccess/source/ui/inc/callbacks.hxx:53
_Bool dbaui::IControlActionListener::requestDrag(signed char,const class Point &,)
01
-dbaccess/source/ui/inc/TableDesignControl.hxx:68
- _Bool dbaui::OTableRowView::IsPrimaryKeyAllowed(long,)
- 0
-dbaccess/source/ui/inc/TableDesignControl.hxx:70
- _Bool dbaui::OTableRowView::IsDeleteAllowed(long,)
- 0
desktop/source/deployment/registry/inc/dp_backend.h:84
void dp_registry::backend::Package::processPackage_(class osl::ResettableGuard<class osl::Mutex> &,_Bool,_Bool,const class rtl::Reference<class dp_misc::AbortChannel> &,const class com::sun::star::uno::Reference<class com::sun::star::ucb::XCommandEnvironment> &,)
01111
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() &&