summaryrefslogtreecommitdiffstats
path: root/formula
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-01-19 15:17:30 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-01-20 08:13:51 +0000
commit4ff5a5558472beee85eb1234dcc2aa2ed9000f6c (patch)
treeb2a0a83933064b7a22db0e27c0a3d8b7339053de /formula
parentexternal/firebird: Adapt to GCC 6 (diff)
downloadcore-4ff5a5558472beee85eb1234dcc2aa2ed9000f6c.tar.gz
core-4ff5a5558472beee85eb1234dcc2aa2ed9000f6c.zip
loplugin:unusedmethods
Change-Id: Ib2dc804f55d1a96ae01f2cf31b7d55956040a72e Reviewed-on: https://gerrit.libreoffice.org/21603 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'formula')
-rw-r--r--formula/source/core/api/token.cxx54
1 files changed, 0 insertions, 54 deletions
diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx
index e868bbfd2ef1..131cafa180b9 100644
--- a/formula/source/core/api/token.cxx
+++ b/formula/source/core/api/token.cxx
@@ -901,60 +901,6 @@ FormulaToken* FormulaTokenArray::ReplaceToken( sal_uInt16 nOffset, FormulaToken*
}
}
-void FormulaTokenArray::RemoveToken( sal_uInt16 nOffset, sal_uInt16 nCount )
-{
- if (nOffset < nLen)
- {
- SAL_WARN_IF( nOffset + nCount > nLen, "formula.core",
- "FormulaTokenArray::RemoveToken - nOffset " << nOffset << " + nCount " << nCount << " > nLen " << nLen);
- const sal_uInt16 nStop = ::std::min( static_cast<sal_uInt16>(nOffset + nCount), nLen);
- nCount = nStop - nOffset;
- for (sal_uInt16 j = nOffset; j < nStop; ++j)
- {
- FormulaToken* p = pCode[j];
- if (p->GetRef() > 1)
- {
- for (sal_uInt16 i=0; i < nRPN; ++i)
- {
- if (pRPN[i] == p)
- {
- // Shift remaining tokens in pRPN down.
- for (sal_uInt16 x=i+1; x < nRPN; ++x)
- {
- pRPN[x-1] = pRPN[x];
- }
- --nRPN;
-
- p->DecRef();
- if (p->GetRef() == 1)
- break; // for
- }
- }
- }
- p->DecRef(); // may be dead now
- }
-
- // Shift remaining tokens in pCode down.
- for (sal_uInt16 x = nStop; x < nLen; ++x)
- {
- pCode[x-nCount] = pCode[x];
- }
- nLen -= nCount;
-
- if (nIndex >= nOffset)
- {
- if (nIndex < nStop)
- nIndex = nOffset + 1;
- else
- nIndex -= nStop - nOffset;
- }
- }
- else
- {
- SAL_WARN("formula.core","FormulaTokenArray::RemoveToken - nOffset " << nOffset << " >= nLen " << nLen);
- }
-}
-
FormulaToken* FormulaTokenArray::Add( FormulaToken* t )
{
if( !pCode )