From 21efe9ed56372dee93258fdbfd1bc88a0fd45760 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 9 Sep 2013 20:05:00 +0100 Subject: CID#1079181 initialize buffer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I516aedd445c8fcd4cefed1ed23d5bf8157b200a6 Reviewed-on: https://gerrit.libreoffice.org/5889 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- sc/source/filter/qpro/qproform.cxx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'sc') 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++; } -- cgit