sc/inc/cell.hxx | 2 -- sc/source/core/data/cell.cxx | 12 ------------ sc/source/core/data/column.cxx | 2 +- sc/source/core/data/table3.cxx | 9 +++++---- sc/source/core/tool/interpr4.cxx | 2 +- 5 files changed, 7 insertions(+), 20 deletions(-)
New commits: commit f4bb958afc095a2618da6a1653c82d465cb98896 Author: Kohei Yoshida <kohei.yosh...@gmail.com> Date: Thu Mar 28 16:09:02 2013 -0400 Remove GetErrorCode() from ScBaseCell; only relevant for ScFormulaCell. Change-Id: I5c41fc88bf138411ded334f823ab6187401c96df diff --git a/sc/inc/cell.hxx b/sc/inc/cell.hxx index 60a70f5..a42b0722 100644 --- a/sc/inc/cell.hxx +++ b/sc/inc/cell.hxx @@ -80,8 +80,6 @@ public: /** Deletes the own cell broadcaster. */ void DeleteBroadcaster(); - /** Error code if ScFormulaCell, else 0. */ - sal_uInt16 GetErrorCode() const; /** ScFormulaCell with formula::svEmptyCell result, or ScNoteCell (may have been created due to reference to empty cell). */ bool HasEmptyData() const; diff --git a/sc/source/core/data/cell.cxx b/sc/source/core/data/cell.cxx index aa6e2a2..3862e88 100644 --- a/sc/source/core/data/cell.cxx +++ b/sc/source/core/data/cell.cxx @@ -141,18 +141,6 @@ void ScBaseCell::DeleteBroadcaster() DELETEZ( mpBroadcaster ); } -sal_uInt16 ScBaseCell::GetErrorCode() const -{ - switch ( eCellType ) - { - case CELLTYPE_FORMULA : - return ((ScFormulaCell*)this)->GetErrCode(); - default: - return 0; - } -} - - bool ScBaseCell::HasEmptyData() const { switch ( eCellType ) diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx index 5b18f3c..0aa3b17 100644 --- a/sc/source/core/data/column.cxx +++ b/sc/source/core/data/column.cxx @@ -1391,7 +1391,7 @@ void ScColumn::CopyStaticToDocument(SCROW nRow1, SCROW nRow2, ScColumn& rDestCol if (rCell.GetDirty() && pDocument->GetAutoCalc()) rCell.Interpret(); - if (rCell.GetErrorCode()) + if (rCell.GetErrCode()) // Skip cells with error. break; diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx index 13bbec7..0a1e4b0 100644 --- a/sc/source/core/data/table3.cxx +++ b/sc/source/core/data/table3.cxx @@ -1229,14 +1229,15 @@ public: } bool isQueryByValue( - const ScQueryEntry::Item& rItem, SCCOL nCol, SCROW nRow, const ScBaseCell* pCell) + const ScQueryEntry::Item& rItem, SCCOL nCol, SCROW nRow, ScBaseCell* pCell) { if (rItem.meType == ScQueryEntry::ByString) return false; if (pCell) { - if (pCell->GetErrorCode()) + if (pCell->GetCellType() == CELLTYPE_FORMULA && + static_cast<ScFormulaCell*>(pCell)->GetErrCode()) // Error values are compared as string. return false; @@ -1361,10 +1362,10 @@ public: if ( pCell ) { - if (pCell->GetCellType() == CELLTYPE_FORMULA && pCell->GetErrorCode()) + if (pCell->GetCellType() == CELLTYPE_FORMULA && static_cast<ScFormulaCell*>(pCell)->GetErrCode()) { // Error cell is evaluated as string (for now). - aCellStr = ScGlobal::GetErrorString(pCell->GetErrorCode()); + aCellStr = ScGlobal::GetErrorString(static_cast<ScFormulaCell*>(pCell)->GetErrCode()); } else if (pCell->GetCellType() != CELLTYPE_NOTE) { diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx index 6247e51..e24fc66 100644 --- a/sc/source/core/tool/interpr4.cxx +++ b/sc/source/core/tool/interpr4.cxx @@ -192,7 +192,7 @@ double ScInterpreter::GetValueCellValue( const ScAddress& rPos, double fOrig ) sal_uInt16 ScInterpreter::GetCellErrCode( const ScRefCellValue& rCell ) { - return rCell.meType == CELLTYPE_FORMULA ? rCell.mpFormula->GetErrorCode() : 0; + return rCell.meType == CELLTYPE_FORMULA ? rCell.mpFormula->GetErrCode() : 0; } /** Convert string content to numeric value. _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits