diff options
author | Eike Rathke <erack@redhat.com> | 2016-07-14 22:31:14 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-07-14 22:31:20 +0200 |
commit | 908449639beaeafb04b9a9668ee20b0042389426 (patch) | |
tree | c583dc0bda059aff23575a63223faf90d05572dc /formula | |
parent | f9021f7eea06b1e5498534988f95e9cdbb79bc11 (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.cxx | 4 |
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; } } |