diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-11-28 14:11:10 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-11-28 19:02:06 +0100 |
commit | c71d886120998884fdd16a862826f59883d9a114 (patch) | |
tree | 6967a263d1af03b6765d68fc9a72ff8b54a0afc0 /sc/source/ui | |
parent | 523189a32e8d867b71d23f8aa88708ae2757f727 (diff) |
fix a few places using SCROW/SCCOL datatypes incorrectly
Found while looking for problems in another patch.
This will become more important with "jumbo sheets" when using the wrong
datatype can mean overflow
Change-Id: I7370ffd8a6edc33a5e613242735e4c7b9eaf830d
Reviewed-on: https://gerrit.libreoffice.org/83991
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui')
-rw-r--r-- | sc/source/ui/docshell/dbdocfun.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/datatableview.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/viewfun2.cxx | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx index b4dff2ee24b8..71507af7bce2 100644 --- a/sc/source/ui/docshell/dbdocfun.cxx +++ b/sc/source/ui/docshell/dbdocfun.cxx @@ -505,7 +505,7 @@ bool ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam, // tdf#119804: If there is a header row/column, it won't be affected by // sorting; so we can exclude it from the test. SCROW nStartingRowToEdit = aLocalParam.nRow1; - SCROW nStartingColToEdit = aLocalParam.nCol1; + SCCOL nStartingColToEdit = aLocalParam.nCol1; if ( aLocalParam.bHasHeader ) { if ( aLocalParam.bByRow ) diff --git a/sc/source/ui/miscdlgs/datatableview.cxx b/sc/source/ui/miscdlgs/datatableview.cxx index 16463598e1fe..2541688a6677 100644 --- a/sc/source/ui/miscdlgs/datatableview.cxx +++ b/sc/source/ui/miscdlgs/datatableview.cxx @@ -277,7 +277,7 @@ void ScDataTableView::Paint(vcl::RenderContext& rRenderContext, const tools::Rec { Size aSize = GetSizePixel(); SCCOL nMaxVisibleCol = findColFromPos(aSize.Width() - nScrollBarSize, mpDoc.get(), mnFirstVisibleCol); - SCCOL nMaxVisibleRow = findRowFromPos(aSize.Height(), mpDoc.get(), mnFirstVisibleRow); + SCROW nMaxVisibleRow = findRowFromPos(aSize.Height(), mpDoc.get(), mnFirstVisibleRow); ScTableInfo aTableInfo; mpDoc->FillInfo(aTableInfo, mnFirstVisibleCol, mnFirstVisibleRow, nMaxVisibleCol, nMaxVisibleRow, 0, 0.06666, 0.06666, false, false); diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index 5c5302a99517..0b3166bedef4 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -328,7 +328,7 @@ static bool lcl_FindNextSumEntryInColumn( ScDocument* pDoc, SCCOL nCol, SCROW& n } static bool lcl_FindNextSumEntryInRow( ScDocument* pDoc, SCCOL& nCol, SCROW nRow, - SCTAB nTab, SCCOLROW& nExtend, SCROW nMinCol ) + SCTAB nTab, SCCOLROW& nExtend, SCCOL nMinCol ) { const SCCOL nTmp = nCol; ScAutoSum eSkip = ScAutoSumNone; @@ -1512,7 +1512,7 @@ void ScViewFunc::CopyAutoSpellData( FillDir eDir, SCCOL nStartCol, SCROW nStartR std::vector<std::vector<MisspellRangesType>> aSourceSpellRanges(nRowRepeatSize, std::vector<MisspellRangesType>(nColRepeatSize)); for ( SCROW nRowIdx = 0; nRowIdx < nRowRepeatSize; ++nRowIdx ) - for ( SCROW nColIdx = 0; nColIdx < nColRepeatSize; ++nColIdx ) + for ( SCCOL nColIdx = 0; nColIdx < nColRepeatSize; ++nColIdx ) aSourceSpellRanges[nRowIdx][nColIdx] = pWin->GetAutoSpellData( nStartCol + nColIdx, nStartRow + nRowIdx ); switch( eDir ) |