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

Miklos Vajna vmiklos at collabora.co.uk
Wed Apr 19 10:32:05 UTC 2017


 vcl/source/filter/graphicfilter.cxx   |    2 +-
 vcl/source/filter/jpeg/JpegReader.cxx |    2 +-
 vcl/source/filter/jpeg/JpegReader.hxx |    2 +-
 vcl/source/filter/jpeg/jpeg.cxx       |    4 ++--
 vcl/source/filter/jpeg/jpeg.hxx       |    2 +-
 vcl/workben/fftester.cxx              |    2 +-
 vcl/workben/jpgfuzzer.cxx             |    2 +-
 7 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 13414a637f30375a62c02f54c054e358f7565d05
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed Apr 19 09:59:09 2017 +0200

    vcl JPEG import: remove unused pCallerData
    
    Which is always set to nullptr, is passed around, finally just ignored.
    
    Change-Id: I81aecbed33ea249e63fbb412a54345fbb8335e47
    Reviewed-on: https://gerrit.libreoffice.org/36662
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Jenkins <ci at libreoffice.org>

diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index 9e654790995a..55952b77943d 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -1492,7 +1492,7 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPat
             if( !( nImportFlags & GraphicFilterImportFlags::DontSetLogsizeForJpeg ) )
                 nImportFlags |= GraphicFilterImportFlags::SetLogsizeForJpeg;
 
-            if( !ImportJPEG( rIStream, rGraphic, nullptr, nImportFlags ) )
+            if( !ImportJPEG( rIStream, rGraphic, nImportFlags ) )
                 nStatus = GRFILTER_FILTERERROR;
             else
                 eLinkType = GfxLinkType::NativeJpg;
diff --git a/vcl/source/filter/jpeg/JpegReader.cxx b/vcl/source/filter/jpeg/JpegReader.cxx
index 58a79babeb46..b7136d6442c2 100644
--- a/vcl/source/filter/jpeg/JpegReader.cxx
+++ b/vcl/source/filter/jpeg/JpegReader.cxx
@@ -161,7 +161,7 @@ void jpeg_svstream_src (j_decompress_ptr cinfo, void* input)
     source->pub.next_input_byte = nullptr; /* until buffer loaded */
 }
 
-JPEGReader::JPEGReader( SvStream& rStream, void* /*pCallData*/, bool bSetLogSize ) :
+JPEGReader::JPEGReader( SvStream& rStream, bool bSetLogSize ) :
     mrStream         ( rStream ),
     mnLastPos        ( rStream.Tell() ),
     mnLastLines      ( 0 ),
diff --git a/vcl/source/filter/jpeg/JpegReader.hxx b/vcl/source/filter/jpeg/JpegReader.hxx
index 3a20ad90f751..58ba82cf342d 100644
--- a/vcl/source/filter/jpeg/JpegReader.hxx
+++ b/vcl/source/filter/jpeg/JpegReader.hxx
@@ -56,7 +56,7 @@ class JPEGReader : public GraphicReader
     Graphic CreateIntermediateGraphic(long nLines);
 
 public:
-            JPEGReader( SvStream& rStream, void* pCallData, bool bSetLogSize );
+            JPEGReader( SvStream& rStream, bool bSetLogSize );
     virtual ~JPEGReader() override;
 
     ReadState Read(Graphic& rGraphic);
diff --git a/vcl/source/filter/jpeg/jpeg.cxx b/vcl/source/filter/jpeg/jpeg.cxx
index ca780f1c6bcc..f1cb2eb2ed65 100644
--- a/vcl/source/filter/jpeg/jpeg.cxx
+++ b/vcl/source/filter/jpeg/jpeg.cxx
@@ -25,7 +25,7 @@
 #include <vcl/FilterConfigItem.hxx>
 #include <vcl/graphicfilter.hxx>
 
-VCL_DLLPUBLIC bool ImportJPEG( SvStream& rInputStream, Graphic& rGraphic, void* pCallerData, GraphicFilterImportFlags nImportFlags )
+VCL_DLLPUBLIC bool ImportJPEG( SvStream& rInputStream, Graphic& rGraphic, GraphicFilterImportFlags nImportFlags )
 {
     bool        bReturn = true;
 
@@ -34,7 +34,7 @@ VCL_DLLPUBLIC bool ImportJPEG( SvStream& rInputStream, Graphic& rGraphic, void*
     JPEGReader* pJPEGReader = dynamic_cast<JPEGReader*>( pContext.get() );
     if (!pJPEGReader)
     {
-        pContext = std::make_shared<JPEGReader>( rInputStream, pCallerData, bool( nImportFlags & GraphicFilterImportFlags::SetLogsizeForJpeg ) );
+        pContext = std::make_shared<JPEGReader>( rInputStream, bool( nImportFlags & GraphicFilterImportFlags::SetLogsizeForJpeg ) );
         pJPEGReader = static_cast<JPEGReader*>( pContext.get() );
     }
 
diff --git a/vcl/source/filter/jpeg/jpeg.hxx b/vcl/source/filter/jpeg/jpeg.hxx
index 118ff09fc125..f8f900ace03d 100644
--- a/vcl/source/filter/jpeg/jpeg.hxx
+++ b/vcl/source/filter/jpeg/jpeg.hxx
@@ -27,7 +27,7 @@
 #include <com/sun/star/beans/PropertyValue.hpp>
 #include <com/sun/star/task/XStatusIndicator.hpp>
 
-VCL_DLLPUBLIC bool ImportJPEG( SvStream& rInputStream, Graphic& rGraphic, void* pCallerData, GraphicFilterImportFlags nImportFlags );
+VCL_DLLPUBLIC bool ImportJPEG( SvStream& rInputStream, Graphic& rGraphic, GraphicFilterImportFlags nImportFlags );
 
 bool ExportJPEG(SvStream& rOutputStream,
                     const Graphic& rGraphic,
diff --git a/vcl/workben/fftester.cxx b/vcl/workben/fftester.cxx
index 636970f6ee48..33b25847a0c1 100644
--- a/vcl/workben/fftester.cxx
+++ b/vcl/workben/fftester.cxx
@@ -120,7 +120,7 @@ try_again:
             {
                 Graphic aGraphic;
                 SvFileStream aFileStream(out, StreamMode::READ);
-                ret = (int) ImportJPEG(aFileStream, aGraphic, nullptr, GraphicFilterImportFlags::NONE);
+                ret = (int) ImportJPEG(aFileStream, aGraphic, GraphicFilterImportFlags::NONE);
             }
             else if (strcmp(argv[2], "gif") == 0)
             {
diff --git a/vcl/workben/jpgfuzzer.cxx b/vcl/workben/jpgfuzzer.cxx
index 711c5e2ee871..c5fddc150043 100644
--- a/vcl/workben/jpgfuzzer.cxx
+++ b/vcl/workben/jpgfuzzer.cxx
@@ -21,7 +21,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
 {
     SvMemoryStream aStream(const_cast<uint8_t*>(data), size, StreamMode::READ);
     Graphic aGraphic;
-    (void)ImportJPEG(aStream, aGraphic, nullptr, GraphicFilterImportFlags::NONE);
+    (void)ImportJPEG(aStream, aGraphic, GraphicFilterImportFlags::NONE);
     return 0;
 }
 


More information about the Libreoffice-commits mailing list