summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2022-10-11 14:18:16 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2022-10-11 19:36:45 +0200
commita6ec933d0fe2150a6b83cd54a0de30b252c9a600 (patch)
tree192d4843237dd36f78e50a41c6e038471a87c9b1 /sc
parent8e39704b597fda9e3ef442252defed16a0a07b03 (diff)
tdf#91305 related: Drop redundant only-one-column/row check
This check was introduced in commit 4cd9e45a439b654c8e1ff7983fe7e4bd073b9c92 Author Yan Pashkovsky <yanp.bugz@gmail.com> Date Fri Aug 12 23:39:30 2016 +0300 tdf#91305 fix sort calc Then commit 63592999a067d76c896ed79204330e1a4b934c80 Author Eike Rathke <erack@redhat.com> Date Thu Aug 18 17:16:50 2016 +0200 refine HasColHeader()/HasRowHeader() conditions, tdf#91305 related made the "not only one column/row" case check the same. Change-Id: I25ce867e1c64d7b89a617021de9a5e4f1c89d2a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141219 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/table3.cxx16
1 files changed, 0 insertions, 16 deletions
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index 5a128152ad46..bdf16a69aad4 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -2905,14 +2905,6 @@ bool ScTable::HasColHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCR
* evaluate it has header row, but that doesn't make much sense. */
return false;
- if (nStartCol == nEndCol)
- {
- CellType eFirstCellType = GetCellType(nStartCol, nStartRow);
- CellType eSecondCellType = GetCellType(nStartCol, nStartRow+1);
- return ((eFirstCellType == CELLTYPE_STRING || eFirstCellType == CELLTYPE_EDIT) &&
- (eSecondCellType != CELLTYPE_STRING && eSecondCellType != CELLTYPE_EDIT));
- }
-
for (SCCOL nCol=nStartCol; nCol<=nEndCol; nCol++)
{
CellType eType = GetCellType( nCol, nStartRow );
@@ -2942,14 +2934,6 @@ bool ScTable::HasRowHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCR
* evaluate it has header column, but that doesn't make much sense. */
return false;
- if (nStartRow == nEndRow)
- {
- CellType eFirstCellType = GetCellType(nStartCol, nStartRow);
- CellType eSecondCellType = GetCellType(nStartCol+1, nStartRow);
- return ((eFirstCellType == CELLTYPE_STRING || eFirstCellType == CELLTYPE_EDIT) &&
- (eSecondCellType != CELLTYPE_STRING && eSecondCellType != CELLTYPE_EDIT));
- }
-
for (SCROW nRow=nStartRow; nRow<=nEndRow; nRow++)
{
CellType eType = GetCellType( nStartCol, nRow );