From 74713b34a36577f19eb3194246de73fa4f2bb741 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 25 May 2016 09:05:21 +0200 Subject: loplugin:unusedmethods Change-Id: Ib36bc0e87d00abb638cbfec511cd13b6179eabda Reviewed-on: https://gerrit.libreoffice.org/25431 Tested-by: Jenkins Reviewed-by: Noel Grandin --- formula/source/core/api/token.cxx | 51 --------------------------------------- 1 file changed, 51 deletions(-) (limited to 'formula') diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx index 8cbceb3e5e8d..2c613867cba1 100644 --- a/formula/source/core/api/token.cxx +++ b/formula/source/core/api/token.cxx @@ -779,57 +779,6 @@ FormulaTokenArray& FormulaTokenArray::operator=( const FormulaTokenArray& rArr ) return *this; } -FormulaTokenArray* FormulaTokenArray::Clone() const -{ - FormulaTokenArray* p = new FormulaTokenArray; - p->nLen = nLen; - p->nRPN = nRPN; - p->nMode = nMode; - p->nError = nError; - p->bHyperLink = bHyperLink; - p->mbFromRangeName = mbFromRangeName; - FormulaToken** pp; - if( nLen ) - { - pp = p->pCode = new FormulaToken*[ nLen ]; - memcpy( pp, pCode, nLen * sizeof( FormulaToken* ) ); - for( sal_uInt16 i = 0; i < nLen; i++, pp++ ) - { - *pp = (*pp)->Clone(); - (*pp)->IncRef(); - } - } - if( nRPN ) - { - pp = p->pRPN = new FormulaToken*[ nRPN ]; - memcpy( pp, pRPN, nRPN * sizeof( FormulaToken* ) ); - for( sal_uInt16 i = 0; i < nRPN; i++, pp++ ) - { - FormulaToken* t = *pp; - if( t->GetRef() > 1 ) - { - FormulaToken** p2 = pCode; - sal_uInt16 nIdx = 0xFFFF; - for( sal_uInt16 j = 0; j < nLen; j++, p2++ ) - { - if( *p2 == t ) - { - nIdx = j; break; - } - } - if( nIdx == 0xFFFF ) - *pp = t->Clone(); - else - *pp = p->pCode[ nIdx ]; - } - else - *pp = t->Clone(); - (*pp)->IncRef(); - } - } - return p; -} - void FormulaTokenArray::Clear() { if( nRPN ) DelRPN(); -- cgit