diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2021-09-13 11:36:08 +0200 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2021-09-13 16:28:04 +0200 |
commit | a74aeceda27879d2f441d21338e2a24a9a9957ee (patch) | |
tree | 4f01785bb8bfb111b198725d960c71455b91b095 /sc | |
parent | 366b5878015b8cd75ceb7f2db00d286dafa365bd (diff) |
Drop unnecessary extra indentation
There's no reason to introduce extra blocks here.
Change-Id: Ie3e72e8535617865646bb8161890aebfbc0db4d6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122027
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx index c8b52475e47e..d5ec795c64d0 100644 --- a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx +++ b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx @@ -99,26 +99,22 @@ ScMyAddress ScAccessibleSpreadsheet::CalcScAddressFromRangeList(ScRangeList *pMa for(sal_Int32 row = nMinRow ; row <= nMaxRow ; ++row) { m_vecTempCol.clear(); + for (ScRange const & r : m_vecTempRange) { - for (ScRange const & r : m_vecTempRange) + if ( row >= r.aStart.Row() && row <= r.aEnd.Row()) { - if ( row >= r.aStart.Row() && row <= r.aEnd.Row()) - { - m_vecTempCol.emplace_back(r.aStart.Col(),r.aEnd.Col()); - } + m_vecTempCol.emplace_back(r.aStart.Col(),r.aEnd.Col()); } } std::sort(m_vecTempCol.begin(),m_vecTempCol.end(),CompMinCol); + for (const PAIR_COL &pairCol : m_vecTempCol) { - for(const PAIR_COL &pairCol : m_vecTempCol) + sal_uInt16 nCol = pairCol.second - pairCol.first + 1; + if (nCol + nCurrentIndex > nSelectedChildIndex) { - sal_uInt16 nCol = pairCol.second - pairCol.first + 1; - if (nCol + nCurrentIndex > nSelectedChildIndex) - { - return ScMyAddress(static_cast<SCCOL>(pairCol.first + nSelectedChildIndex - nCurrentIndex), row, maActiveCell.Tab()); - } - nCurrentIndex += nCol; + return ScMyAddress(static_cast<SCCOL>(pairCol.first + nSelectedChildIndex - nCurrentIndex), row, maActiveCell.Tab()); } + nCurrentIndex += nCol; } } } |