diff options
Diffstat (limited to 'vcl/source/filter')
-rw-r--r-- | vcl/source/filter/FilterConfigCache.cxx | 2 | ||||
-rw-r--r-- | vcl/source/filter/graphicfilter.cxx | 2 | ||||
-rw-r--r-- | vcl/source/filter/graphicfilter2.cxx | 2 | ||||
-rw-r--r-- | vcl/source/filter/jpeg/JpegReader.cxx | 18 | ||||
-rw-r--r-- | vcl/source/filter/jpeg/JpegWriter.cxx | 10 | ||||
-rw-r--r-- | vcl/source/filter/jpeg/jpegc.cxx | 16 |
6 files changed, 35 insertions, 15 deletions
diff --git a/vcl/source/filter/FilterConfigCache.cxx b/vcl/source/filter/FilterConfigCache.cxx index 369fc3989f04..30f6e4399511 100644 --- a/vcl/source/filter/FilterConfigCache.cxx +++ b/vcl/source/filter/FilterConfigCache.cxx @@ -118,7 +118,7 @@ OUString FilterConfigCache::FilterConfigCacheEntry::GetShortName() @throws It let pass RuntimeExceptions only. */ -Reference< XInterface > openConfig(const char* sPackage) +static Reference< XInterface > openConfig(const char* sPackage) { Reference< XComponentContext > xContext( comphelper::getProcessComponentContext() ); diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx index 7aa82f10031b..c2146b962248 100644 --- a/vcl/source/filter/graphicfilter.cxx +++ b/vcl/source/filter/graphicfilter.cxx @@ -167,7 +167,7 @@ sal_uInt8* ImplSearchEntry( sal_uInt8* pSource, sal_uInt8 const * pDest, sal_uLo return nullptr; } -inline OUString ImpGetExtension( const OUString &rPath ) +static inline OUString ImpGetExtension( const OUString &rPath ) { OUString aExt; INetURLObject aURL( rPath ); diff --git a/vcl/source/filter/graphicfilter2.cxx b/vcl/source/filter/graphicfilter2.cxx index f9b5ae775c7f..32ad4b51947a 100644 --- a/vcl/source/filter/graphicfilter2.cxx +++ b/vcl/source/filter/graphicfilter2.cxx @@ -214,7 +214,7 @@ bool GraphicDescriptor::ImpDetectGIF( SvStream& rStm, bool bExtendedInfo ) } // returns the next jpeg marker, a return value of 0 represents an error -sal_uInt8 ImpDetectJPG_GetNextMarker( SvStream& rStm ) +static sal_uInt8 ImpDetectJPG_GetNextMarker( SvStream& rStm ) { sal_uInt8 nByte; do diff --git a/vcl/source/filter/jpeg/JpegReader.cxx b/vcl/source/filter/jpeg/JpegReader.cxx index 7b307d7f97cb..1e21b012f0d9 100644 --- a/vcl/source/filter/jpeg/JpegReader.cxx +++ b/vcl/source/filter/jpeg/JpegReader.cxx @@ -32,11 +32,13 @@ #define BUFFER_SIZE 4096 +extern "C" { + /* * Initialize source --- called by jpeg_read_header * before any data is actually read. */ -extern "C" void init_source (j_decompress_ptr cinfo) +static void init_source (j_decompress_ptr cinfo) { SourceManagerStruct * source = reinterpret_cast<SourceManagerStruct *>(cinfo->src); @@ -48,7 +50,9 @@ extern "C" void init_source (j_decompress_ptr cinfo) source->no_data_available = FALSE; } -long StreamRead( SvStream* pStream, void* pBuffer, long nBufferSize ) +} + +static long StreamRead( SvStream* pStream, void* pBuffer, long nBufferSize ) { long nRead = 0; @@ -71,7 +75,9 @@ long StreamRead( SvStream* pStream, void* pBuffer, long nBufferSize ) return nRead; } -extern "C" boolean fill_input_buffer (j_decompress_ptr cinfo) +extern "C" { + +static boolean fill_input_buffer (j_decompress_ptr cinfo) { SourceManagerStruct * source = reinterpret_cast<SourceManagerStruct *>(cinfo->src); size_t nbytes; @@ -99,7 +105,7 @@ extern "C" boolean fill_input_buffer (j_decompress_ptr cinfo) return TRUE; } -extern "C" void skip_input_data (j_decompress_ptr cinfo, long numberOfBytes) +static void skip_input_data (j_decompress_ptr cinfo, long numberOfBytes) { SourceManagerStruct * source = reinterpret_cast<SourceManagerStruct *>(cinfo->src); @@ -123,11 +129,13 @@ extern "C" void skip_input_data (j_decompress_ptr cinfo, long numberOfBytes) } } -extern "C" void term_source (j_decompress_ptr) +static void term_source (j_decompress_ptr) { /* no work necessary here */ } +} + void jpeg_svstream_src (j_decompress_ptr cinfo, void* input) { SourceManagerStruct * source; diff --git a/vcl/source/filter/jpeg/JpegWriter.cxx b/vcl/source/filter/jpeg/JpegWriter.cxx index 49e4c6057858..f246c3ea53b3 100644 --- a/vcl/source/filter/jpeg/JpegWriter.cxx +++ b/vcl/source/filter/jpeg/JpegWriter.cxx @@ -38,7 +38,9 @@ struct DestinationManagerStruct JOCTET * buffer; /* start of buffer */ }; -extern "C" void init_destination (j_compress_ptr cinfo) +extern "C" { + +static void init_destination (j_compress_ptr cinfo) { DestinationManagerStruct * destination = reinterpret_cast<DestinationManagerStruct *>(cinfo->dest); @@ -50,7 +52,7 @@ extern "C" void init_destination (j_compress_ptr cinfo) destination->pub.free_in_buffer = BUFFER_SIZE; } -extern "C" boolean empty_output_buffer (j_compress_ptr cinfo) +static boolean empty_output_buffer (j_compress_ptr cinfo) { DestinationManagerStruct * destination = reinterpret_cast<DestinationManagerStruct *>(cinfo->dest); @@ -65,7 +67,7 @@ extern "C" boolean empty_output_buffer (j_compress_ptr cinfo) return TRUE; } -extern "C" void term_destination (j_compress_ptr cinfo) +static void term_destination (j_compress_ptr cinfo) { DestinationManagerStruct * destination = reinterpret_cast<DestinationManagerStruct *>(cinfo->dest); size_t datacount = BUFFER_SIZE - destination->pub.free_in_buffer; @@ -80,6 +82,8 @@ extern "C" void term_destination (j_compress_ptr cinfo) } } +} + void jpeg_svstream_dest (j_compress_ptr cinfo, void* output) { SvStream* stream = static_cast<SvStream*>(output); diff --git a/vcl/source/filter/jpeg/jpegc.cxx b/vcl/source/filter/jpeg/jpegc.cxx index cd87781ebd4f..ab56a35c0de7 100644 --- a/vcl/source/filter/jpeg/jpegc.cxx +++ b/vcl/source/filter/jpeg/jpegc.cxx @@ -55,7 +55,9 @@ struct ErrorManagerStruct #pragma warning(pop) #endif -extern "C" void errorExit (j_common_ptr cinfo) +extern "C" { + +static void errorExit (j_common_ptr cinfo) { char buffer[JMSG_LENGTH_MAX]; (*cinfo->err->format_message) (cinfo, buffer); @@ -64,19 +66,23 @@ extern "C" void errorExit (j_common_ptr cinfo) longjmp(error->setjmp_buffer, 1); } -extern "C" void outputMessage (j_common_ptr cinfo) +static void outputMessage (j_common_ptr cinfo) { char buffer[JMSG_LENGTH_MAX]; (*cinfo->err->format_message) (cinfo, buffer); SAL_WARN("vcl.filter", "failure reading JPEG: " << buffer); } +} + static int GetWarningLimit() { return utl::ConfigManager::IsFuzzing() ? 5 : 1000; } -extern "C" void emitMessage (j_common_ptr cinfo, int msg_level) +extern "C" { + +static void emitMessage (j_common_ptr cinfo, int msg_level) { if (msg_level < 0) { @@ -93,6 +99,8 @@ extern "C" void emitMessage (j_common_ptr cinfo, int msg_level) cinfo->err->output_message(cinfo); } +} + class JpegDecompressOwner { public: @@ -139,7 +147,7 @@ struct JpegStuff std::vector<sal_uInt8> pCYMKBuffer; }; -void ReadJPEG(JpegStuff& rContext, JPEGReader* pJPEGReader, void* pInputStream, long* pLines, +static void ReadJPEG(JpegStuff& rContext, JPEGReader* pJPEGReader, void* pInputStream, long* pLines, Size const & previewSize, GraphicFilterImportFlags nImportFlags, BitmapScopedWriteAccess* ppAccess) { |