diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-03-20 00:01:54 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-03-22 21:49:15 -0400 |
commit | 85ab53551239246b2ee5a784e927304bc2397942 (patch) | |
tree | 086fc7b79bded8d45afd77106e0a8bf3b44df60c /sc/source/ui/unoobj | |
parent | 25f53499989b873ea3bcc0ccd5a47aa07b4aa0a6 (diff) |
Reduce use of ScValueCell outside ScDocument.
Change-Id: Ia1a39016e1389e551169ae8dda179cb38d30a42a
Diffstat (limited to 'sc/source/ui/unoobj')
-rw-r--r-- | sc/source/ui/unoobj/chart2uno.cxx | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx index 9282a2737371..fcb71213568b 100644 --- a/sc/source/ui/unoobj/chart2uno.cxx +++ b/sc/source/ui/unoobj/chart2uno.cxx @@ -2597,24 +2597,17 @@ void ScChart2DataSequence::BuildDataCache() ++nDataCount; ScAddress aAdr(nCol, nRow, nTab); - ScBaseCell* pCell = m_pDocument->GetCell(aAdr); - if (!pCell) - continue; - - if (pCell->HasStringData()) - rItem.maString = pCell->GetStringData(); - else - rItem.maString = m_pDocument->GetString(nCol, nRow, nTab); + rItem.maString = m_pDocument->GetString(aAdr); - switch (pCell->GetCellType()) + switch (m_pDocument->GetCellType(aAdr)) { case CELLTYPE_VALUE: - rItem.mfValue = static_cast< ScValueCell*>(pCell)->GetValue(); + rItem.mfValue = m_pDocument->GetValue(aAdr); rItem.mbIsValue = true; break; case CELLTYPE_FORMULA: { - ScFormulaCell* pFCell = static_cast<ScFormulaCell*>(pCell); + ScFormulaCell* pFCell = static_cast<ScFormulaCell*>(m_pDocument->GetCell(aAdr)); sal_uInt16 nErr = pFCell->GetErrCode(); if (nErr) break; |