summaryrefslogtreecommitdiff
path: root/sc/source/ui/unoobj
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-03-27 17:38:51 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-03-28 01:12:49 -0400
commitcb7f105b3cb06da74ee2c31833ab3639a797e14a (patch)
treee2792b4c24810be5ff498d39635a1b6e48a15dc5 /sc/source/ui/unoobj
parentf59dcdb19ba275c0c712fd88ed0a9fd84b908704 (diff)
Remove a bit more use of ScEditCell and ScBaseCell.
Change-Id: Ib01eaef7e3a612048d2ed3f714ed178f4076e689
Diffstat (limited to 'sc/source/ui/unoobj')
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx24
1 files changed, 10 insertions, 14 deletions
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index df8d3cebbcf5..e74f2495937a 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -1394,18 +1394,18 @@ static OUString lcl_GetInputString( ScDocument* pDoc, const ScAddress& rPos, sal
if (!pDoc)
return EMPTY_OUSTRING;
-
- ScBaseCell* pCell = pDoc->GetCell(rPos);
- if (!pCell || pCell->GetCellType() == CELLTYPE_NOTE)
+ ScRefCellValue aCell;
+ aCell.assign(*pDoc, rPos);
+ if (aCell.isEmpty())
return EMPTY_OUSTRING;
OUString aVal;
- CellType eType = pCell->GetCellType();
+ CellType eType = aCell.meType;
if (eType == CELLTYPE_FORMULA)
{
- ScFormulaCell* pForm = (ScFormulaCell*)pCell;
- pForm->GetFormula( aVal,formula::FormulaGrammar::mapAPItoGrammar( bEnglish, false));
+ ScFormulaCell* pForm = aCell.mpFormula;
+ pForm->GetFormula( aVal, formula::FormulaGrammar::mapAPItoGrammar( bEnglish, false));
return aVal;
}
@@ -1416,24 +1416,20 @@ static OUString lcl_GetInputString( ScDocument* pDoc, const ScAddress& rPos, sal
// we don't have to query.
sal_uInt32 nNumFmt = bEnglish ? 0 : pDoc->GetNumberFormat(rPos);
- if ( eType == CELLTYPE_EDIT )
+ if (eType == CELLTYPE_EDIT)
{
// GetString an der EditCell macht Leerzeichen aus Umbruechen,
// hier werden die Umbrueche aber gebraucht
- const EditTextObject* pData = ((ScEditCell*)pCell)->GetData();
+ const EditTextObject* pData = aCell.mpEditText;
if (pData)
{
EditEngine& rEngine = pDoc->GetEditEngine();
- rEngine.SetText( *pData );
- aVal = rEngine.GetText( LINEEND_LF );
+ rEngine.SetText(*pData);
+ aVal = rEngine.GetText(LINEEND_LF);
}
}
else
- {
- ScRefCellValue aCell;
- aCell.assign(*pCell);
ScCellFormat::GetInputString(aCell, nNumFmt, aVal, *pFormatter);
- }
// ggf. ein ' davorhaengen wie in ScTabViewShell::UpdateInputHandler
if ( eType == CELLTYPE_STRING || eType == CELLTYPE_EDIT )