[Libreoffice-commits] core.git: compilerplugins/clang include/svtools svtools/inc svtools/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Mon Oct 21 08:01:16 UTC 2019


 compilerplugins/clang/virtualdead.unusedparams.results |    9 ------
 include/svtools/table/tablerenderer.hxx                |   22 ++---------------
 svtools/inc/table/gridtablerenderer.hxx                |    5 +--
 svtools/source/table/gridtablerenderer.cxx             |    5 +--
 svtools/source/table/tablecontrol_impl.cxx             |    7 ++---
 5 files changed, 10 insertions(+), 38 deletions(-)

New commits:
commit 67d5fbe0d0f63407e768d329ec7a2bdc131fdaf9
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Fri Oct 18 10:53:06 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon Oct 21 10:00:09 2019 +0200

    loplugin:virtualdead unused param in ITableRenderer
    
    Change-Id: I008ff69494af305485a022def72a14a04b26a19e
    Reviewed-on: https://gerrit.libreoffice.org/81183
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/compilerplugins/clang/virtualdead.unusedparams.results b/compilerplugins/clang/virtualdead.unusedparams.results
index c216a504b8b7..0bf53a2da0ce 100644
--- a/compilerplugins/clang/virtualdead.unusedparams.results
+++ b/compilerplugins/clang/virtualdead.unusedparams.results
@@ -163,15 +163,6 @@ include/svl/svdde.hxx:239
 include/svl/svdde.hxx:241
     _Bool DdeTopic::MakeItem(const class rtl::OUString &,)
     0
-include/svtools/table/tablerenderer.hxx:113
-    void svt::table::ITableRenderer::PaintColumnHeader(int,_Bool,class OutputDevice &,const class tools::Rectangle &,const class StyleSettings &,)
-    10111
-include/svtools/table/tablerenderer.hxx:177
-    void svt::table::ITableRenderer::PaintRowHeader(_Bool,_Bool,class OutputDevice &,const class tools::Rectangle &,const class StyleSettings &,)
-    00111
-include/svtools/table/tablerenderer.hxx:224
-    void svt::table::ITableRenderer::HideCellCursor(class vcl::Window &,const class tools::Rectangle &,)
-    10
 include/svx/IAccessibleParent.hxx:80
     _Bool accessibility::IAccessibleParent::ReplaceChild(class accessibility::AccessibleShape *,const class com::sun::star::uno::Reference<class com::sun::star::drawing::XShape> &,const long,const class accessibility::AccessibleShapeTreeInfo &,)
     1101
diff --git a/include/svtools/table/tablerenderer.hxx b/include/svtools/table/tablerenderer.hxx
index 4e0933686065..7ac30e26c3ff 100644
--- a/include/svtools/table/tablerenderer.hxx
+++ b/include/svtools/table/tablerenderer.hxx
@@ -100,9 +100,6 @@ namespace svt { namespace table
 
             @param _nCol
                 the index of the column to paint
-            @param _bActive
-                <TRUE/> if and only if the column whose column is to be painted
-                contains the active cell.
             @param _rDevice
                 denotes the device to paint onto
             @param _rArea
@@ -110,7 +107,7 @@ namespace svt { namespace table
             @param _rStyle
                 the style to be used for drawing
         */
-        virtual void    PaintColumnHeader( ColPos _nCol, bool _bActive,
+        virtual void    PaintColumnHeader( ColPos _nCol,
                             vcl::RenderContext& _rDevice, const tools::Rectangle& _rArea,
                             const StyleSettings& _rStyle ) = 0;
 
@@ -154,19 +151,6 @@ namespace svt { namespace table
             The row to be painted is denoted by the most recent call to
             ->PrepareRow.
 
-            @param i_hasControlFocus
-                <TRUE/> if and only if the table control currently has the focus
-                <br/>
-                Note that this flag is equal to the respective flag in the
-                previous ->PrepareRow call, it's passed here for convenience
-                only.
-            @param _bSelected
-                <TRUE/> if and only if the row whose header cell is to be
-                painted is selected currently.
-                <br/>
-                Note that this flag is equal to the respective flag in the
-                previous ->PrepareRow call, it's passed here for convenience
-                only.
             @param _rDevice
                 denotes the device to paint onto
             @param _rArea
@@ -174,7 +158,7 @@ namespace svt { namespace table
             @param _rStyle
                 the style to be used for drawing
         */
-        virtual void    PaintRowHeader( bool i_hasControlFocus, bool _bSelected,
+        virtual void    PaintRowHeader(
                             vcl::RenderContext& _rDevice, tools::Rectangle const & _rArea,
                             StyleSettings const & _rStyle ) = 0;
 
@@ -221,7 +205,7 @@ namespace svt { namespace table
             The cell cursor is used to indicate the active/current cell
             of a table control.
         */
-        virtual void    HideCellCursor( vcl::Window& _rView, const tools::Rectangle& _rCursorRect) = 0;
+        virtual void    HideCellCursor( vcl::Window& _rView ) = 0;
 
         /** checks whether a given cell content fits into a given target area on a given device.
 
diff --git a/svtools/inc/table/gridtablerenderer.hxx b/svtools/inc/table/gridtablerenderer.hxx
index abd3ff7ac161..b19ed9dd25aa 100644
--- a/svtools/inc/table/gridtablerenderer.hxx
+++ b/svtools/inc/table/gridtablerenderer.hxx
@@ -70,14 +70,13 @@ namespace svt { namespace table
                             vcl::RenderContext& _rDevice, const tools::Rectangle& _rArea,
                             bool _bIsColHeaderArea, bool _bIsRowHeaderArea,
                             const StyleSettings& _rStyle ) override;
-        virtual void    PaintColumnHeader( ColPos _nCol, bool _bActive,
+        virtual void    PaintColumnHeader( ColPos _nCol,
                             vcl::RenderContext& _rDevice, const tools::Rectangle& _rArea,
                             const StyleSettings& _rStyle ) override;
         virtual void    PrepareRow( RowPos _nRow, bool i_hasControlFocus, bool _bSelected,
                             vcl::RenderContext& _rDevice, const tools::Rectangle& _rRowArea,
                             const StyleSettings& _rStyle ) override;
         virtual void    PaintRowHeader(
-                            bool i_hasControlFocus, bool _bSelected,
                             vcl::RenderContext& _rDevice, const tools::Rectangle& _rArea,
                             const StyleSettings& _rStyle ) override;
         virtual void    PaintCell( ColPos const i_col,
@@ -85,7 +84,7 @@ namespace svt { namespace table
                             vcl::RenderContext& _rDevice, const tools::Rectangle& _rArea,
                             const StyleSettings& _rStyle ) override;
         virtual void    ShowCellCursor( vcl::Window& _rView, const tools::Rectangle& _rCursorRect) override;
-        virtual void    HideCellCursor( vcl::Window& _rView, const tools::Rectangle& _rCursorRect) override;
+        virtual void    HideCellCursor( vcl::Window& _rView ) override;
         virtual bool    FitsIntoCell(
                             css::uno::Any const & i_cellContent,
                             OutputDevice& i_targetDevice, tools::Rectangle const & i_targetArea
diff --git a/svtools/source/table/gridtablerenderer.cxx b/svtools/source/table/gridtablerenderer.cxx
index d7b1910ee11c..d28a8a7f5b49 100644
--- a/svtools/source/table/gridtablerenderer.cxx
+++ b/svtools/source/table/gridtablerenderer.cxx
@@ -237,7 +237,6 @@ namespace svt { namespace table
 
     void GridTableRenderer::PaintColumnHeader(
         ColPos _nCol,
-        bool, // _bActive: no special painting for the active column at the moment
         vcl::RenderContext& rRenderContext,
         const tools::Rectangle& _rArea, const StyleSettings& _rStyle)
     {
@@ -362,7 +361,7 @@ namespace svt { namespace table
     }
 
 
-    void GridTableRenderer::PaintRowHeader(bool /*i_hasControlFocus*/, bool /*_bSelected*/, vcl::RenderContext& rRenderContext,
+    void GridTableRenderer::PaintRowHeader(vcl::RenderContext& rRenderContext,
                                            const tools::Rectangle& _rArea, const StyleSettings& _rStyle)
     {
         rRenderContext.Push( PushFlags::LINECOLOR | PushFlags::TEXTCOLOR );
@@ -544,7 +543,7 @@ namespace svt { namespace table
     }
 
 
-    void GridTableRenderer::HideCellCursor( vcl::Window& _rView, const tools::Rectangle&)
+    void GridTableRenderer::HideCellCursor( vcl::Window& _rView )
     {
         _rView.HideFocus();
     }
diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx
index 4690c611fb49..7153a8fa7838 100644
--- a/svtools/source/table/tablecontrol_impl.cxx
+++ b/svtools/source/table/tablecontrol_impl.cxx
@@ -1195,8 +1195,7 @@ namespace svt { namespace table
                 if (_rUpdateRect.GetIntersection(aCell.getRect()).IsEmpty())
                     continue;
 
-                bool isActiveColumn = (aCell.getColumn() == getCurrentColumn());
-                pRenderer->PaintColumnHeader(aCell.getColumn(), isActiveColumn, rRenderContext, aCell.getRect(), rStyle);
+                pRenderer->PaintColumnHeader(aCell.getColumn(), rRenderContext, aCell.getRect(), rStyle);
             }
         }
         // the area occupied by the row header, if any
@@ -1248,7 +1247,7 @@ namespace svt { namespace table
             if (m_pModel->hasRowHeaders())
             {
                 const tools::Rectangle aCurrentRowHeader(aRowHeaderArea.GetIntersection(aRowIterator.getRect()));
-                pRenderer->PaintRowHeader(isControlFocused, isSelectedRow, rRenderContext, aCurrentRowHeader, rStyle);
+                pRenderer->PaintRowHeader(rRenderContext, aCurrentRowHeader, rStyle);
             }
 
             if (!colCount)
@@ -1660,7 +1659,7 @@ namespace svt { namespace table
             if ( _bShow )
                 pRenderer->ShowCellCursor( *m_pDataWindow, aCellRect );
             else
-                pRenderer->HideCellCursor( *m_pDataWindow, aCellRect );
+                pRenderer->HideCellCursor( *m_pDataWindow );
         }
     }
 


More information about the Libreoffice-commits mailing list