diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2021-02-15 00:08:02 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2021-02-17 04:02:41 +0100 |
commit | 509814d936461cb7690862eac8d6c88e9f412362 (patch) | |
tree | 4552c1b720aa49d595689b54be92e493df47fade /vcl/workben | |
parent | 1093c21ed9736368ecfb8f5c7935db31256671f0 (diff) |
Move EPS reader and writer from filter module into VCL
Change-Id: I1646f72d6a1db176e4520f8f64321646a26f054e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111016
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl/workben')
-rw-r--r-- | vcl/workben/epsfuzzer.cxx | 5 | ||||
-rw-r--r-- | vcl/workben/fftester.cxx | 12 |
2 files changed, 4 insertions, 13 deletions
diff --git a/vcl/workben/epsfuzzer.cxx b/vcl/workben/epsfuzzer.cxx index effb05193aa1..1de2c63afe7c 100644 --- a/vcl/workben/epsfuzzer.cxx +++ b/vcl/workben/epsfuzzer.cxx @@ -10,6 +10,7 @@ #include <tools/stream.hxx> #include <vcl/FilterConfigItem.hxx> #include "commonfuzzer.hxx" +#include <filter/EpsReader.hxx> #include <config_features.h> #include <osl/detail/component-mapping.h> @@ -48,8 +49,6 @@ extern "C" void* lo_get_custom_widget_func(const char*) return nullptr; } -extern "C" bool ipsGraphicImport(SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pConfigItem); - extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv) { TypicalFuzzerInitialize(argc, argv); @@ -60,7 +59,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)ipsGraphicImport(aStream, aGraphic, nullptr); + (void)ImportEpsGraphic(aStream, aGraphic); return 0; } diff --git a/vcl/workben/fftester.cxx b/vcl/workben/fftester.cxx index 893565e457d3..c6c2754d4dc6 100644 --- a/vcl/workben/fftester.cxx +++ b/vcl/workben/fftester.cxx @@ -48,6 +48,7 @@ #include <filter/MetReader.hxx> #include <filter/RasReader.hxx> #include <filter/PcxReader.hxx> +#include <filter/EpsReader.hxx> #include <osl/file.hxx> #include <osl/module.hxx> #include <tools/stream.hxx> @@ -230,18 +231,9 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) } else if (strcmp(argv[2], "eps") == 0) { - static PFilterCall pfnImport(nullptr); - if (!pfnImport) - { - osl::Module aLibrary; - aLibrary.loadRelative(&thisModule, "libgielo.so"); - pfnImport = reinterpret_cast<PFilterCall>( - aLibrary.getFunctionSymbol("ipsGraphicImport")); - aLibrary.release(); - } Graphic aGraphic; SvFileStream aFileStream(out, StreamMode::READ); - ret = static_cast<int>((*pfnImport)(aFileStream, aGraphic, nullptr)); + ret = static_cast<int>(ImportEpsGraphic(aFileStream, aGraphic)); } else if (strcmp(argv[2], "pct") == 0) { |