[Libreoffice-commits] core.git: dbaccess/source include/svx svx/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Fri Feb 19 14:57:44 UTC 2021


 dbaccess/source/ui/browser/sbagrid.cxx |    8 ++++----
 dbaccess/source/ui/inc/sbagrid.hxx     |    4 ++--
 include/svx/gridctrl.hxx               |    6 +++---
 svx/source/fmcomp/gridctrl.cxx         |   14 +++++++-------
 4 files changed, 16 insertions(+), 16 deletions(-)

New commits:
commit 84a3b4d7635d0a5819e8b376efa4d47e74612739
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Feb 19 12:35:48 2021 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Feb 19 15:56:56 2021 +0100

    nRow argument is unused
    
    Change-Id: I9401d5af8e537423e7198435457107e12817fc09
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111217
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx
index 1d7a657b453e..a78921935f6c 100644
--- a/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/dbaccess/source/ui/browser/sbagrid.cxx
@@ -666,9 +666,9 @@ CellController* SbaGridControl::GetController(sal_Int32 nRow, sal_uInt16 nCol)
     return FmGridControl::GetController(nRow, nCol);
 }
 
-void SbaGridControl::PreExecuteRowContextMenu(sal_uInt16 nRow, PopupMenu& rMenu)
+void SbaGridControl::PreExecuteRowContextMenu(PopupMenu& rMenu)
 {
-    FmGridControl::PreExecuteRowContextMenu(nRow, rMenu);
+    FmGridControl::PreExecuteRowContextMenu(rMenu);
 
     sal_uInt16 nPos = 0;
 
@@ -821,7 +821,7 @@ void SbaGridControl::SetBrowserAttrs()
     }
 }
 
-void SbaGridControl::PostExecuteRowContextMenu(sal_uInt16 nRow, const PopupMenu& rMenu, sal_uInt16 nExecutionResult)
+void SbaGridControl::PostExecuteRowContextMenu(const PopupMenu& rMenu, sal_uInt16 nExecutionResult)
 {
     switch (nExecutionResult)
     {
@@ -836,7 +836,7 @@ void SbaGridControl::PostExecuteRowContextMenu(sal_uInt16 nRow, const PopupMenu&
             break;
 
         default:
-            FmGridControl::PostExecuteRowContextMenu(nRow, rMenu, nExecutionResult);
+            FmGridControl::PostExecuteRowContextMenu(rMenu, nExecutionResult);
             break;
     }
 }
diff --git a/dbaccess/source/ui/inc/sbagrid.hxx b/dbaccess/source/ui/inc/sbagrid.hxx
index 9f9e6fc5fc4b..76759de963d7 100644
--- a/dbaccess/source/ui/inc/sbagrid.hxx
+++ b/dbaccess/source/ui/inc/sbagrid.hxx
@@ -252,8 +252,8 @@ namespace dbaui
         virtual ::svt::CellController* GetController(sal_Int32 nRow, sal_uInt16 nCol) override;
 
         // DbGridControl overridables
-        virtual void PreExecuteRowContextMenu(sal_uInt16 nRow, PopupMenu& rMenu) override;
-        virtual void PostExecuteRowContextMenu(sal_uInt16 nRow, const PopupMenu& rMenu, sal_uInt16 nExecutionResult) override;
+        virtual void PreExecuteRowContextMenu(PopupMenu& rMenu) override;
+        virtual void PostExecuteRowContextMenu(const PopupMenu& rMenu, sal_uInt16 nExecutionResult) override;
 
         // DbGridControl overridables
         virtual void onRowChange() override;
diff --git a/include/svx/gridctrl.hxx b/include/svx/gridctrl.hxx
index 7667d456bd00..5b13b328ae12 100644
--- a/include/svx/gridctrl.hxx
+++ b/include/svx/gridctrl.hxx
@@ -345,10 +345,10 @@ protected:
         All disabled entries will be removed before executing the menu, so be careful with separators
         near entries you probably wish to disable ...
     */
-    virtual void PreExecuteRowContextMenu(sal_uInt16 nRow, PopupMenu& rMenu);
+    virtual void PreExecuteRowContextMenu(PopupMenu& rMenu);
     /** After executing the context menu for a row this method is called.
     */
-    virtual void PostExecuteRowContextMenu(sal_uInt16 nRow, const PopupMenu& rMenu, sal_uInt16 nExecutionResult);
+    virtual void PostExecuteRowContextMenu(const PopupMenu& rMenu, sal_uInt16 nExecutionResult);
 
     /// @throws css::uno::RuntimeException
     void DataSourcePropertyChanged(const css::beans::PropertyChangeEvent& evt);
@@ -367,7 +367,7 @@ protected:
     // DragSourceHelper overridables
     virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel ) override;
 
-    void    executeRowContextMenu( sal_Int32 _nRow, const Point& _rPreferredPos );
+    void    executeRowContextMenu(const Point& _rPreferredPos);
 
 public:
     DbGridControl(
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index 509aa733a373..3bdec10d7145 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -2408,7 +2408,7 @@ sal_uInt32 DbGridControl::GetTotalCellWidth(sal_Int32 nRow, sal_uInt16 nColId)
         return 30;  // FIXME magic number for default cell width
 }
 
-void DbGridControl::PreExecuteRowContextMenu(sal_uInt16 /*nRow*/, PopupMenu& rMenu)
+void DbGridControl::PreExecuteRowContextMenu(PopupMenu& rMenu)
 {
     bool bDelete = (m_nOptions & DbGridControlOptions::Delete) && GetSelectRowCount() && !IsCurrentAppending();
     // if only a blank row is selected then do not delete
@@ -2427,7 +2427,7 @@ void DbGridControl::PreExecuteRowContextMenu(sal_uInt16 /*nRow*/, PopupMenu& rMe
     rMenu.EnableItem(rMenu.GetItemId("undo"), bCanUndo);
 }
 
-void DbGridControl::PostExecuteRowContextMenu(sal_uInt16 /*nRow*/, const PopupMenu& rMenu, sal_uInt16 nExecutionResult)
+void DbGridControl::PostExecuteRowContextMenu(const PopupMenu& rMenu, sal_uInt16 nExecutionResult)
 {
     if (nExecutionResult == rMenu.GetItemId("delete"))
     {
@@ -2529,14 +2529,14 @@ void DbGridControl::copyCellText(sal_Int32 _nRow, sal_uInt16 _nColId)
     OStringTransfer::CopyString( GetCurrentRowCellText( pColumn,m_xPaintRow ), this );
 }
 
-void DbGridControl::executeRowContextMenu( sal_Int32 _nRow, const Point& _rPreferredPos )
+void DbGridControl::executeRowContextMenu(const Point& _rPreferredPos)
 {
     VclBuilder aBuilder(nullptr, AllSettings::GetUIRootDir(), "svx/ui/rowsmenu.ui", "");
     VclPtr<PopupMenu> aContextMenu(aBuilder.get_menu("menu"));
 
-    PreExecuteRowContextMenu( static_cast<sal_uInt16>(_nRow), *aContextMenu );
+    PreExecuteRowContextMenu(*aContextMenu );
     aContextMenu->RemoveDisabledEntries( true, true );
-    PostExecuteRowContextMenu( static_cast<sal_uInt16>(_nRow), *aContextMenu, aContextMenu->Execute( this, _rPreferredPos ) );
+    PostExecuteRowContextMenu(*aContextMenu, aContextMenu->Execute(this, _rPreferredPos));
 }
 
 void DbGridControl::Command(const CommandEvent& rEvt)
@@ -2558,7 +2558,7 @@ void DbGridControl::Command(const CommandEvent& rEvt)
                     tools::Long nRow = FirstSelectedRow( );
 
                     ::tools::Rectangle aRowRect( GetRowRectPixel( nRow ) );
-                    executeRowContextMenu( nRow, aRowRect.LeftCenter() );
+                    executeRowContextMenu(aRowRect.LeftCenter());
 
                     // handled
                     return;
@@ -2570,7 +2570,7 @@ void DbGridControl::Command(const CommandEvent& rEvt)
 
             if (nColId == HandleColumnId)
             {
-                executeRowContextMenu( nRow, rEvt.GetMousePosPixel() );
+                executeRowContextMenu(rEvt.GetMousePosPixel());
             }
             else if (canCopyCellText(nRow, nColId))
             {


More information about the Libreoffice-commits mailing list