diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-03-28 16:09:02 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-03-28 17:03:56 -0400 |
commit | ae227f90adea1244f3e8509d095918a86b9a0926 (patch) | |
tree | 6e8974472760e41b53172194a0f88bad065e9136 /sc/source | |
parent | 0106deffedee8345a0fafcae0a86b6f52fad8c45 (diff) |
Remove GetErrorCode() from ScBaseCell; only relevant for ScFormulaCell.
Change-Id: I5c41fc88bf138411ded334f823ab6187401c96df
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/core/data/cell.cxx | 12 | ||||
-rw-r--r-- | sc/source/core/data/column.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/table3.cxx | 9 | ||||
-rw-r--r-- | sc/source/core/tool/interpr4.cxx | 2 |
4 files changed, 7 insertions, 18 deletions
diff --git a/sc/source/core/data/cell.cxx b/sc/source/core/data/cell.cxx index aa6e2a215ba1..3862e8864a5e 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 5b18f3cd4f60..0aa3b175f47e 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 13bbec7d2291..0a1e4b087e4f 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 6247e51575e3..e24fc6644d3c 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. |