diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-02-06 17:40:21 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-02-06 17:40:21 +0100 |
commit | 2afb6528c1bc70231b00555cdaa4dd3d25faed11 (patch) | |
tree | 3162922af0442cec7926588f7afa67495cf716e3 /vcl/source | |
parent | f5316a3d8cc2f94838fb5019cc4b8d093fe2fb3f (diff) |
Blind fix^3
Change-Id: I4124084a6ce47e96936b5cc8695af1981f9f33d4
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/filter/jpeg/JpegReader.cxx | 4 | ||||
-rw-r--r-- | vcl/source/filter/jpeg/jpeg.h | 3 | ||||
-rw-r--r-- | vcl/source/filter/jpeg/jpegc.cxx | 7 |
3 files changed, 6 insertions, 8 deletions
diff --git a/vcl/source/filter/jpeg/JpegReader.cxx b/vcl/source/filter/jpeg/JpegReader.cxx index 61d798521565..cd9611dbe4f5 100644 --- a/vcl/source/filter/jpeg/JpegReader.cxx +++ b/vcl/source/filter/jpeg/JpegReader.cxx @@ -453,10 +453,8 @@ ReadState JPEGReader::Read( Graphic& rGraphic ) // seek back to the original position mrStream.Seek( mnLastPos ); - Size aPreviewSize = GetPreviewSize(); - // read the (partial) image - ReadJPEG( this, &mrStream, &nLines, aPreviewSize.Width(), aPreviewSize.Height() ); + ReadJPEG( this, &mrStream, &nLines, GetPreviewSize() ); if( mpAcc ) { diff --git a/vcl/source/filter/jpeg/jpeg.h b/vcl/source/filter/jpeg/jpeg.h index 9701170abf05..01209ba56509 100644 --- a/vcl/source/filter/jpeg/jpeg.h +++ b/vcl/source/filter/jpeg/jpeg.h @@ -32,6 +32,7 @@ namespace com { namespace sun { namespace star { namespace task { } } } } class JPEGReader; class JPEGWriter; +class Size; void jpeg_svstream_src (j_decompress_ptr cinfo, void* infile); @@ -42,7 +43,7 @@ long WriteJPEG( JPEGWriter* pJPEGWriter, void* pOutputStream, long nWidth, lo css::uno::Reference<css::task::XStatusIndicator> const & status); void ReadJPEG( JPEGReader* pJPEGReader, void* pInputStream, long* pLines, - int nPreviewWidth, int nPreviewHeight ); + Size const & previewSize ); long Transform( void* pInputStream, void* pOutputStream, long nAngle ); diff --git a/vcl/source/filter/jpeg/jpegc.cxx b/vcl/source/filter/jpeg/jpegc.cxx index 23fa73f676f5..3f52a2f024b9 100644 --- a/vcl/source/filter/jpeg/jpegc.cxx +++ b/vcl/source/filter/jpeg/jpegc.cxx @@ -56,7 +56,7 @@ extern "C" void outputMessage (j_common_ptr cinfo) } void ReadJPEG( JPEGReader* pJPEGReader, void* pInputStream, long* pLines, - int thePreviewWidth, int thePreviewHeight ) + Size const & previewSize ) { jpeg_decompress_struct cinfo; ErrorManagerStruct jerr; @@ -70,9 +70,6 @@ void ReadJPEG( JPEGReader* pJPEGReader, void* pInputStream, long* pLines, unsigned char * pScanLineBuffer = NULL; long nScanLineBufferComponents = 0; - int nPreviewWidth = thePreviewWidth; - int nPreviewHeight = thePreviewHeight; - if ( setjmp( jerr.setjmp_buffer ) ) { jpeg_destroy_decompress( &cinfo ); @@ -100,6 +97,8 @@ void ReadJPEG( JPEGReader* pJPEGReader, void* pInputStream, long* pLines, OSL_ASSERT(cinfo.out_color_space == JCS_CMYK || cinfo.out_color_space == JCS_GRAYSCALE || cinfo.out_color_space == JCS_RGB); /* change scale for preview import */ + long nPreviewWidth = previewSize.Width(); + long nPreviewHeight = previewSize.Height(); if( nPreviewWidth || nPreviewHeight ) { if( nPreviewWidth == 0 ) |