diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-03-11 05:39:46 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-03-12 13:03:37 +0000 |
commit | 0b2b3369fcc0c06fdb0a384518a4a799c4aed4f8 (patch) | |
tree | d8aca6cb05e220ca8fb992bef6f49325dbddd747 /sc/source | |
parent | bb472d035b0329e1efcc03c2b4a2d7651c55b452 (diff) |
declare variable when we use it
Change-Id: I7f85568318133b19ccd315ff9084efdd15b3eed7
Reviewed-on: https://gerrit.libreoffice.org/23165
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/filter/excel/excform.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/excel/tokstack.cxx | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/sc/source/filter/excel/excform.cxx b/sc/source/filter/excel/excform.cxx index 201b5c922b92..2be528aefacd 100644 --- a/sc/source/filter/excel/excform.cxx +++ b/sc/source/filter/excel/excform.cxx @@ -1809,8 +1809,6 @@ void ExcelToSc::SetComplRow( ScComplexRefData &rCRD ) void ExcelToSc::ReadExtensionArray( unsigned int n, XclImpStream& aIn ) { - ScMatrix* pMatrix; - sal_uInt8 nByte = aIn.ReaduInt8(); sal_uInt16 nUINT16 = aIn.ReaduInt16(); @@ -1827,7 +1825,7 @@ void ExcelToSc::ReadExtensionArray( unsigned int n, XclImpStream& aIn ) nRows = nUINT16; } - pMatrix = aPool.GetMatrix( n ); + ScMatrix* pMatrix = aPool.GetMatrix( n ); if( nullptr != pMatrix ) { diff --git a/sc/source/filter/excel/tokstack.cxx b/sc/source/filter/excel/tokstack.cxx index 1a8a399f8b62..1bafcfbc1d09 100644 --- a/sc/source/filter/excel/tokstack.cxx +++ b/sc/source/filter/excel/tokstack.cxx @@ -773,8 +773,6 @@ const TokenId TokenPool::StoreNlf( const ScSingleRefData& rTr ) const TokenId TokenPool::StoreMatrix() { - ScMatrix* pM; - if( nElementAkt >= nElement ) if (!GrowElement()) return static_cast<const TokenId>(nElementAkt+1); @@ -786,7 +784,7 @@ const TokenId TokenPool::StoreMatrix() pElement[ nElementAkt ] = nP_MatrixAkt; pType[ nElementAkt ] = T_Matrix; - pM = new ScFullMatrix( 0, 0 ); + ScMatrix* pM = new ScFullMatrix( 0, 0 ); pM->IncRef( ); ppP_Matrix[ nP_MatrixAkt ] = pM; |