From 85ab53551239246b2ee5a784e927304bc2397942 Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Wed, 20 Mar 2013 00:01:54 -0400 Subject: Reduce use of ScValueCell outside ScDocument. Change-Id: Ia1a39016e1389e551169ae8dda179cb38d30a42a --- sc/source/ui/unoobj/chart2uno.cxx | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'sc/source/ui/unoobj') 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(pCell); + ScFormulaCell* pFCell = static_cast(m_pDocument->GetCell(aAdr)); sal_uInt16 nErr = pFCell->GetErrCode(); if (nErr) break; -- cgit