summaryrefslogtreecommitdiff
path: root/formula
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2016-07-14 22:31:14 +0200
committerEike Rathke <erack@redhat.com>2016-07-14 22:31:20 +0200
commit908449639beaeafb04b9a9668ee20b0042389426 (patch)
treec583dc0bda059aff23575a63223faf90d05572dc /formula
parentf9021f7eea06b1e5498534988f95e9cdbb79bc11 (diff)
let FormulaTokenArray::RemoveToken() return the actual count of tokens removed
Change-Id: Iebf654e7b4c682036b4ff334298948557b755eac
Diffstat (limited to 'formula')
-rw-r--r--formula/source/core/api/token.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx
index 0eb906642636..072216b955cb 100644
--- a/formula/source/core/api/token.cxx
+++ b/formula/source/core/api/token.cxx
@@ -856,7 +856,7 @@ FormulaToken* FormulaTokenArray::ReplaceToken( sal_uInt16 nOffset, FormulaToken*
}
}
-void FormulaTokenArray::RemoveToken( sal_uInt16 nOffset, sal_uInt16 nCount )
+sal_uInt16 FormulaTokenArray::RemoveToken( sal_uInt16 nOffset, sal_uInt16 nCount )
{
if (nOffset < nLen)
{
@@ -903,10 +903,12 @@ void FormulaTokenArray::RemoveToken( sal_uInt16 nOffset, sal_uInt16 nCount )
else
nIndex -= nStop - nOffset;
}
+ return nCount;
}
else
{
SAL_WARN("formula.core","FormulaTokenArray::RemoveToken - nOffset " << nOffset << " >= nLen " << nLen);
+ return 0;
}
}