diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-03-27 15:13:26 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-03-28 01:12:48 -0400 |
commit | db5a7148ec8a52248c33b0fe9e44434b548a22fa (patch) | |
tree | ad2489140cdf2ac04ab9ef12763ffa9b15756e34 /sc/source/ui/unoobj | |
parent | 6f0aa08753407ab1bfd62f9c733bbf54fb365c0d (diff) |
Started killing direct use of ScEditCell.
Change-Id: Id4afe6b748b5317db93e0a36257311e5bcff3820
Diffstat (limited to 'sc/source/ui/unoobj')
-rw-r--r-- | sc/source/ui/unoobj/textuno.cxx | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/sc/source/ui/unoobj/textuno.cxx b/sc/source/ui/unoobj/textuno.cxx index fbd48a555a65..c5c31e20aa47 100644 --- a/sc/source/ui/unoobj/textuno.cxx +++ b/sc/source/ui/unoobj/textuno.cxx @@ -1003,20 +1003,23 @@ SvxTextForwarder* ScCellTextData::GetTextForwarder() pPattern->FillEditParaItems( &aDefaults ); // including alignment etc. (for reading) } - const ScBaseCell* pCell = pDoc->GetCell( aCellPos ); - if ( pCell && pCell->GetCellType() == CELLTYPE_EDIT ) - pEditEngine->SetTextNewDefaults( *((const ScEditCell*)pCell)->GetData(), aDefaults ); + if (pDoc->GetCellType(aCellPos) == CELLTYPE_EDIT) + { + const EditTextObject* pObj = pDoc->GetEditText(aCellPos); + if (pObj) + pEditEngine->SetTextNewDefaults(*pObj, aDefaults); + } else { - GetCellText( aCellPos, aText ); + GetCellText(aCellPos, aText); if (aText.Len()) - pEditEngine->SetTextNewDefaults( aText, aDefaults ); + pEditEngine->SetTextNewDefaults(aText, aDefaults); else pEditEngine->SetDefaults(aDefaults); } } - bDataValid = sal_True; + bDataValid = true; return pForwarder; } |