diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2021-02-15 10:23:27 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2021-02-17 05:54:36 +0100 |
commit | 68012eaaab9968f6ccfdfc018bcc5befa36a7a2f (patch) | |
tree | 4e8bb8efdcca069906f0d1c9d87cc8cc2daf6d8b /vcl/workben | |
parent | d338dc277d7dbe381d669728e30a1c2606a4814a (diff) |
Move PCD reader from filter module into VCL
Change-Id: Icd23d1343f5231c09dd8197943ca472f4b573bfc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111018
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl/workben')
-rw-r--r-- | vcl/workben/fftester.cxx | 12 | ||||
-rw-r--r-- | vcl/workben/pcdfuzzer.cxx | 5 |
2 files changed, 4 insertions, 13 deletions
diff --git a/vcl/workben/fftester.cxx b/vcl/workben/fftester.cxx index fe030475e3f8..02dc6d90eb21 100644 --- a/vcl/workben/fftester.cxx +++ b/vcl/workben/fftester.cxx @@ -50,6 +50,7 @@ #include <filter/PcxReader.hxx> #include <filter/EpsReader.hxx> #include <filter/PsdReader.hxx> +#include <filter/PcdReader.hxx> #include <osl/file.hxx> #include <osl/module.hxx> #include <tools/stream.hxx> @@ -166,18 +167,9 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) #ifndef DISABLE_DYNLOADING else if (strcmp(argv[2], "pcd") == 0) { - static PFilterCall pfnImport(nullptr); - if (!pfnImport) - { - osl::Module aLibrary; - aLibrary.loadRelative(&thisModule, "libgielo.so"); - pfnImport = reinterpret_cast<PFilterCall>( - aLibrary.getFunctionSymbol("icdGraphicImport")); - aLibrary.release(); - } Graphic aGraphic; SvFileStream aFileStream(out, StreamMode::READ); - ret = static_cast<int>((*pfnImport)(aFileStream, aGraphic, nullptr)); + ret = static_cast<int>(ImportPcdGraphic(aFileStream, aGraphic, nullptr)); } else if (strcmp(argv[2], "dxf") == 0) { diff --git a/vcl/workben/pcdfuzzer.cxx b/vcl/workben/pcdfuzzer.cxx index ccd0367535be..86df131da1cc 100644 --- a/vcl/workben/pcdfuzzer.cxx +++ b/vcl/workben/pcdfuzzer.cxx @@ -10,6 +10,7 @@ #include <tools/stream.hxx> #include <vcl/FilterConfigItem.hxx> #include "commonfuzzer.hxx" +#include <filter/PcdReader.hxx> #include <config_features.h> #include <osl/detail/component-mapping.h> @@ -39,8 +40,6 @@ extern "C" void* lo_get_custom_widget_func(const char*) return nullptr; } -extern "C" bool icdGraphicImport(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<uint8_t*>(data), size, StreamMode::READ); Graphic aGraphic; - (void)icdGraphicImport(aStream, aGraphic, nullptr); + (void)ImportPcdGraphic(aStream, aGraphic, nullptr); return 0; } |