Kaydet (Commit) 3114d8a1 authored tarafından Caolán McNamara's avatar Caolán McNamara

improve scoping

Change-Id: I2c7f607f05b07b7ec5453758910fdcb7f27ae697
üst 43af3605
...@@ -273,8 +273,6 @@ Graphic JPEGReader::CreateIntermediateGraphic(long nLines) ...@@ -273,8 +273,6 @@ Graphic JPEGReader::CreateIntermediateGraphic(long nLines)
ReadState JPEGReader::Read( Graphic& rGraphic ) ReadState JPEGReader::Read( Graphic& rGraphic )
{ {
long nEndPosition;
long nLines;
ReadState eReadState; ReadState eReadState;
bool bRet = false; bool bRet = false;
sal_uInt8 cDummy; sal_uInt8 cDummy;
...@@ -283,7 +281,7 @@ ReadState JPEGReader::Read( Graphic& rGraphic ) ...@@ -283,7 +281,7 @@ ReadState JPEGReader::Read( Graphic& rGraphic )
// check if the stream's end is already available // check if the stream's end is already available
mrStream.Seek( STREAM_SEEK_TO_END ); mrStream.Seek( STREAM_SEEK_TO_END );
mrStream.ReadUChar( cDummy ); mrStream.ReadUChar( cDummy );
nEndPosition = mrStream.Tell(); long nEndPosition = mrStream.Tell();
// else check if at least JPEG_MIN_READ bytes can be read // else check if at least JPEG_MIN_READ bytes can be read
if( mrStream.GetError() == ERRCODE_IO_PENDING ) if( mrStream.GetError() == ERRCODE_IO_PENDING )
...@@ -300,6 +298,7 @@ ReadState JPEGReader::Read( Graphic& rGraphic ) ...@@ -300,6 +298,7 @@ ReadState JPEGReader::Read( Graphic& rGraphic )
mrStream.Seek( mnLastPos ); mrStream.Seek( mnLastPos );
// read the (partial) image // read the (partial) image
long nLines;
ReadJPEG( this, &mrStream, &nLines, GetPreviewSize() ); ReadJPEG( this, &mrStream, &nLines, GetPreviewSize() );
if (!maBitmap.IsEmpty()) if (!maBitmap.IsEmpty())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment