[Libreoffice-commits] core.git: sc/source

Markus Mohrhard markus.mohrhard at googlemail.com
Sat Mar 12 13:04:04 UTC 2016


 sc/source/filter/excel/excform.cxx  |    4 +---
 sc/source/filter/excel/tokstack.cxx |    4 +---
 2 files changed, 2 insertions(+), 6 deletions(-)

New commits:
commit 0b2b3369fcc0c06fdb0a384518a4a799c4aed4f8
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Fri Mar 11 05:39:46 2016 +0100

    declare variable when we use it
    
    Change-Id: I7f85568318133b19ccd315ff9084efdd15b3eed7
    Reviewed-on: https://gerrit.libreoffice.org/23165
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/sc/source/filter/excel/excform.cxx b/sc/source/filter/excel/excform.cxx
index 201b5c92..2be528a 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 1a8a399..1bafcfbc 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;
 


More information about the Libreoffice-commits mailing list