summaryrefslogtreecommitdiff
path: root/sc/source/core/data/table3.cxx
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-03-28 16:09:02 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-03-28 17:03:56 -0400
commitae227f90adea1244f3e8509d095918a86b9a0926 (patch)
tree6e8974472760e41b53172194a0f88bad065e9136 /sc/source/core/data/table3.cxx
parent0106deffedee8345a0fafcae0a86b6f52fad8c45 (diff)
Remove GetErrorCode() from ScBaseCell; only relevant for ScFormulaCell.
Change-Id: I5c41fc88bf138411ded334f823ab6187401c96df
Diffstat (limited to 'sc/source/core/data/table3.cxx')
-rw-r--r--sc/source/core/data/table3.cxx9
1 files changed, 5 insertions, 4 deletions
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)
{