summaryrefslogtreecommitdiff
path: root/sc/source/core/tool/interpr4.cxx
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2014-06-03 15:55:28 +0200
committerEike Rathke <erack@redhat.com>2014-06-03 15:56:03 +0200
commit06127e06e1d9d99e58b32e618c93667f70929249 (patch)
tree4d0d9ea6c658c48473fe11ac525592fb0f6a6fa9 /sc/source/core/tool/interpr4.cxx
parent85d1b74fd0866dc54a3745743acd1aa76ef30aaf (diff)
eliminate xub_StrLen left-over
Change-Id: I02e7700536f5a7fcc836a035aa0767b2a34be887
Diffstat (limited to 'sc/source/core/tool/interpr4.cxx')
-rw-r--r--sc/source/core/tool/interpr4.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index f0f7c3a0955f..c59431cde88c 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -720,12 +720,12 @@ bool ScInterpreter::CreateStringArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
{
OString aTmp(OUStringToOString(aStr,
osl_getThreadTextEncoding()));
- // In case the xub_StrLen will be longer than USHORT
- // one day, and room for pad byte check.
+ // Old Add-Ins are limited to sal_uInt16 string
+ // lengths, and room for pad byte check.
if ( aTmp.getLength() > SAL_MAX_UINT16 - 2 )
return false;
// Append a 0-pad-byte if string length is odd
- //! MUST be sal_uInt16 and not xub_StrLen
+ //! MUST be sal_uInt16
sal_uInt16 nStrLen = (sal_uInt16) aTmp.getLength();
sal_uInt16 nLen = ( nStrLen + 2 ) & ~1;
@@ -843,12 +843,12 @@ bool ScInterpreter::CreateCellArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
{
OString aTmp(OUStringToOString(aStr,
osl_getThreadTextEncoding()));
- // In case the xub_StrLen will be longer than USHORT
- // one day, and room for pad byte check.
- if ( aTmp.getLength() > ((sal_uInt16)(~0)) - 2 )
+ // Old Add-Ins are limited to sal_uInt16 string
+ // lengths, and room for pad byte check.
+ if ( aTmp.getLength() > SAL_MAX_UINT16 - 2 )
return false;
// Append a 0-pad-byte if string length is odd
- //! MUST be sal_uInt16 and not xub_StrLen
+ //! MUST be sal_uInt16
sal_uInt16 nStrLen = (sal_uInt16) aTmp.getLength();
sal_uInt16 nLen = ( nStrLen + 2 ) & ~1;
if ( ((sal_uLong)nPos + 2 + nLen) > MAXARRSIZE)