summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-07-20 18:37:18 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-07-21 08:30:47 +0200
commit751f4d4428339b508abb5ee3c1804e63f0cfd593 (patch)
tree144a929607a00d7e64f78530797585d6be2b3a5f /sc
parentbb7b0511bbb6d2237b7b765c31727324b4183a85 (diff)
loplugin:constantparam
Change-Id: Id5144e95ac0120b3125258cdde46e4f7f6e1690b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99109 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/unoobj/docuno.cxx4
-rw-r--r--sc/source/ui/view/tabview.cxx17
2 files changed, 8 insertions, 13 deletions
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 50749096ec9c..9c2294e09849 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -503,9 +503,9 @@ void ScModelObj::RepaintRange( const ScRangeList& rRange )
static ScViewData* lcl_getViewMatchingDocZoomTab(const Fraction& rZoomX,
const Fraction& rZoomY,
const SCTAB nTab,
- const ViewShellDocId& rDocId,
- const size_t nMaxIter = 5)
+ const ViewShellDocId& rDocId)
{
+ constexpr size_t nMaxIter = 5;
size_t nIter = 0;
for (SfxViewShell* pViewShell = SfxViewShell::GetFirst();
pViewShell && nIter < nMaxIter;
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index f7557ec08c70..8ac7f7bb8e36 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -2437,11 +2437,8 @@ class ScRangeProvider
{
public:
ScRangeProvider(const tools::Rectangle& rArea, bool bInPixels,
- ScViewData& rViewData, SCCOLROW nEnlargeX = 0,
- SCCOLROW nEnlargeY = 0):
- mrViewData(rViewData),
- mnEnlargeX(nEnlargeX),
- mnEnlargeY(nEnlargeY)
+ ScViewData& rViewData):
+ mrViewData(rViewData)
{
tools::Rectangle aAreaPx = bInPixels ? rArea :
tools::Rectangle(rArea.Left() * mrViewData.GetPPTX(),
@@ -2529,8 +2526,8 @@ private:
ScRange maRange;
tools::Rectangle maBoundPositions;
ScViewData& mrViewData;
- SCCOLROW mnEnlargeX;
- SCCOLROW mnEnlargeY;
+ static const SCCOLROW mnEnlargeX = 2;
+ static const SCCOLROW mnEnlargeY = 2;
};
void lcl_ExtendTiledDimension(bool bColumn, const SCCOLROW nEnd, const SCCOLROW nExtra,
@@ -2621,8 +2618,7 @@ void ScTabView::getRowColumnHeaders(const tools::Rectangle& rRectangle, tools::J
mnLOKStartHeaderCol + 1, mnLOKStartHeaderRow + 1,
mnLOKEndHeaderCol, mnLOKEndHeaderRow);
- ScRangeProvider aRangeProvider(rRectangle, /* bInPixels */ false, aViewData,
- /* nEnlargeX */ 2, /* nEnlargeY */ 2);
+ ScRangeProvider aRangeProvider(rRectangle, /* bInPixels */ false, aViewData);
const ScRange& rCellRange = aRangeProvider.getCellRange();
/// *** start collecting ROWS ***
@@ -2923,8 +2919,7 @@ void ScTabView::extendTiledAreaIfNeeded()
tools::Rectangle aOldVisCellRange(mnLOKStartHeaderCol + 1, mnLOKStartHeaderRow + 1,
mnLOKEndHeaderCol, mnLOKEndHeaderRow);
- ScRangeProvider aRangeProvider(rVisArea, /* bInPixels */ false, aViewData,
- /* nEnlargeX */ 2, /* nEnlargeY */ 2);
+ ScRangeProvider aRangeProvider(rVisArea, /* bInPixels */ false, aViewData);
// Index bounds.
const ScRange& rCellRange = aRangeProvider.getCellRange();
const SCCOL nStartCol = rCellRange.aStart.Col();