diff options
Diffstat (limited to 'sc/source/core')
-rw-r--r-- | sc/source/core/data/table1.cxx | 14 | ||||
-rw-r--r-- | sc/source/core/tool/interpr5.cxx | 8 |
2 files changed, 14 insertions, 8 deletions
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx index 554a22773dd6..3130ee05ba8d 100644 --- a/sc/source/core/data/table1.cxx +++ b/sc/source/core/data/table1.cxx @@ -1402,7 +1402,12 @@ void ScTable::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY ) void ScTable::UpdateInsertTab(SCTAB nTable) { - if (nTab >= nTable) nTab++; + if (nTab >= nTable) + { + nTab++; + if (pDBDataNoName) + pDBDataNoName->UpdateMoveTab(nTab - 1 ,nTab); + } for (SCCOL i=0; i <= MAXCOL; i++) aCol[i].UpdateInsertTab(nTable); if (IsStreamValid()) @@ -1411,7 +1416,12 @@ void ScTable::UpdateInsertTab(SCTAB nTable) void ScTable::UpdateDeleteTab( SCTAB nTable, sal_Bool bIsMove, ScTable* pRefUndo ) { - if (nTab > nTable) nTab--; + if (nTab > nTable) + { + nTab--; + if (pDBDataNoName) + pDBDataNoName->UpdateMoveTab(nTab + 1,nTab); + } SCCOL i; if (pRefUndo) diff --git a/sc/source/core/tool/interpr5.cxx b/sc/source/core/tool/interpr5.cxx index 3d764e44319b..33b265209d58 100644 --- a/sc/source/core/tool/interpr5.cxx +++ b/sc/source/core/tool/interpr5.cxx @@ -1978,14 +1978,10 @@ double lcl_TGetColumnSumProduct(ScMatrixRef pMatA, SCSIZE nRa, return fResult; } +// no mathematical signum, but used to switch between adding and subtracting double lcl_GetSign(double fValue) { - if (fValue < 0.0) - return -1.0; - else if (fValue > 0.0) - return 1.0; - else - return 0.0; + return (fValue >= 0.0 ? 1.0 : -1.0 ); } /* Calculates a QR decomposition with Householder reflection. |