diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-03-28 10:59:07 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-03-28 17:03:54 -0400 |
commit | 2460b39d9c1d07abc50a7e645cb672c7b5a53084 (patch) | |
tree | c740587196d581010febb8612151524fad86a2a6 /sc/source/core/data/cell.cxx | |
parent | b9079dc23b163321ce0e0fdea9b8b4ec5799b6d2 (diff) |
ScBaseCell::CellEqual is no more.
Change-Id: I9a2923ec85ce116662d66a38b61a5258ff113168
Diffstat (limited to 'sc/source/core/data/cell.cxx')
-rw-r--r-- | sc/source/core/data/cell.cxx | 80 |
1 files changed, 0 insertions, 80 deletions
diff --git a/sc/source/core/data/cell.cxx b/sc/source/core/data/cell.cxx index cee5df395f50..66032a8471d8 100644 --- a/sc/source/core/data/cell.cxx +++ b/sc/source/core/data/cell.cxx @@ -345,86 +345,6 @@ rtl::OUString ScBaseCell::GetStringData() const return aStr; } -bool ScBaseCell::CellEqual( const ScBaseCell* pCell1, const ScBaseCell* pCell2 ) -{ - CellType eType1 = CELLTYPE_NONE; - CellType eType2 = CELLTYPE_NONE; - if ( pCell1 ) - { - eType1 = pCell1->GetCellType(); - if (eType1 == CELLTYPE_EDIT) - eType1 = CELLTYPE_STRING; - else if (eType1 == CELLTYPE_NOTE) - eType1 = CELLTYPE_NONE; - } - if ( pCell2 ) - { - eType2 = pCell2->GetCellType(); - if (eType2 == CELLTYPE_EDIT) - eType2 = CELLTYPE_STRING; - else if (eType2 == CELLTYPE_NOTE) - eType2 = CELLTYPE_NONE; - } - if ( eType1 != eType2 ) - return false; - - switch ( eType1 ) // Both Types are the same - { - case CELLTYPE_NONE: // Both Empty - return true; - case CELLTYPE_VALUE: // Really Value-Cells - return ( ((const ScValueCell*)pCell1)->GetValue() == - ((const ScValueCell*)pCell2)->GetValue() ); - case CELLTYPE_STRING: // String or Edit - { - rtl::OUString aText1; - if ( pCell1->GetCellType() == CELLTYPE_STRING ) - aText1 = ((const ScStringCell*)pCell1)->GetString(); - else - aText1 = ((const ScEditCell*)pCell1)->GetString(); - rtl::OUString aText2; - if ( pCell2->GetCellType() == CELLTYPE_STRING ) - aText2 = ((const ScStringCell*)pCell2)->GetString(); - else - aText2 = ((const ScEditCell*)pCell2)->GetString(); - return ( aText1 == aText2 ); - } - case CELLTYPE_FORMULA: - { - //! pasted Lines / allow Slots!!!!! - //! Comparsion Function of the Formula Cell??? - //! To request with ScColumn::SwapRow to catch together! - - ScTokenArray* pCode1 = ((ScFormulaCell*)pCell1)->GetCode(); - ScTokenArray* pCode2 = ((ScFormulaCell*)pCell2)->GetCode(); - - if (pCode1->GetLen() == pCode2->GetLen()) // nicht-UPN - { - bool bEqual = true; - sal_uInt16 nLen = pCode1->GetLen(); - FormulaToken** ppToken1 = pCode1->GetArray(); - FormulaToken** ppToken2 = pCode2->GetArray(); - for (sal_uInt16 i=0; i<nLen; i++) - if ( !ppToken1[i]->TextEqual(*(ppToken2[i])) ) - { - bEqual = false; - break; - } - - if (bEqual) - return true; - } - - return false; // varying long or varying Tokens - } - default: - OSL_FAIL("oops, something for the Cells???"); - } - return false; -} - -// ============================================================================ - ScNoteCell::ScNoteCell( SvtBroadcaster* pBC ) : ScBaseCell( CELLTYPE_NOTE ) { |