diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2021-02-15 11:35:38 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2021-02-17 09:55:46 +0100 |
commit | d3476d27ab77160dcd737194fc13081ee297db16 (patch) | |
tree | 2d4fcbe510eae4bafeda332d7ba0093f248cc622 /vcl/workben | |
parent | 9d161857f1d4afcb772b477455797a2da0e47a9b (diff) |
Move DXF reader from filter module into VCL
Change-Id: If1a933256401c1a971f581d1b389ca06fd77eaae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111022
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl/workben')
-rw-r--r-- | vcl/workben/dxffuzzer.cxx | 5 | ||||
-rw-r--r-- | vcl/workben/fftester.cxx | 14 |
2 files changed, 5 insertions, 14 deletions
diff --git a/vcl/workben/dxffuzzer.cxx b/vcl/workben/dxffuzzer.cxx index 6ca526a1d8cf..8768072c93fb 100644 --- a/vcl/workben/dxffuzzer.cxx +++ b/vcl/workben/dxffuzzer.cxx @@ -10,6 +10,7 @@ #include <tools/stream.hxx> #include <vcl/FilterConfigItem.hxx> #include "commonfuzzer.hxx" +#include <filter/DxfReader.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 idxGraphicImport(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)idxGraphicImport(aStream, aGraphic, nullptr); + (void)ImportDxfGraphic(aStream, aGraphic); return 0; } diff --git a/vcl/workben/fftester.cxx b/vcl/workben/fftester.cxx index 45deeee37169..5dafd12be683 100644 --- a/vcl/workben/fftester.cxx +++ b/vcl/workben/fftester.cxx @@ -52,6 +52,7 @@ #include <filter/PsdReader.hxx> #include <filter/PcdReader.hxx> #include <filter/PbmReader.hxx> +#include <filter/DxfReader.hxx> #include <osl/file.hxx> #include <osl/module.hxx> #include <tools/stream.hxx> @@ -165,7 +166,6 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) SvFileStream aFileStream(out, StreamMode::READ); ReadGDIMetaFile(aFileStream, aGDIMetaFile); } -#ifndef DISABLE_DYNLOADING else if (strcmp(argv[2], "pcd") == 0) { Graphic aGraphic; @@ -174,18 +174,9 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) } else if (strcmp(argv[2], "dxf") == 0) { - static PFilterCall pfnImport(nullptr); - if (!pfnImport) - { - osl::Module aLibrary; - aLibrary.loadRelative(&thisModule, "libgielo.so"); - pfnImport = reinterpret_cast<PFilterCall>( - aLibrary.getFunctionSymbol("idxGraphicImport")); - aLibrary.release(); - } Graphic aGraphic; SvFileStream aFileStream(out, StreamMode::READ); - ret = static_cast<int>((*pfnImport)(aFileStream, aGraphic, nullptr)); + ret = static_cast<int>(ImportDxfGraphic(aFileStream, aGraphic)); } else if (strcmp(argv[2], "met") == 0) { @@ -241,6 +232,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) SvFileStream aFileStream(out, StreamMode::READ); ret = static_cast<int>(ImportTiffGraphicImport(aFileStream, aGraphic)); } +#ifndef DISABLE_DYNLOADING else if ((strcmp(argv[2], "doc") == 0) || (strcmp(argv[2], "ww8") == 0)) { static FFilterCall pfnImport(nullptr); |