From d338dc277d7dbe381d669728e30a1c2606a4814a Mon Sep 17 00:00:00 2001 From: Tomaž Vajngerl Date: Mon, 15 Feb 2021 09:57:51 +0900 Subject: Move PSD reader from filter module into VCL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I53b11be6e9eb0013f017b2da5745ff525ca79c54 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111017 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl --- vcl/workben/fftester.cxx | 12 ++---------- vcl/workben/psdfuzzer.cxx | 5 ++--- 2 files changed, 4 insertions(+), 13 deletions(-) (limited to 'vcl/workben') diff --git a/vcl/workben/fftester.cxx b/vcl/workben/fftester.cxx index c6c2754d4dc6..fe030475e3f8 100644 --- a/vcl/workben/fftester.cxx +++ b/vcl/workben/fftester.cxx @@ -49,6 +49,7 @@ #include #include #include +#include #include #include #include @@ -216,18 +217,9 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) } else if (strcmp(argv[2], "psd") == 0) { - static PFilterCall pfnImport(nullptr); - if (!pfnImport) - { - osl::Module aLibrary; - aLibrary.loadRelative(&thisModule, "libgielo.so"); - pfnImport = reinterpret_cast( - aLibrary.getFunctionSymbol("ipdGraphicImport")); - aLibrary.release(); - } Graphic aGraphic; SvFileStream aFileStream(out, StreamMode::READ); - ret = static_cast((*pfnImport)(aFileStream, aGraphic, nullptr)); + ret = static_cast(ImportPsdGraphic(aFileStream, aGraphic)); } else if (strcmp(argv[2], "eps") == 0) { diff --git a/vcl/workben/psdfuzzer.cxx b/vcl/workben/psdfuzzer.cxx index a1bb1823d483..652fd1cd33fb 100644 --- a/vcl/workben/psdfuzzer.cxx +++ b/vcl/workben/psdfuzzer.cxx @@ -10,6 +10,7 @@ #include #include #include "commonfuzzer.hxx" +#include #include #include @@ -39,8 +40,6 @@ extern "C" void* lo_get_custom_widget_func(const char*) return nullptr; } -extern "C" bool ipdGraphicImport(SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pConfigItem); - extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv) { TypicalFuzzerInitialize(argc, argv); @@ -51,7 +50,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { SvMemoryStream aStream(const_cast(data), size, StreamMode::READ); Graphic aGraphic; - (void)ipdGraphicImport(aStream, aGraphic, nullptr); + (void)ImportPsdGraphic(aStream, aGraphic); return 0; } -- cgit