[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang dbaccess/source sc/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Mon Oct 21 17:34:13 UTC 2019


 compilerplugins/clang/virtualdead.unusedparams.results |    3 
 dbaccess/source/ui/app/AppController.cxx               |    2 
 dbaccess/source/ui/app/AppController.hxx               |    2 
 dbaccess/source/ui/browser/dsbrowserDnD.cxx            |    2 
 dbaccess/source/ui/control/dbtreelistbox.cxx           |    4 
 dbaccess/source/ui/inc/callbacks.hxx                   |    2 
 dbaccess/source/ui/inc/unodatbr.hxx                    |    2 
 sc/source/ui/view/tabcont.cxx                          |    2 
 sc/source/ui/view/tabview.cxx                          |   49 ++++----
 sc/source/ui/view/tabview2.cxx                         |   99 ++++++++---------
 sc/source/ui/view/tabview3.cxx                         |   58 +++++----
 sc/source/ui/view/tabvwsh3.cxx                         |    2 
 12 files changed, 119 insertions(+), 108 deletions(-)

New commits:
commit ad3e00237f48c52dbd2833f21f5e2f5acfdd4167
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Mon Oct 21 16:28:48 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon Oct 21 19:32:42 2019 +0200

    sc: rowcol: tdf#50916 convert tabview
    
    Change-Id: I3ea46f14e506911118f091b09750d5d21bb902ef
    Reviewed-on: https://gerrit.libreoffice.org/81245
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx
index 4a2739c28fe0..11dd41de5254 100644
--- a/sc/source/ui/view/tabcont.cxx
+++ b/sc/source/ui/view/tabcont.cxx
@@ -480,7 +480,7 @@ void ScTabControl::DoDrag()
     ScDocument& rDoc = pDocSh->GetDocument();
 
     SCTAB nTab = pViewData->GetTabNo();
-    ScRange aTabRange( 0, 0, nTab, MAXCOL, MAXROW, nTab );
+    ScRange aTabRange( 0, 0, nTab, rDoc.MaxCol(), rDoc.MaxRow(), nTab );
     ScMarkData aTabMark = pViewData->GetMarkData();
     aTabMark.ResetMark();   // doesn't change marked table information
     aTabMark.SetMarkArea( aTabRange );
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index baf486d514a5..807dc27d4993 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -1169,6 +1169,7 @@ IMPL_LINK( ScTabView, ScrollHdl, ScrollBar*, pScroll, void )
 
 void ScTabView::ScrollX( long nDeltaX, ScHSplitPos eWhich, bool bUpdBars )
 {
+    ScDocument* pDoc = aViewData.GetDocument();
     SCCOL nOldX = aViewData.GetPosX(eWhich);
     SCCOL nNewX = nOldX + static_cast<SCCOL>(nDeltaX);
     if ( nNewX < 0 )
@@ -1176,17 +1177,16 @@ void ScTabView::ScrollX( long nDeltaX, ScHSplitPos eWhich, bool bUpdBars )
         nDeltaX -= nNewX;
         nNewX = 0;
     }
-    if ( nNewX > MAXCOL )
+    if ( nNewX > pDoc->MaxCol() )
     {
-        nDeltaX -= nNewX - MAXCOL;
-        nNewX = MAXCOL;
+        nDeltaX -= nNewX - pDoc->MaxCol();
+        nNewX = pDoc->MaxCol();
     }
 
     SCCOL nDir = ( nDeltaX > 0 ) ? 1 : -1;
-    ScDocument* pDoc = aViewData.GetDocument();
     SCTAB nTab = aViewData.GetTabNo();
     while ( pDoc->ColHidden(nNewX, nTab) &&
-            nNewX+nDir >= 0 && nNewX+nDir <= MAXCOL )
+            nNewX+nDir >= 0 && nNewX+nDir <= pDoc->MaxCol() )
         nNewX = sal::static_int_cast<SCCOL>( nNewX + nDir );
 
     // freeze
@@ -1207,7 +1207,7 @@ void ScTabView::ScrollX( long nDeltaX, ScHSplitPos eWhich, bool bUpdBars )
 
     HideAllCursors();
 
-    if ( nNewX >= 0 && nNewX <= MAXCOL && nDeltaX )
+    if ( nNewX >= 0 && nNewX <= pDoc->MaxCol() && nDeltaX )
     {
         SCCOL nTrackX = std::max( nOldX, nNewX );
 
@@ -1252,6 +1252,7 @@ void ScTabView::ScrollX( long nDeltaX, ScHSplitPos eWhich, bool bUpdBars )
 
 void ScTabView::ScrollY( long nDeltaY, ScVSplitPos eWhich, bool bUpdBars )
 {
+    ScDocument* pDoc = aViewData.GetDocument();
     SCROW nOldY = aViewData.GetPosY(eWhich);
     SCROW nNewY = nOldY + static_cast<SCROW>(nDeltaY);
     if ( nNewY < 0 )
@@ -1259,17 +1260,16 @@ void ScTabView::ScrollY( long nDeltaY, ScVSplitPos eWhich, bool bUpdBars )
         nDeltaY -= nNewY;
         nNewY = 0;
     }
-    if ( nNewY > MAXROW )
+    if ( nNewY > pDoc->MaxRow() )
     {
-        nDeltaY -= nNewY - MAXROW;
-        nNewY = MAXROW;
+        nDeltaY -= nNewY - pDoc->MaxRow();
+        nNewY = pDoc->MaxRow();
     }
 
     SCROW nDir = ( nDeltaY > 0 ) ? 1 : -1;
-    ScDocument* pDoc = aViewData.GetDocument();
     SCTAB nTab = aViewData.GetTabNo();
     while ( pDoc->RowHidden(nNewY, nTab) &&
-            nNewY+nDir >= 0 && nNewY+nDir <= MAXROW )
+            nNewY+nDir >= 0 && nNewY+nDir <= pDoc->MaxRow() )
         nNewY += nDir;
 
     // freeze
@@ -1290,7 +1290,7 @@ void ScTabView::ScrollY( long nDeltaY, ScVSplitPos eWhich, bool bUpdBars )
 
     HideAllCursors();
 
-    if ( nNewY >= 0 && nNewY <= MAXROW && nDeltaY )
+    if ( nNewY >= 0 && nNewY <= pDoc->MaxRow() && nDeltaY )
     {
         SCROW nTrackY = std::max( nOldY, nNewY );
 
@@ -1354,7 +1354,7 @@ SCROW lcl_LastVisible( const ScViewData& rViewData )
     ScDocument* pDoc = rViewData.GetDocument();
     SCTAB nTab = rViewData.GetTabNo();
 
-    SCROW nVis = MAXROW;
+    SCROW nVis = pDoc->MaxRow();
     while ( nVis > 0 && pDoc->GetRowHeight( nVis, nTab ) == 0 )
         --nVis;
     return nVis;
@@ -1367,7 +1367,8 @@ void ScTabView::UpdateHeaderWidth( const ScVSplitPos* pWhich, const SCROW* pPosY
     if (!pRowBar[SC_SPLIT_BOTTOM])
         return;
 
-    SCROW nEndPos = MAXROW;
+    ScDocument* pDoc = aViewData.GetDocument();
+    SCROW nEndPos = pDoc->MaxRow();
     if ( !aViewData.GetViewShell()->GetViewFrame()->GetFrame().IsInPlace() )
     {
         //  for OLE Inplace always MAXROW
@@ -1377,7 +1378,7 @@ void ScTabView::UpdateHeaderWidth( const ScVSplitPos* pWhich, const SCROW* pPosY
         else
             nEndPos = aViewData.GetPosY( SC_SPLIT_BOTTOM );
         nEndPos += aViewData.CellsAtY( nEndPos, 1, SC_SPLIT_BOTTOM ); // VisibleCellsY
-        if (nEndPos > MAXROW)
+        if (nEndPos > pDoc->MaxRow())
             nEndPos = lcl_LastVisible( aViewData );
 
         if ( aViewData.GetVSplitMode() != SC_SPLIT_NONE )
@@ -1388,7 +1389,7 @@ void ScTabView::UpdateHeaderWidth( const ScVSplitPos* pWhich, const SCROW* pPosY
             else
                 nTopEnd = aViewData.GetPosY( SC_SPLIT_TOP );
             nTopEnd += aViewData.CellsAtY( nTopEnd, 1, SC_SPLIT_TOP );// VisibleCellsY
-            if (nTopEnd > MAXROW)
+            if (nTopEnd > pDoc->MaxRow())
                 nTopEnd = lcl_LastVisible( aViewData );
 
             if ( nTopEnd > nEndPos )
@@ -1587,8 +1588,9 @@ void ScTabView::DoHSplit(long nSplitPos)
             if ( nLeftWidth < 0 ) nLeftWidth = 0;
             nNewDelta = nOldDelta + aViewData.CellsAtX( nOldDelta, 1, SC_SPLIT_LEFT,
                             static_cast<sal_uInt16>(nLeftWidth) );
-            if ( nNewDelta > MAXCOL )
-                nNewDelta = MAXCOL;
+            ScDocument* pDoc = aViewData.GetDocument();
+            if ( nNewDelta > pDoc->MaxCol() )
+                nNewDelta = pDoc->MaxCol();
             aViewData.SetPosX( SC_SPLIT_RIGHT, nNewDelta );
             if ( nNewDelta > aViewData.GetCurX() )
                 ActivatePart( (WhichV(aViewData.GetActivePart()) == SC_SPLIT_BOTTOM) ?
@@ -1659,8 +1661,9 @@ void ScTabView::DoVSplit(long nSplitPos)
             if ( nTopHeight < 0 ) nTopHeight = 0;
             nNewDelta = nOldDelta + aViewData.CellsAtY( nOldDelta, 1, SC_SPLIT_TOP,
                             static_cast<sal_uInt16>(nTopHeight) );
-            if ( nNewDelta > MAXROW )
-                nNewDelta = MAXROW;
+            ScDocument* pDoc = aViewData.GetDocument();
+            if ( nNewDelta > pDoc->MaxRow() )
+                nNewDelta = pDoc->MaxRow();
             aViewData.SetPosY( SC_SPLIT_BOTTOM, nNewDelta );
             if ( nNewDelta > aViewData.GetCurY() )
                 ActivatePart( (WhichH(aViewData.GetActivePart()) == SC_SPLIT_LEFT) ?
@@ -1731,8 +1734,8 @@ Point ScTabView::GetChartInsertPos( const Size& rSize, const ScRange& rCellRange
         bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
         long nLayoutSign = bLayoutRTL ? -1 : 1;
 
-        long nDocX = static_cast<long>( static_cast<double>(pDoc->GetColOffset( MAXCOL + 1, nTab )) * HMM_PER_TWIPS ) * nLayoutSign;
-        long nDocY = static_cast<long>( static_cast<double>(pDoc->GetRowOffset( MAXROW + 1, nTab )) * HMM_PER_TWIPS );
+        long nDocX = static_cast<long>( static_cast<double>(pDoc->GetColOffset( pDoc->MaxCol() + 1, nTab )) * HMM_PER_TWIPS ) * nLayoutSign;
+        long nDocY = static_cast<long>( static_cast<double>(pDoc->GetRowOffset( pDoc->MaxRow() + 1, nTab )) * HMM_PER_TWIPS );
 
         if ( aVisible.Left() * nLayoutSign > nDocX * nLayoutSign )
             aVisible.SetLeft( nDocX );
@@ -2687,7 +2690,7 @@ OUString ScTabView::getRowColumnHeaders(const tools::Rectangle& rRectangle)
         if (pModelObj)
             aOldSize = pModelObj->getDocumentSize();
 
-        aViewData.SetMaxTiledCol(std::min(std::max(nEndCol, aViewData.GetMaxTiledCol()) + nVisibleCols, long(MAXCOL)));
+        aViewData.SetMaxTiledCol(std::min(std::max(nEndCol, aViewData.GetMaxTiledCol()) + nVisibleCols, long(pDoc->MaxCol())));
 
         Size aNewSize(0, 0);
         if (pModelObj)
diff --git a/sc/source/ui/view/tabview2.cxx b/sc/source/ui/view/tabview2.cxx
index c9462e7e2e3e..6983f2fee4b7 100644
--- a/sc/source/ui/view/tabview2.cxx
+++ b/sc/source/ui/view/tabview2.cxx
@@ -71,13 +71,13 @@ void moveCursorByProtRule(
 
     if (nMovX > 0)
     {
-        for (SCCOL i = 0; i < nMovX && rCol < MAXCOL; ++i)
+        for (SCCOL i = 0; i < nMovX && rCol < pDoc->MaxCol(); ++i)
         {
             SCCOL nNewUnhiddenCol = rCol + 1;
             SCCOL nEndCol = 0;
             while(pDoc->ColHidden(nNewUnhiddenCol, nTab, nullptr, &nEndCol))
             {
-                if(nNewUnhiddenCol >= MAXCOL)
+                if(nNewUnhiddenCol >= pDoc->MaxCol())
                     return;
 
                 i += nEndCol - nNewUnhiddenCol + 1;
@@ -112,13 +112,13 @@ void moveCursorByProtRule(
 
     if (nMovY > 0)
     {
-        for (SCROW i = 0; i < nMovY && rRow < MAXROW; ++i)
+        for (SCROW i = 0; i < nMovY && rRow < pDoc->MaxRow(); ++i)
         {
             SCROW nNewUnhiddenRow = rRow + 1;
             SCROW nEndRow = 0;
             while(pDoc->RowHidden(nNewUnhiddenRow, nTab, nullptr, &nEndRow))
             {
-                if(nNewUnhiddenRow >= MAXROW)
+                if(nNewUnhiddenRow >= pDoc->MaxRow())
                     return;
 
                 i += nEndRow - nNewUnhiddenRow + 1;
@@ -152,7 +152,7 @@ void moveCursorByProtRule(
     }
 }
 
-bool checkBoundary(SCCOL& rCol, SCROW& rRow)
+bool checkBoundary(const ScDocument* pDoc, SCCOL& rCol, SCROW& rRow)
 {
     bool bGood = true;
     if (rCol < 0)
@@ -160,9 +160,9 @@ bool checkBoundary(SCCOL& rCol, SCROW& rRow)
         rCol = 0;
         bGood = false;
     }
-    else if (rCol > MAXCOL)
+    else if (rCol > pDoc->MaxCol())
     {
-        rCol = MAXCOL;
+        rCol = pDoc->MaxCol();
         bGood = false;
     }
 
@@ -171,9 +171,9 @@ bool checkBoundary(SCCOL& rCol, SCROW& rRow)
         rRow = 0;
         bGood = false;
     }
-    else if (rRow > MAXROW)
+    else if (rRow > pDoc->MaxRow())
     {
-        rRow = MAXROW;
+        rRow = pDoc->MaxRow();
         bGood = false;
     }
     return bGood;
@@ -213,7 +213,7 @@ void moveCursorByMergedCell(
         if (bOriginMerged)
         {
             // Original cell is merged.  Push the block end outside the merged region.
-            if (nOrigX < MAXCOL && nOrigX < rCol && rCol <= nOrigX + nColSpan - 1)
+            if (nOrigX < pDoc->MaxCol() && nOrigX < rCol && rCol <= nOrigX + nColSpan - 1)
                 rCol = nOrigX + nColSpan;
         }
         else
@@ -224,7 +224,7 @@ void moveCursorByMergedCell(
         if (nOld < rCol)
         {
             // The block end has moved.  Check the protection setting and move back if needed.
-            checkBoundary(rCol, rRow);
+            checkBoundary(pDoc, rCol, rRow);
             if (!isCellQualified(pDoc, rCol, rRow, nTab, bSelectLocked, bSelectUnlocked))
                 --rCol;
         }
@@ -246,7 +246,7 @@ void moveCursorByMergedCell(
         if (nOld > rCol)
         {
             // The block end has moved.  Check the protection setting and move back if needed.
-            checkBoundary(rCol, rRow);
+            checkBoundary(pDoc, rCol, rRow);
             if (!isCellQualified(pDoc, rCol, rRow, nTab, bSelectLocked, bSelectUnlocked))
                 ++rCol;
         }
@@ -257,7 +257,7 @@ void moveCursorByMergedCell(
         if (bOriginMerged)
         {
             // Original cell is merged.  Push the block end outside the merged region.
-            if (nOrigY < MAXROW && nOrigY < rRow && rRow <= nOrigY + nRowSpan - 1)
+            if (nOrigY < pDoc->MaxRow() && nOrigY < rRow && rRow <= nOrigY + nRowSpan - 1)
                 rRow = nOrigY + nRowSpan;
         }
         else
@@ -268,7 +268,7 @@ void moveCursorByMergedCell(
         if (nOld < rRow)
         {
             // The block end has moved.  Check the protection setting and move back if needed.
-            checkBoundary(rCol, rRow);
+            checkBoundary(pDoc, rCol, rRow);
             if (!isCellQualified(pDoc, rCol, rRow, nTab, bSelectLocked, bSelectUnlocked))
                 --rRow;
         }
@@ -290,7 +290,7 @@ void moveCursorByMergedCell(
         if (nOld > rRow)
         {
             // The block end has moved.  Check the protection setting and move back if needed.
-            checkBoundary(rCol, rRow);
+            checkBoundary(pDoc, rCol, rRow);
             if (!isCellQualified(pDoc, rCol, rRow, nTab, bSelectLocked, bSelectUnlocked))
                 ++rRow;
         }
@@ -301,13 +301,14 @@ void moveCursorByMergedCell(
 
 void ScTabView::PaintMarks(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow )
 {
-    if (!ValidCol(nStartCol)) nStartCol = MAXCOL;
-    if (!ValidRow(nStartRow)) nStartRow = MAXROW;
-    if (!ValidCol(nEndCol)) nEndCol = MAXCOL;
-    if (!ValidRow(nEndRow)) nEndRow = MAXROW;
+    auto pDoc = aViewData.GetDocument();
+    if (!ValidCol(nStartCol)) nStartCol = pDoc->MaxCol();
+    if (!ValidRow(nStartRow)) nStartRow = pDoc->MaxRow();
+    if (!ValidCol(nEndCol)) nEndCol = pDoc->MaxCol();
+    if (!ValidRow(nEndRow)) nEndRow = pDoc->MaxRow();
 
-    bool bLeft = (nStartCol==0 && nEndCol==MAXCOL);
-    bool bTop = (nStartRow==0 && nEndRow==MAXROW);
+    bool bLeft = (nStartCol==0 && nEndCol==pDoc->MaxCol());
+    bool bTop = (nStartRow==0 && nEndRow==pDoc->MaxRow());
 
     if (bLeft)
         PaintLeftArea( nStartRow, nEndRow );
@@ -353,8 +354,9 @@ void ScTabView::InitBlockMode( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ,
 {
     if (!IsBlockMode())
     {
-        if (!ValidCol(nCurX)) nCurX = MAXCOL;
-        if (!ValidRow(nCurY)) nCurY = MAXROW;
+        auto pDoc = aViewData.GetDocument();
+        if (!ValidCol(nCurX)) nCurX = pDoc->MaxCol();
+        if (!ValidRow(nCurY)) nCurY = pDoc->MaxRow();
 
         ScMarkData& rMark = aViewData.GetMarkData();
         SCTAB nTab = aViewData.GetTabNo();
@@ -388,13 +390,13 @@ void ScTabView::InitBlockMode( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ,
         if (bBlockCols)
         {
             nBlockStartY = nBlockStartYOrig = 0;
-            nBlockEndY = MAXROW;
+            nBlockEndY = pDoc->MaxRow();
         }
 
         if (bBlockRows)
         {
             nBlockStartX = nBlockStartXOrig = 0;
-            nBlockEndX = MAXCOL;
+            nBlockEndX = pDoc->MaxCol();
         }
 
         rMark.SetMarkArea( ScRange( nBlockStartX,nBlockStartY, nTab, nBlockEndX,nBlockEndY, nTab ) );
@@ -446,8 +448,9 @@ bool ScTabView::IsBlockMode() const
 void ScTabView::MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ,
                             bool bCols, bool bRows, bool bCellSelection )
 {
-    if (!ValidCol(nCurX)) nCurX = MAXCOL;
-    if (!ValidRow(nCurY)) nCurY = MAXROW;
+    ScDocument* pDocument = aViewData.GetDocument();
+    if (!ValidCol(nCurX)) nCurX = pDocument->MaxCol();
+    if (!ValidRow(nCurY)) nCurY = pDocument->MaxRow();
 
     if (!IsBlockMode())
     {
@@ -456,9 +459,9 @@ void ScTabView::MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ,
     }
 
     if (bCols)
-        nCurY = MAXROW;
+        nCurY = pDocument->MaxRow();
     if (bRows)
-        nCurX = MAXCOL;
+        nCurX = pDocument->MaxCol();
 
     ScMarkData& rMark = aViewData.GetMarkData();
     OSL_ENSURE(rMark.IsMarked() || rMark.IsMultiMarked(), "MarkCursor, !IsMarked()");
@@ -495,7 +498,6 @@ void ScTabView::MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ,
             SCROW nCurYOffset = 0;
             SCROW nBlockStartYOffset = 0;
             bool bBlockStartMerged = false;
-            ScDocument* pDocument = aViewData.GetDocument();
 
             // The following block checks whether or not the "BlockStart" (anchor)
             // cell is merged.  If it's merged, it'll then move the position of the
@@ -569,8 +571,8 @@ void ScTabView::MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ,
 
             nBlockStartX = nBlockStartX + nBlockStartXOffset >= 0 ? nBlockStartX + nBlockStartXOffset : 0;
             nBlockStartY = nBlockStartY + nBlockStartYOffset >= 0 ? nBlockStartY + nBlockStartYOffset : 0;
-            nBlockEndX = std::min<SCCOL>(nCurX + nCurXOffset, MAXCOL);
-            nBlockEndY = std::min(nCurY + nCurYOffset, MAXROW);
+            nBlockEndX = std::min<SCCOL>(nCurX + nCurXOffset, pDocument->MaxCol());
+            nBlockEndY = std::min(nCurY + nCurYOffset, pDocument->MaxRow());
         }
         else
         {
@@ -698,9 +700,9 @@ void ScTabView::GetAreaMoveEndPosition(SCCOL nMovX, SCROW nMovY, ScFollowMode eM
 
     if (eMode==SC_FOLLOW_JUMP)                  // bottom right do not show too much grey
     {
-        if (nMovX != 0 && nNewX == MAXCOL)
+        if (nMovX != 0 && nNewX == pDoc->MaxCol())
             eMode = SC_FOLLOW_LINE;
-        if (nMovY != 0 && nNewY == MAXROW)
+        if (nMovY != 0 && nNewY == pDoc->MaxRow())
             eMode = SC_FOLLOW_LINE;
     }
 
@@ -747,7 +749,7 @@ void ScTabView::SkipCursorHorizontal(SCCOL& rCurX, SCROW& rCurY, SCCOL nOldX, SC
 
         if (bSkipCell)
         {
-            if (rCurX <= 0 || rCurX >= MAXCOL)
+            if (rCurX <= 0 || rCurX >= pDoc->MaxCol())
             {
                 if (bHFlip)
                 {
@@ -807,7 +809,7 @@ void ScTabView::SkipCursorVertical(SCCOL& rCurX, SCROW& rCurY, SCROW nOldY, SCRO
 
         if (bSkipCell)
         {
-            if (rCurY <= 0 || rCurY >= MAXROW)
+            if (rCurY <= 0 || rCurY >= pDoc->MaxRow())
             {
                 if (bVFlip)
                 {
@@ -873,7 +875,7 @@ void ScTabView::ExpandBlock(SCCOL nMovX, SCROW nMovY, ScFollowMode eMode)
         }
 
         moveCursorByProtRule(nNewX, nNewY, nMovX, nMovY, nRefTab, pDoc);
-        checkBoundary(nNewX, nNewY);
+        checkBoundary(pDoc, nNewX, nNewY);
 
         if (nMovX)
         {
@@ -884,7 +886,7 @@ void ScTabView::ExpandBlock(SCCOL nMovX, SCROW nMovY, ScFollowMode eMode)
                     ++nTempX;
                 else
                     --nTempX;
-                if (!checkBoundary(nTempX, nNewY))
+                if (!checkBoundary(pDoc, nTempX, nNewY))
                     break;
             }
             if (isCellQualified(pDoc, nTempX, nNewY, nRefTab, bSelectLocked, bSelectUnlocked))
@@ -900,7 +902,7 @@ void ScTabView::ExpandBlock(SCCOL nMovX, SCROW nMovY, ScFollowMode eMode)
                     ++nTempY;
                 else
                     --nTempY;
-                if (!checkBoundary(nNewX, nTempY))
+                if (!checkBoundary(pDoc, nNewX, nTempY))
                     break;
             }
             if (isCellQualified(pDoc, nNewX, nTempY, nRefTab, bSelectLocked, bSelectUnlocked))
@@ -912,13 +914,13 @@ void ScTabView::ExpandBlock(SCCOL nMovX, SCROW nMovY, ScFollowMode eMode)
         SCCOL nTargetCol = nNewX;
         SCROW nTargetRow = nNewY;
         if (((aViewData.GetRefStartX() == 0) || (aViewData.GetRefStartY() == 0)) &&
-            ((nNewX != MAXCOL) || (nNewY != MAXROW)))
+            ((nNewX != pDoc->MaxCol()) || (nNewY != pDoc->MaxRow())))
         {
             // Row selection
-            if ((aViewData.GetRefStartX() == 0) && (nNewX == MAXCOL))
+            if ((aViewData.GetRefStartX() == 0) && (nNewX == pDoc->MaxCol()))
                 nTargetCol = aViewData.GetCurX();
             // Column selection
-            if ((aViewData.GetRefStartY() == 0) && (nNewY == MAXROW))
+            if ((aViewData.GetRefStartY() == 0) && (nNewY == pDoc->MaxRow()))
                 nTargetRow = aViewData.GetCurY();
         }
         AlignToCursor(nTargetCol, nTargetRow, eMode);
@@ -937,16 +939,16 @@ void ScTabView::ExpandBlock(SCCOL nMovX, SCROW nMovY, ScFollowMode eMode)
             InitBlockMode(nOrigX, nOrigY, nTab, true);
 
         moveCursorByProtRule(nBlockEndX, nBlockEndY, nMovX, nMovY, nTab, pDoc);
-        checkBoundary(nBlockEndX, nBlockEndY);
+        checkBoundary(pDoc, nBlockEndX, nBlockEndY);
         moveCursorByMergedCell(nBlockEndX, nBlockEndY, nMovX, nMovY, nTab, pDoc, aViewData);
-        checkBoundary(nBlockEndX, nBlockEndY);
+        checkBoundary(pDoc, nBlockEndX, nBlockEndY);
 
         MarkCursor(nBlockEndX, nBlockEndY, nTab, false, false, true);
 
         // Check if the entire row(s) or column(s) are selected.
         ScSplitPos eActive = aViewData.GetActivePart();
-        bool bRowSelected = (nBlockStartX == 0 && nBlockEndX == MAXCOL);
-        bool bColSelected = (nBlockStartY == 0 && nBlockEndY == MAXROW);
+        bool bRowSelected = (nBlockStartX == 0 && nBlockEndX == pDoc->MaxCol());
+        bool bColSelected = (nBlockStartY == 0 && nBlockEndY == pDoc->MaxRow());
         SCCOL nAlignX = bRowSelected ? aViewData.GetPosX(WhichH(eActive)) : nBlockEndX;
         SCROW nAlignY = bColSelected ? aViewData.GetPosY(WhichV(eActive)) : nBlockEndY;
         AlignToCursor(nAlignX, nAlignY, eMode);
@@ -1059,6 +1061,7 @@ void ScTabView::PaintBlock( bool bReset )
 
 void ScTabView::SelectAll( bool bContinue )
 {
+    ScDocument* pDoc = aViewData.GetDocument();
     ScMarkData& rMark = aViewData.GetMarkData();
     SCTAB nTab = aViewData.GetTabNo();
 
@@ -1066,13 +1069,13 @@ void ScTabView::SelectAll( bool bContinue )
     {
         ScRange aMarkRange;
         rMark.GetMarkArea( aMarkRange );
-        if ( aMarkRange == ScRange( 0,0,nTab, MAXCOL,MAXROW,nTab ) )
+        if ( aMarkRange == ScRange( 0,0,nTab, pDoc->MaxCol(),pDoc->MaxRow(),nTab ) )
             return;
     }
 
     DoneBlockMode( bContinue );
     InitBlockMode( 0,0,nTab );
-    MarkCursor( MAXCOL,MAXROW,nTab );
+    MarkCursor( pDoc->MaxCol(),pDoc->MaxRow(),nTab );
 
     SelectionChanged();
 }
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index b264ec0ef2aa..8c3fbf80d7ec 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -381,6 +381,7 @@ void ScTabView::SetCursor( SCCOL nPosX, SCROW nPosY, bool bNew )
         {
             if (nPosX > aViewData.GetMaxTiledCol() - 10 || nPosY > aViewData.GetMaxTiledRow() - 25)
             {
+                ScDocument* pDoc = aViewData.GetDocument();
                 ScDocShell* pDocSh = aViewData.GetDocShell();
                 ScModelObj* pModelObj = pDocSh ? comphelper::getUnoTunnelImplementation<ScModelObj>( pDocSh->GetModel() ) : nullptr;
                 Size aOldSize(0, 0);
@@ -388,7 +389,7 @@ void ScTabView::SetCursor( SCCOL nPosX, SCROW nPosY, bool bNew )
                     aOldSize = pModelObj->getDocumentSize();
 
                 if (nPosX > aViewData.GetMaxTiledCol() - 10)
-                    aViewData.SetMaxTiledCol(std::min<SCCOL>(std::max(nPosX, aViewData.GetMaxTiledCol()) + 10, MAXCOL));
+                    aViewData.SetMaxTiledCol(std::min<SCCOL>(std::max(nPosX, aViewData.GetMaxTiledCol()) + 10, pDoc->MaxCol()));
 
                 if (nPosY > aViewData.GetMaxTiledRow() - 25)
                     aViewData.SetMaxTiledRow(std::min<SCROW>(std::max(nPosY, aViewData.GetMaxTiledRow()) + 25,  MAXTILEDROW));
@@ -1080,23 +1081,22 @@ void ScTabView::AlignToCursor( SCCOL nCurX, SCROW nCurY, ScFollowMode eMode,
                 break;
         }
 
+        ScDocument* pDoc = aViewData.GetDocument();
         if (bDoLine)
         {
             while ( nCurX >= nNewDeltaX+nSizeX )
             {
                 nNewDeltaX = nCurX-nSizeX+1;
-                ScDocument* pDoc = aViewData.GetDocument();
                 SCTAB nTab = aViewData.GetTabNo();
-                while ( nNewDeltaX < MAXCOL && !pDoc->GetColWidth( nNewDeltaX, nTab ) )
+                while ( nNewDeltaX < pDoc->MaxCol() && !pDoc->GetColWidth( nNewDeltaX, nTab ) )
                     ++nNewDeltaX;
                 nSizeX = aViewData.CellsAtX( nNewDeltaX, 1, eAlignX );
             }
             while ( nCurY >= nNewDeltaY+nSizeY )
             {
                 nNewDeltaY = nCurY-nSizeY+1;
-                ScDocument* pDoc = aViewData.GetDocument();
                 SCTAB nTab = aViewData.GetTabNo();
-                while ( nNewDeltaY < MAXROW && !pDoc->GetRowHeight( nNewDeltaY, nTab ) )
+                while ( nNewDeltaY < pDoc->MaxRow() && !pDoc->GetRowHeight( nNewDeltaY, nTab ) )
                     ++nNewDeltaY;
                 nSizeY = aViewData.CellsAtY( nNewDeltaY, 1, eAlignY );
             }
@@ -1108,15 +1108,15 @@ void ScTabView::AlignToCursor( SCCOL nCurX, SCROW nCurY, ScFollowMode eMode,
 
         if ( nNewDeltaX != nDeltaX )
             nSizeX = aViewData.CellsAtX( nNewDeltaX, 1, eAlignX );
-        if (nNewDeltaX+nSizeX-1 > MAXCOL)
-            nNewDeltaX = MAXCOL-nSizeX+1;
+        if (nNewDeltaX+nSizeX-1 > pDoc->MaxCol())
+            nNewDeltaX = pDoc->MaxCol()-nSizeX+1;
         if (nNewDeltaX < 0)
             nNewDeltaX = 0;
 
         if ( nNewDeltaY != nDeltaY )
             nSizeY = aViewData.CellsAtY( nNewDeltaY, 1, eAlignY );
-        if (nNewDeltaY+nSizeY-1 > MAXROW)
-            nNewDeltaY = MAXROW-nSizeY+1;
+        if (nNewDeltaY+nSizeY-1 > pDoc->MaxRow())
+            nNewDeltaY = pDoc->MaxRow()-nSizeY+1;
         if (nNewDeltaY < 0)
             nNewDeltaY = 0;
 
@@ -1173,10 +1173,11 @@ void ScTabView::MoveCursorAbs( SCCOL nCurX, SCROW nCurY, ScFollowMode eMode,
     if( aViewData.GetViewShell()->GetForceFocusOnCurCell() )
         aViewData.GetViewShell()->SetForceFocusOnCurCell( !ValidColRow(nCurX, nCurY) );
 
+    ScDocument* pDoc = aViewData.GetDocument();
     if (nCurX < 0) nCurX = 0;
     if (nCurY < 0) nCurY = 0;
-    if (nCurX > MAXCOL) nCurX = MAXCOL;
-    if (nCurY > MAXROW) nCurY = MAXROW;
+    if (nCurX > pDoc->MaxCol()) nCurX = pDoc->MaxCol();
+    if (nCurY > pDoc->MaxRow()) nCurY = pDoc->MaxRow();
 
     // FIXME: this is to limit the number of rows handled in the Online
     // to 1000; this will be removed again when the performance
@@ -1566,9 +1567,10 @@ void ScTabView::MarkColumns()
     }
 
     SCTAB nTab = aViewData.GetTabNo();
+    ScDocument* pDoc = aViewData.GetDocument();
     DoneBlockMode();
     InitBlockMode( nStartCol,0, nTab );
-    MarkCursor( nEndCol,MAXROW, nTab );
+    MarkCursor( nEndCol, pDoc->MaxRow(), nTab );
     SelectionChanged();
 }
 
@@ -1593,15 +1595,17 @@ void ScTabView::MarkRows()
     }
 
     SCTAB nTab = aViewData.GetTabNo();
+    ScDocument* pDoc = aViewData.GetDocument();
     DoneBlockMode();
     InitBlockMode( 0,nStartRow, nTab );
-    MarkCursor( MAXCOL,nEndRow, nTab );
+    MarkCursor( pDoc->MaxCol(), nEndRow, nTab );
     SelectionChanged();
 }
 
 
 void ScTabView::MarkColumns(SCCOL nCol, sal_Int16 nModifier)
 {
+    ScDocument* pDoc = aViewData.GetDocument();
     SCCOL nStartCol = nCol;
     SCTAB nTab = aViewData.GetTabNo();
 
@@ -1610,7 +1614,7 @@ void ScTabView::MarkColumns(SCCOL nCol, sal_Int16 nModifier)
 
     DoneBlockMode( nModifier != 0 );
     InitBlockMode( nStartCol, 0, nTab, true, true);
-    MarkCursor( nCol, MAXROW, nTab );
+    MarkCursor( nCol, pDoc->MaxRow(), nTab );
     bMoveIsShift = false;
     SetCursor( nCol, 0 );
     SelectionChanged();
@@ -1618,6 +1622,7 @@ void ScTabView::MarkColumns(SCCOL nCol, sal_Int16 nModifier)
 
 void ScTabView::MarkRows(SCROW nRow, sal_Int16 nModifier)
 {
+    ScDocument* pDoc = aViewData.GetDocument();
     SCROW nStartRow = nRow;
     SCTAB nTab = aViewData.GetTabNo();
 
@@ -1626,7 +1631,7 @@ void ScTabView::MarkRows(SCROW nRow, sal_Int16 nModifier)
 
     DoneBlockMode( nModifier != 0 );
     InitBlockMode( 0, nStartRow, nTab, true, false, true );
-    MarkCursor( MAXCOL, nRow, nTab );
+    MarkCursor( pDoc->MaxCol(), nRow, nTab );
     bMoveIsShift = false;
     SetCursor( 0, nRow );
     SelectionChanged();
@@ -1665,6 +1670,7 @@ void ScTabView::MarkMatrixFormula()
 
 void ScTabView::MarkRange( const ScRange& rRange, bool bSetCursor, bool bContinue )
 {
+    ScDocument* pDoc = aViewData.GetDocument();
     SCTAB nTab = rRange.aStart.Tab();
     SetTabNo( nTab );
 
@@ -1674,8 +1680,8 @@ void ScTabView::MarkRange( const ScRange& rRange, bool bSetCursor, bool bContinu
     {
         SCCOL nAlignX = rRange.aStart.Col();
         SCROW nAlignY = rRange.aStart.Row();
-        bool bCol = ( rRange.aStart.Col() == 0 && rRange.aEnd.Col() == MAXCOL ) && !aViewData.GetDocument()->IsInVBAMode();
-        bool bRow = ( rRange.aStart.Row() == 0 && rRange.aEnd.Row() == MAXROW );
+        bool bCol = ( rRange.aStart.Col() == 0 && rRange.aEnd.Col() == pDoc->MaxCol() ) && !aViewData.GetDocument()->IsInVBAMode();
+        bool bRow = ( rRange.aStart.Row() == 0 && rRange.aEnd.Row() == pDoc->MaxRow() );
         if ( bCol )
             nAlignX = aViewData.GetPosX(WhichH(aViewData.GetActivePart()));
         if ( bRow )
@@ -1688,7 +1694,6 @@ void ScTabView::MarkRange( const ScRange& rRange, bool bSetCursor, bool bContinu
     {
         SCCOL nPosX = rRange.aStart.Col();
         SCROW nPosY = rRange.aStart.Row();
-        ScDocument* pDoc = aViewData.GetDocument();
         pDoc->SkipOverlapped(nPosX, nPosY, nTab);
 
         aViewData.ResetOldCursor();
@@ -2288,6 +2293,7 @@ void ScTabView::PaintArea( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCRO
     SCCOL nCol2;
     SCROW nRow2;
     bool bIsTiledRendering = comphelper::LibreOfficeKit::isActive();
+    ScDocument* pDoc = aViewData.GetDocument();
 
     PutInOrder( nStartCol, nEndCol );
     PutInOrder( nStartRow, nEndRow );
@@ -2377,7 +2383,7 @@ void ScTabView::PaintArea( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCRO
         aEnd.AdjustY( -1 );
 
         // #i85232# include area below cells (could be done in GetScrPos?)
-        if ( eMode == ScUpdateMode::All && nRow2 >= MAXROW && !bIsTiledRendering )
+        if ( eMode == ScUpdateMode::All && nRow2 >= pDoc->MaxRow() && !bIsTiledRendering )
             aEnd.setY( pGridWin[i]->GetOutputSizePixel().Height() );
 
         aStart.AdjustX( -nLayoutSign );      // include change marks
@@ -2433,7 +2439,7 @@ void ScTabView::PaintRangeFinderEntry (const ScRangeFindData* pData, const SCTAB
             --nCol1;
             bHiddenEdge = true;
         }
-        while ( nCol2 < MAXCOL && pDoc->ColHidden(nCol2, nTab) )
+        while ( nCol2 < pDoc->MaxCol() && pDoc->ColHidden(nCol2, nTab) )
         {
             ++nCol2;
             bHiddenEdge = true;
@@ -2446,9 +2452,9 @@ void ScTabView::PaintRangeFinderEntry (const ScRangeFindData* pData, const SCTAB
             nRow1 = nTmp;
             bHiddenEdge = true;
         }
-        nTmp = pDoc->FirstVisibleRow(nRow2, MAXROW, nTab);
+        nTmp = pDoc->FirstVisibleRow(nRow2, pDoc->MaxRow(), nTab);
         if (!ValidRow(nTmp))
-            nTmp = MAXROW;
+            nTmp = pDoc->MaxRow();
         if (nTmp > nRow2)
         {
             nRow2 = nTmp;
@@ -2620,7 +2626,8 @@ void ScTabView::PaintTopArea( SCCOL nStartCol, SCCOL nEndCol )
     if (nStartCol>0)
         --nStartCol;                //! general ?
 
-    bool bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() );
+    ScDocument* pDoc = aViewData.GetDocument();
+    bool bLayoutRTL = pDoc->IsLayoutRTL( aViewData.GetTabNo() );
     long nLayoutSign = bLayoutRTL ? -1 : 1;
 
     for (sal_uInt16 i = 0; i < 2; i++)
@@ -2631,7 +2638,7 @@ void ScTabView::PaintTopArea( SCCOL nStartCol, SCCOL nEndCol )
             Size aWinSize = pColBar[eWhich]->GetSizePixel();
             long nStartX = aViewData.GetScrPos( nStartCol, 0, eWhich ).X();
             long nEndX;
-            if (nEndCol >= MAXCOL)
+            if (nEndCol >= pDoc->MaxCol())
                 nEndX = bLayoutRTL ? 0 : ( aWinSize.Width()-1 );
             else
                 nEndX = aViewData.GetScrPos( nEndCol+1, 0, eWhich ).X() - nLayoutSign;
@@ -2675,6 +2682,7 @@ void ScTabView::PaintLeftArea( SCROW nStartRow, SCROW nEndRow )
     if (nStartRow>0)
         --nStartRow;
 
+    ScDocument* pDoc = aViewData.GetDocument();
     for (sal_uInt16 i = 0; i < 2; i++)
     {
         ScVSplitPos eWhich = ScVSplitPos(i);
@@ -2683,7 +2691,7 @@ void ScTabView::PaintLeftArea( SCROW nStartRow, SCROW nEndRow )
             Size aWinSize = pRowBar[eWhich]->GetSizePixel();
             long nStartY = aViewData.GetScrPos( 0, nStartRow, eWhich ).Y();
             long nEndY;
-            if (nEndRow >= MAXROW)
+            if (nEndRow >= pDoc->MaxRow())
                 nEndY = aWinSize.Height()-1;
             else
                 nEndY = aViewData.GetScrPos( 0, nEndRow+1, eWhich ).Y() - 1;
diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx
index 2a6fdf574997..419c6bce7845 100644
--- a/sc/source/ui/view/tabvwsh3.cxx
+++ b/sc/source/ui/view/tabvwsh3.cxx
@@ -368,7 +368,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
                 if ( !(nResult & ScRefFlags::VALID) && comphelper::string::isdigitAsciiString(aAddress) )
                 {
                     sal_Int32 nNumeric = aAddress.toInt32();
-                    if ( nNumeric > 0 && nNumeric <= MAXROW+1 )
+                    if ( nNumeric > 0 && nNumeric <= pDoc->MaxRow()+1 )
                     {
                         // one-based row numbers
 
commit 5dcee37fc47b898bc69c65dfaac3a3c20dba1913
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Fri Oct 18 15:45:43 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon Oct 21 19:32:13 2019 +0200

    loplugin:virtualdead unused param in IControlActionListener
    
    Change-Id: I2ce8df6a9a1ac2e6d6c5de08b32fb671bf10cd17
    Reviewed-on: https://gerrit.libreoffice.org/81244
    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 73874d79ef24..ef67c180b642 100644
--- a/compilerplugins/clang/virtualdead.unusedparams.results
+++ b/compilerplugins/clang/virtualdead.unusedparams.results
@@ -49,9 +49,6 @@ dbaccess/source/core/api/CacheSet.hxx:176
 dbaccess/source/core/inc/containerapprove.hxx:53
     void dbaccess::IContainerApprove::approveElement(const class rtl::OUString &,const class com::sun::star::uno::Reference<class com::sun::star::uno::XInterface> &,)
     10
-dbaccess/source/ui/inc/callbacks.hxx:53
-    _Bool dbaui::IControlActionListener::requestDrag(signed char,const class Point &,)
-    01
 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/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index b3e753800b73..f79c6d3e030f 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -2267,7 +2267,7 @@ bool OApplicationController::requestQuickHelp( const SvTreeListEntry* /*_pEntry*
     return false;
 }
 
-bool OApplicationController::requestDrag( sal_Int8 /*_nAction*/, const Point& /*_rPosPixel*/ )
+bool OApplicationController::requestDrag(  const Point& /*_rPosPixel*/ )
 {
     rtl::Reference<TransferableHelper> pTransfer;
     if ( getContainer() && getContainer()->getSelectionCount() )
diff --git a/dbaccess/source/ui/app/AppController.hxx b/dbaccess/source/ui/app/AppController.hxx
index a05b7367dc3b..2aacb412d9f8 100644
--- a/dbaccess/source/ui/app/AppController.hxx
+++ b/dbaccess/source/ui/app/AppController.hxx
@@ -484,7 +484,7 @@ namespace dbaui
 
         // IControlActionListener overridables
         virtual bool        requestQuickHelp( const SvTreeListEntry* _pEntry, OUString& _rText ) const override;
-        virtual bool        requestDrag( sal_Int8 _nAction, const Point& _rPosPixel ) override;
+        virtual bool        requestDrag( const Point& _rPosPixel ) override;
         virtual sal_Int8    queryDrop( const AcceptDropEvent& _rEvt, const DataFlavorExVector& _rFlavors ) override;
         virtual sal_Int8    executeDrop( const ExecuteDropEvent& _rEvt ) override;
 
diff --git a/dbaccess/source/ui/browser/dsbrowserDnD.cxx b/dbaccess/source/ui/browser/dsbrowserDnD.cxx
index ea22ebab8fe7..32228090bec6 100644
--- a/dbaccess/source/ui/browser/dsbrowserDnD.cxx
+++ b/dbaccess/source/ui/browser/dsbrowserDnD.cxx
@@ -173,7 +173,7 @@ namespace dbaui
         return DND_ACTION_NONE;
     }
 
-    bool SbaTableQueryBrowser::requestDrag( sal_Int8 /*_nAction*/, const Point& _rPosPixel )
+    bool SbaTableQueryBrowser::requestDrag( const Point& _rPosPixel )
     {
         // get the affected list entry
         // ensure that the entry which the user clicked at is selected
diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx b/dbaccess/source/ui/control/dbtreelistbox.cxx
index 0bc9e569dbb4..ea9283add4ac 100644
--- a/dbaccess/source/ui/control/dbtreelistbox.cxx
+++ b/dbaccess/source/ui/control/dbtreelistbox.cxx
@@ -268,12 +268,12 @@ sal_Int8 DBTreeListBox::ExecuteDrop( const ExecuteDropEvent& _rEvt )
     return DND_ACTION_NONE;
 }
 
-void DBTreeListBox::StartDrag( sal_Int8 _nAction, const Point& _rPosPixel )
+void DBTreeListBox::StartDrag( sal_Int8 /*_nAction*/, const Point& _rPosPixel )
 {
     if ( m_pActionListener )
     {
         m_pDragedEntry = GetEntry(_rPosPixel);
-        if ( m_pDragedEntry && m_pActionListener->requestDrag( _nAction, _rPosPixel ) )
+        if ( m_pDragedEntry && m_pActionListener->requestDrag( _rPosPixel ) )
         {
             // if the (asynchronous) drag started, stop the selection timer
             implStopSelectionTimer();
diff --git a/dbaccess/source/ui/inc/callbacks.hxx b/dbaccess/source/ui/inc/callbacks.hxx
index bd4498dc5175..f80f5aee7d2f 100644
--- a/dbaccess/source/ui/inc/callbacks.hxx
+++ b/dbaccess/source/ui/inc/callbacks.hxx
@@ -50,7 +50,7 @@ namespace dbaui
         /** handler for StartDrag requests
             @return <TRUE/> if a drag operation was started
         */
-        virtual bool    requestDrag( sal_Int8 _nAction, const Point& _rPosPixel ) = 0;
+        virtual bool    requestDrag( const Point& _rPosPixel ) = 0;
 
         /** check whether or not a drop request should be accepted
         */
diff --git a/dbaccess/source/ui/inc/unodatbr.hxx b/dbaccess/source/ui/inc/unodatbr.hxx
index 3c806697dc85..48f1b5217577 100644
--- a/dbaccess/source/ui/inc/unodatbr.hxx
+++ b/dbaccess/source/ui/inc/unodatbr.hxx
@@ -226,7 +226,7 @@ namespace dbaui
 
         // IControlActionListener overridables
         virtual bool        requestQuickHelp( const SvTreeListEntry* _pEntry, OUString& _rText ) const override;
-        virtual bool        requestDrag( sal_Int8 _nAction, const Point& _rPosPixel ) override;
+        virtual bool        requestDrag( const Point& _rPosPixel ) override;
         virtual sal_Int8    queryDrop( const AcceptDropEvent& _rEvt, const DataFlavorExVector& _rFlavors ) override;
         virtual sal_Int8    executeDrop( const ExecuteDropEvent& _rEvt ) override;
 


More information about the Libreoffice-commits mailing list