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

Caolán McNamara caolanm at redhat.com
Fri Mar 10 15:32:43 UTC 2017


 vcl/source/filter/jpeg/JpegReader.cxx |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 3114d8a12eb14f27229ecaad6d810e2020b86441
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Mar 10 15:31:28 2017 +0000

    improve scoping
    
    Change-Id: I2c7f607f05b07b7ec5453758910fdcb7f27ae697

diff --git a/vcl/source/filter/jpeg/JpegReader.cxx b/vcl/source/filter/jpeg/JpegReader.cxx
index 7cd9a22..7490cb3 100644
--- a/vcl/source/filter/jpeg/JpegReader.cxx
+++ b/vcl/source/filter/jpeg/JpegReader.cxx
@@ -273,8 +273,6 @@ Graphic JPEGReader::CreateIntermediateGraphic(long nLines)
 
 ReadState JPEGReader::Read( Graphic& rGraphic )
 {
-    long        nEndPosition;
-    long        nLines;
     ReadState   eReadState;
     bool        bRet = false;
     sal_uInt8   cDummy;
@@ -283,7 +281,7 @@ ReadState JPEGReader::Read( Graphic& rGraphic )
     // check if the stream's end is already available
     mrStream.Seek( STREAM_SEEK_TO_END );
     mrStream.ReadUChar( cDummy );
-    nEndPosition = mrStream.Tell();
+    long nEndPosition = mrStream.Tell();
 
     // else check if at least JPEG_MIN_READ bytes can be read
     if( mrStream.GetError() == ERRCODE_IO_PENDING )
@@ -300,6 +298,7 @@ ReadState JPEGReader::Read( Graphic& rGraphic )
     mrStream.Seek( mnLastPos );
 
     // read the (partial) image
+    long nLines;
     ReadJPEG( this, &mrStream, &nLines, GetPreviewSize() );
 
     if (!maBitmap.IsEmpty())


More information about the Libreoffice-commits mailing list