diff options
Diffstat (limited to 'sc/source/ui/view')
-rw-r--r-- | sc/source/ui/view/tabview.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/viewdata.cxx | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx index adc713bfbbd0..2fde14330441 100644 --- a/sc/source/ui/view/tabview.cxx +++ b/sc/source/ui/view/tabview.cxx @@ -2436,7 +2436,7 @@ void BoundsProvider<IndexType>::Compute( SAL_INFO("sc.lok.header", "BoundsProvider: rBottomNearest: index: " << aSecondNearest.first << ", pos: " << aSecondNearest.second << ", diff: " << nSecondDiff); - bool bReverse = !(std::abs(nFirstDiff) < std::abs(nSecondDiff)); + bool bReverse = (std::abs(nFirstDiff) >= std::abs(nSecondDiff)); if(bReverse) { diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx index 78611447b1d2..7bd2074b7342 100644 --- a/sc/source/ui/view/viewdata.cxx +++ b/sc/source/ui/view/viewdata.cxx @@ -1120,7 +1120,7 @@ void ScViewData::ResetOldCursor() SCCOL ScViewData::GetCurXForTab( SCTAB nTabIndex ) const { - if (!ValidTab(nTabIndex) || !(nTabIndex < static_cast<SCTAB>(maTabData.size()))) + if (!ValidTab(nTabIndex) || (nTabIndex >= static_cast<SCTAB>(maTabData.size()))) return -1; return maTabData[nTabIndex]->nCurX; @@ -1128,7 +1128,7 @@ SCCOL ScViewData::GetCurXForTab( SCTAB nTabIndex ) const SCROW ScViewData::GetCurYForTab( SCTAB nTabIndex ) const { - if (!ValidTab(nTabIndex) || !(nTabIndex < static_cast<SCTAB>(maTabData.size()))) + if (!ValidTab(nTabIndex) || (nTabIndex >= static_cast<SCTAB>(maTabData.size()))) return -1; return maTabData[nTabIndex]->nCurY; @@ -1136,7 +1136,7 @@ SCROW ScViewData::GetCurYForTab( SCTAB nTabIndex ) const void ScViewData::SetCurXForTab( SCCOL nNewCurX, SCTAB nTabIndex ) { - if (!ValidTab(nTabIndex) || !(nTabIndex < static_cast<SCTAB>(maTabData.size()))) + if (!ValidTab(nTabIndex) || (nTabIndex >= static_cast<SCTAB>(maTabData.size()))) return; maTabData[nTabIndex]->nCurX = nNewCurX; @@ -1144,7 +1144,7 @@ void ScViewData::SetCurXForTab( SCCOL nNewCurX, SCTAB nTabIndex ) void ScViewData::SetCurYForTab( SCCOL nNewCurY, SCTAB nTabIndex ) { - if (!ValidTab(nTabIndex) || !(nTabIndex < static_cast<SCTAB>(maTabData.size()))) + if (!ValidTab(nTabIndex) || (nTabIndex >= static_cast<SCTAB>(maTabData.size()))) return; maTabData[nTabIndex]->nCurY = nNewCurY; @@ -1853,7 +1853,7 @@ void ScViewData::SetTabNo( SCTAB nNewTab ) ScPositionHelper* ScViewData::GetLOKWidthHelper(SCTAB nTabIndex) { - if (!ValidTab(nTabIndex) || !(nTabIndex < static_cast<SCTAB>(maTabData.size()))) + if (!ValidTab(nTabIndex) || (nTabIndex >= static_cast<SCTAB>(maTabData.size()))) { return nullptr; } @@ -1862,7 +1862,7 @@ ScPositionHelper* ScViewData::GetLOKWidthHelper(SCTAB nTabIndex) ScPositionHelper* ScViewData::GetLOKHeightHelper(SCTAB nTabIndex) { - if (!ValidTab(nTabIndex) || !(nTabIndex < static_cast<SCTAB>(maTabData.size()))) + if (!ValidTab(nTabIndex) || (nTabIndex >= static_cast<SCTAB>(maTabData.size()))) { return nullptr; } |