diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-09-09 20:05:00 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-09-09 19:05:27 +0000 |
commit | 21efe9ed56372dee93258fdbfd1bc88a0fd45760 (patch) | |
tree | 51cb89f951cccf1b99ef59b0afb85fa06fe5148d | |
parent | Resolves: #i122777# Corrected texture mapping for 3D CustomShapes (diff) | |
download | core-21efe9ed56372dee93258fdbfd1bc88a0fd45760.tar.gz core-21efe9ed56372dee93258fdbfd1bc88a0fd45760.zip |
CID#1079181 initialize buffer
Change-Id: I516aedd445c8fcd4cefed1ed23d5bf8157b200a6
Reviewed-on: https://gerrit.libreoffice.org/5889
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sc/source/filter/qpro/qproform.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sc/source/filter/qpro/qproform.cxx b/sc/source/filter/qpro/qproform.cxx index 65984ef131b3..2b9bca63752a 100644 --- a/sc/source/filter/qpro/qproform.cxx +++ b/sc/source/filter/qpro/qproform.cxx @@ -185,8 +185,9 @@ ConvErr QProToSc::Convert( const ScTokenArray*& pArray, sal_uInt16 /*nLen*/, con { sal_uInt8 nFmla[ nBufSize ], i, nArg, nArgArray[ nBufSize ]; sal_Int8 nCol, nPage; - sal_uInt16 nInt, nIntCount = 0, nStringCount = 0, nFloatCount = 0, nDLLCount = 0, nIntArray[ nBufSize ], nArgCount = 0; - String sStringArray[ nBufSize ]; + sal_uInt16 nInt, nIntCount = 0, nStringCount = 0, nFloatCount = 0, nDLLCount = 0, nArgCount = 0; + sal_uInt16 nIntArray[ nBufSize ] = {0}; + OUString sStringArray[ nBufSize ]; sal_uInt16 nDummy, nDLLId, nDLLArray[ nBufSize ]; sal_uInt16 nNote, nRef, nRelBits; TokenId nPush; @@ -211,7 +212,7 @@ ConvErr QProToSc::Convert( const ScTokenArray*& pArray, sal_uInt16 /*nLen*/, con { maIn >> nInt; nIntArray[ nIntCount ] = nInt; - SAFEDEC_OR_RET(nRef, 2, ConvErrCount); + SAFEDEC_OR_RET(nRef, 2, ConvErrCount); nIntCount++; } @@ -219,7 +220,7 @@ ConvErr QProToSc::Convert( const ScTokenArray*& pArray, sal_uInt16 /*nLen*/, con { maIn >> nFloat; nFloatArray[ nFloatCount ] = nFloat; - SAFEDEC_OR_RET(nRef, 8, ConvErrCount); + SAFEDEC_OR_RET(nRef, 8, ConvErrCount); nFloatCount++; } @@ -228,16 +229,16 @@ ConvErr QProToSc::Convert( const ScTokenArray*& pArray, sal_uInt16 /*nLen*/, con maIn >> nArg >> nDummy >> nDLLId; nArgArray[ nArgCount ] = nArg; nDLLArray[ nDLLCount ] = nDLLId; - SAFEDEC_OR_RET(nRef, 5, ConvErrCount); + SAFEDEC_OR_RET(nRef, 5, ConvErrCount); nDLLCount++; nArgCount++; } if( nFmla[ i ] == 0x06 ) { - String aTmp(::read_zeroTerminated_uInt8s_ToOUString(maIn, maIn.GetStreamCharSet())); + OUString aTmp(::read_zeroTerminated_uInt8s_ToOUString(maIn, maIn.GetStreamCharSet())); sStringArray[ nStringCount ] = aTmp; nStringCount++; - SAFEDEC_OR_RET(nRef, aTmp.Len() + 1, ConvErrCount); + SAFEDEC_OR_RET(nRef, aTmp.getLength() + 1, ConvErrCount); } } } @@ -350,8 +351,7 @@ ConvErr QProToSc::Convert( const ScTokenArray*& pArray, sal_uInt16 /*nLen*/, con break; case FT_ConstString:{ - String aLabel; - aLabel = sStringArray[ nStringCount ]; + OUString aLabel(sStringArray[ nStringCount ]); aStack << aPool.Store( aLabel ); nStringCount++; } |