Kaydet (Commit) f104fb0b authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Use sal_Int32 for css::uno::Sequence length

Change-Id: I158ed73fcc520c6363baf82461e5220fc12a996b
Reviewed-on: https://gerrit.libreoffice.org/48837Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst 7685ff8e
...@@ -130,12 +130,12 @@ static void lcl_SetLastFunctions( ScAppOptions& rOpt, const Any& rValue ) ...@@ -130,12 +130,12 @@ static void lcl_SetLastFunctions( ScAppOptions& rOpt, const Any& rValue )
Sequence<sal_Int32> aSeq; Sequence<sal_Int32> aSeq;
if ( rValue >>= aSeq ) if ( rValue >>= aSeq )
{ {
long nCount = aSeq.getLength(); sal_Int32 nCount = aSeq.getLength();
if ( nCount < USHRT_MAX ) if ( nCount < USHRT_MAX )
{ {
const sal_Int32* pArray = aSeq.getConstArray(); const sal_Int32* pArray = aSeq.getConstArray();
std::unique_ptr<sal_uInt16[]> pUShorts(new sal_uInt16[nCount]); std::unique_ptr<sal_uInt16[]> pUShorts(new sal_uInt16[nCount]);
for (long i=0; i<nCount; i++) for (sal_Int32 i=0; i<nCount; i++)
pUShorts[i] = static_cast<sal_uInt16>(pArray[i]); pUShorts[i] = static_cast<sal_uInt16>(pArray[i]);
rOpt.SetLRUFuncList( pUShorts.get(), sal::static_int_cast<sal_uInt16>(nCount) ); rOpt.SetLRUFuncList( pUShorts.get(), sal::static_int_cast<sal_uInt16>(nCount) );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment