sc/source/core/data/table3.cxx |   16 ----------------
 1 file changed, 16 deletions(-)

New commits:
commit a6ec933d0fe2150a6b83cd54a0de30b252c9a600
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Tue Oct 11 14:18:16 2022 +0300
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Tue Oct 11 19:36:45 2022 +0200

    tdf#91305 related: Drop redundant only-one-column/row check
    
    This check was introduced in commit 4cd9e45a439b654c8e1ff7983fe7e4bd073b9c92
      Author Yan Pashkovsky <yanp.b...@gmail.com>
      Date   Fri Aug 12 23:39:30 2016 +0300
        tdf#91305 fix sort calc
    
    Then commit 63592999a067d76c896ed79204330e1a4b934c80
      Author Eike Rathke <er...@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.kagan...@collabora.com>
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

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 );

Reply via email to