include/svtools/brwbox.hxx        |    4 +--
 svtools/source/brwbox/brwbox1.cxx |   41 ++++++++++++++++++--------------------
 svtools/source/brwbox/brwbox2.cxx |   39 +++++++++++++++++-------------------
 3 files changed, 41 insertions(+), 43 deletions(-)

New commits:
commit c5367ee0a60966b755e726de6d175dfcd1630741
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Fri Jan 8 21:05:10 2021 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Sun Jan 10 14:59:07 2021 +0100

    remove some old debugging code
    
    Change-Id: Idd88e4dcc920d7dd198545e519d7860e59762bcd
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109048
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/include/svtools/brwbox.hxx b/include/svtools/brwbox.hxx
index a86fce72307f..f90d1a3c8932 100644
--- a/include/svtools/brwbox.hxx
+++ b/include/svtools/brwbox.hxx
@@ -433,8 +433,8 @@ protected:
     sal_uInt16      GetFirstVisibleColNumber() const { return nFirstCol; }
 
     // Focus-Rect enable / disable
-    void            DoShowCursor( const char *pWhoLog );
-    void            DoHideCursor( const char *pWhoLog );
+    void            DoShowCursor();
+    void            DoHideCursor();
     short           GetCursorHideCount() const;
 
     virtual VclPtr<BrowserHeader> CreateHeaderBar( BrowseBox* pParent );
diff --git a/svtools/source/brwbox/brwbox1.cxx 
b/svtools/source/brwbox/brwbox1.cxx
index 822ba21f7c00..b51b29cc91ad 100644
--- a/svtools/source/brwbox/brwbox1.cxx
+++ b/svtools/source/brwbox/brwbox1.cxx
@@ -205,7 +205,7 @@ short BrowseBox::GetCursorHideCount() const
 }
 
 
-void BrowseBox::DoShowCursor( const char * )
+void BrowseBox::DoShowCursor()
 {
     if (!pDataWin)
         return;
@@ -223,7 +223,7 @@ void BrowseBox::DoShowCursor( const char * )
 }
 
 
-void BrowseBox::DoHideCursor( const char * )
+void BrowseBox::DoHideCursor()
 {
     short nHiddenCount = ++pDataWin->nCursorHidden;
     if (PaintCursorIfHiddenOnce())
@@ -331,7 +331,7 @@ sal_uInt16 BrowseBox::ToggleSelectedColumn()
     sal_uInt16 nSelectedColId = BROWSER_INVALIDID;
     if ( pColSel && pColSel->GetSelectCount() )
     {
-        DoHideCursor( "ToggleSelectedColumn" );
+        DoHideCursor();
         ToggleSelection();
         tools::Long nSelected = pColSel->FirstSelected();
         if (nSelected != static_cast<tools::Long>(SFX_ENDOFSELECTION))
@@ -348,7 +348,7 @@ void BrowseBox::SetToggledSelectedColumn(sal_uInt16 
_nSelectedColumnId)
         pColSel->Select( GetColumnPos( _nSelectedColumnId ) );
         ToggleSelection();
         SAL_INFO("svtools", "BrowseBox::SetToggledSelectedColumn " << this );
-        DoShowCursor( "SetToggledSelectedColumn" );
+        DoShowCursor();
     }
 }
 
@@ -594,7 +594,7 @@ void BrowseBox::SetColumnWidth( sal_uInt16 nItemId, 
sal_uLong nWidth )
     if ( bUpdate )
     {
         // Selection hidden
-        DoHideCursor( "SetColumnWidth" );
+        DoHideCursor();
         ToggleSelection();
         //!pDataWin->Update();
         //!Control::Update();
@@ -643,7 +643,7 @@ void BrowseBox::SetColumnWidth( sal_uInt16 nItemId, 
sal_uLong nWidth )
         //!Control::Update();
         bSelectionIsVisible = bSelVis;
         ToggleSelection();
-        DoShowCursor( "SetColumnWidth" );
+        DoShowCursor();
     }
     UpdateScrollbars();
 
@@ -1073,9 +1073,8 @@ void BrowseBox::RowModified( sal_Int32 nRow, sal_uInt16 
nColId )
 
 void BrowseBox::Clear()
 {
-
     // adjust the total number of rows
-    DoHideCursor( "Clear" );
+    DoHideCursor();
     sal_Int32 nOldRowCount = nRowCount;
     nRowCount = 0;
     if(bMultiSelection)
@@ -1098,7 +1097,7 @@ void BrowseBox::Clear()
     Invalidate();
     UpdateScrollbars();
     SetNoSelection();
-    DoShowCursor( "Clear" );
+    DoShowCursor();
     CursorMoved();
 
     if ( !isAccessibleAlive() )
@@ -1150,7 +1149,7 @@ void BrowseBox::RowInserted( sal_Int32 nRow, sal_Int32 
nNumRows, bool bDoPaint,
     bool bLastRow = nRow >= nRowCount;
     nRowCount += nNumRows;
 
-    DoHideCursor( "RowInserted" );
+    DoHideCursor();
 
     // must we paint the new rows?
     sal_Int32 nOldCurRow = nCurRow;
@@ -1205,7 +1204,7 @@ void BrowseBox::RowInserted( sal_Int32 nRow, sal_Int32 
nNumRows, bool bDoPaint,
         AutoSizeLastColumn();
     }
 
-    DoShowCursor( "RowInserted" );
+    DoShowCursor();
     // notify accessible that rows were inserted
     if ( isAccessibleAlive() )
     {
@@ -1261,7 +1260,7 @@ void BrowseBox::RowRemoved( sal_Int32 nRow, sal_Int32 
nNumRows, bool bDoPaint )
         // hide cursor and selection
         SAL_INFO("svtools", "BrowseBox::HideCursor " << this );
         ToggleSelection();
-        DoHideCursor( "RowRemoved" );
+        DoHideCursor();
     }
 
     // adjust total row count
@@ -1339,7 +1338,7 @@ void BrowseBox::RowRemoved( sal_Int32 nRow, sal_Int32 
nNumRows, bool bDoPaint )
         // reshow cursor and selection
         ToggleSelection();
         SAL_INFO("svtools", "BrowseBox::ShowCursor " << this );
-        DoShowCursor( "RowRemoved" );
+        DoShowCursor();
 
         // adjust the vertical scrollbar
         UpdateScrollbars();
@@ -1446,7 +1445,7 @@ bool BrowseBox::GoToRow( sal_Int32 nRow, bool 
bRowColMove, bool bKeepSelection )
     // remove old highlight, if necessary
     if ( !bMultiSelection && !bKeepSelection )
         ToggleSelection();
-    DoHideCursor( "GoToRow" );
+    DoHideCursor();
 
     // must we scroll?
     bool bWasVisible = bSelectionIsVisible;
@@ -1486,7 +1485,7 @@ bool BrowseBox::GoToRow( sal_Int32 nRow, bool 
bRowColMove, bool bKeepSelection )
     // Cursor+Highlight
     if ( !bMultiSelection && !bKeepSelection)
         ToggleSelection();
-    DoShowCursor( "GoToRow" );
+    DoShowCursor();
     if ( !bRowColMove  && nOldCurRow != nCurRow )
         CursorMoved();
 
@@ -1524,7 +1523,7 @@ bool BrowseBox::GoToColumnId( sal_uInt16 nColId, bool 
bMakeVisible, bool bRowCol
         if ( !pColumn )
             return false;
 
-        DoHideCursor( "GoToColumnId" );
+        DoHideCursor();
         nCurColId = nColId;
 
         bool bScrolled = false;
@@ -1544,7 +1543,7 @@ bool BrowseBox::GoToColumnId( sal_uInt16 nColId, bool 
bMakeVisible, bool bRowCol
             bScrolled = true;
         }
 
-        DoShowCursor( "GoToColumnId" );
+        DoShowCursor();
         if (!bRowColMove)
         {
             //try to move to nCurRow, nColId
@@ -1585,9 +1584,9 @@ bool BrowseBox::GoToRowColumnId( sal_Int32 nRow, 
sal_uInt16 nColId )
     if (!IsCursorMoveAllowed(nRow, nColId))
         return false;
 
-    DoHideCursor( "GoToRowColumnId" );
+    DoHideCursor();
     bool bMoved = GoToRow(nRow, true) && GoToColumnId(nColId, true, true);
-    DoShowCursor( "GoToRowColumnId" );
+    DoShowCursor();
 
     if (bMoved)
         CursorMoved();
@@ -2341,7 +2340,7 @@ void BrowseBox::LoseFocus()
     if ( bHasFocus )
     {
         SAL_INFO("svtools", "BrowseBox::HideCursor " << this );
-        DoHideCursor( "LoseFocus" );
+        DoHideCursor();
 
         if ( !bKeepHighlight )
         {
@@ -2369,7 +2368,7 @@ void BrowseBox::GetFocus()
         }
 
         bHasFocus = true;
-        DoShowCursor( "GetFocus" );
+        DoShowCursor();
     }
     Control::GetFocus();
 }
diff --git a/svtools/source/brwbox/brwbox2.cxx 
b/svtools/source/brwbox/brwbox2.cxx
index c7a83818c7a0..592042b6fae2 100644
--- a/svtools/source/brwbox/brwbox2.cxx
+++ b/svtools/source/brwbox/brwbox2.cxx
@@ -216,7 +216,7 @@ void BrowseBox::ColumnMoved( sal_uInt16 )
 
 void BrowseBox::StartScroll()
 {
-    DoHideCursor( "StartScroll" );
+    DoHideCursor();
 }
 
 
@@ -224,7 +224,7 @@ void BrowseBox::EndScroll()
 {
     UpdateScrollbars();
     AutoSizeLastColumn();
-    DoShowCursor( "EndScroll" );
+    DoShowCursor();
 }
 
 
@@ -404,8 +404,7 @@ bool BrowseBox::IsFrozen( sal_uInt16 nColumnId ) const
 
 void BrowseBox::ExpandRowSelection( const BrowserMouseEvent& rEvt )
 {
-
-    DoHideCursor( "ExpandRowSelection" );
+    DoHideCursor();
 
     // expand the last selection
     if ( bMultiSelection )
@@ -462,7 +461,7 @@ void BrowseBox::ExpandRowSelection( const 
BrowserMouseEvent& rEvt )
             SelectRow( rEvt.GetRow() );
 
     GoToRow( rEvt.GetRow(), false );
-    DoShowCursor( "ExpandRowSelection" );
+    DoShowCursor();
 }
 
 
@@ -482,7 +481,7 @@ void BrowseBox::Resize()
     if (IsZoom())
         nSBSize = static_cast<sal_uLong>(nSBSize * 
static_cast<double>(GetZoom()));
 
-    DoHideCursor( "Resize" );
+    DoHideCursor();
     sal_uInt16 nOldVisibleRows = 0;
     //fdo#42694, post #i111125# GetDataRowHeight() can be 0
     if (GetDataRowHeight())
@@ -537,7 +536,7 @@ void BrowseBox::Resize()
     }
 
     AutoSizeLastColumn(); // adjust last column width
-    DoShowCursor( "Resize" );
+    DoShowCursor();
 }
 
 
@@ -1223,10 +1222,10 @@ void BrowseBox::SetUpdateMode( bool bUpdate )
             UpdateScrollbars();
             AutoSizeLastColumn();
         }
-        DoShowCursor( "SetUpdateMode" );
+        DoShowCursor();
     }
     else
-        DoHideCursor( "SetUpdateMode" );
+        DoHideCursor();
 }
 
 
@@ -1473,7 +1472,7 @@ void BrowseBox::MouseButtonDown( const BrowserMouseEvent& 
rEvt )
 
             // while selecting, no cursor
             bSelecting = true;
-            DoHideCursor( "MouseButtonDown" );
+            DoHideCursor();
 
             // DataRow?
             if ( rEvt.GetRow() >= 0 )
@@ -1566,7 +1565,7 @@ void BrowseBox::MouseButtonDown( const BrowserMouseEvent& 
rEvt )
 
             // turn cursor on again, if necessary
             bSelecting = false;
-            DoShowCursor( "MouseButtonDown" );
+            DoShowCursor();
             if ( bSelect )
                 Select();
         }
@@ -1604,7 +1603,7 @@ void BrowseBox::MouseButtonUp( const BrowserMouseEvent 
&rEvt )
     if ( bSelecting )
     {
         bSelecting = false;
-        DoShowCursor( "MouseButtonUp" );
+        DoShowCursor();
         if ( bSelect )
             Select();
     }
@@ -1711,22 +1710,22 @@ void BrowseBox::Dispatch( sal_uInt16 nId )
         case BROWSER_SELECTHOME:
             if ( GetRowCount() )
             {
-                DoHideCursor( "BROWSER_SELECTHOME" );
+                DoHideCursor();
                 for ( sal_Int32 nRow = GetCurRow(); nRow >= 0; --nRow )
                     SelectRow( nRow );
                 GoToRow( 0, true );
-                DoShowCursor( "BROWSER_SELECTHOME" );
+                DoShowCursor();
             }
             break;
         case BROWSER_SELECTEND:
             if ( GetRowCount() )
             {
-                DoHideCursor( "BROWSER_SELECTEND" );
+                DoHideCursor();
                 sal_Int32 nRows = GetRowCount();
                 for ( sal_Int32 nRow = GetCurRow(); nRow < nRows; ++nRow )
                     SelectRow( nRow );
                 GoToRow( GetRowCount() - 1, true );
-                DoShowCursor( "BROWSER_SELECTEND" );
+                DoShowCursor();
             }
             break;
         case BROWSER_SELECTDOWN:
@@ -1891,15 +1890,15 @@ void BrowseBox::SetCursorColor(const Color& _rCol)
         return;
 
     // ensure the cursor is hidden
-    DoHideCursor("SetCursorColor");
+    DoHideCursor();
     if (!m_bFocusOnlyCursor)
-        DoHideCursor("SetCursorColor - force");
+        DoHideCursor();
 
     m_aCursorColor = _rCol;
 
     if (!m_bFocusOnlyCursor)
-        DoShowCursor("SetCursorColor - force");
-    DoShowCursor("SetCursorColor");
+        DoShowCursor();
+    DoShowCursor();
 }
 
 tools::Rectangle BrowseBox::calcHeaderRect(bool _bIsColumnBar, bool _bOnScreen)
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to