summaryrefslogtreecommitdiff
path: root/vcl/workben
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2021-02-14 22:26:00 +0900
committerTomaž Vajngerl <quikee@gmail.com>2021-02-17 02:43:45 +0100
commit4d22e3ce32959d795a90653807c1c19cc9c1838e (patch)
tree2c643edebb6d967ad38800c05b63de584c1a72ff /vcl/workben
parent246af1d40ec515fe31ef2ac3375401c3fe284157 (diff)
Move PICT reader from filter module into VCL
Change-Id: I6d3a28769ff3bffa3970a4ab6ab2384bb0aebbca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111011 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl/workben')
-rw-r--r--vcl/workben/fftester.cxx12
-rw-r--r--vcl/workben/pctfuzzer.cxx5
2 files changed, 4 insertions, 13 deletions
diff --git a/vcl/workben/fftester.cxx b/vcl/workben/fftester.cxx
index f2e0d51b0c74..443456299434 100644
--- a/vcl/workben/fftester.cxx
+++ b/vcl/workben/fftester.cxx
@@ -44,6 +44,7 @@
#include <fltcall.hxx>
#include <filter/TiffReader.hxx>
#include <filter/TgaReader.hxx>
+#include <filter/PictReader.hxx>
#include <osl/file.hxx>
#include <osl/module.hxx>
#include <tools/stream.hxx>
@@ -250,18 +251,9 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
}
else if (strcmp(argv[2], "pct") == 0)
{
- static PFilterCall pfnImport(nullptr);
- if (!pfnImport)
- {
- osl::Module aLibrary;
- aLibrary.loadRelative(&thisModule, "libgielo.so");
- pfnImport = reinterpret_cast<PFilterCall>(
- aLibrary.getFunctionSymbol("iptGraphicImport"));
- aLibrary.release();
- }
Graphic aGraphic;
SvFileStream aFileStream(out, StreamMode::READ);
- ret = static_cast<int>((*pfnImport)(aFileStream, aGraphic, nullptr));
+ ret = static_cast<int>(ImportPictGraphic(aFileStream, aGraphic));
}
else if (strcmp(argv[2], "pcx") == 0)
{
diff --git a/vcl/workben/pctfuzzer.cxx b/vcl/workben/pctfuzzer.cxx
index a916920c4b9f..db1ad0c90c30 100644
--- a/vcl/workben/pctfuzzer.cxx
+++ b/vcl/workben/pctfuzzer.cxx
@@ -10,6 +10,7 @@
#include <tools/stream.hxx>
#include <vcl/FilterConfigItem.hxx>
#include "commonfuzzer.hxx"
+#include <filter/PictReader.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 iptGraphicImport(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)iptGraphicImport(aStream, aGraphic, nullptr);
+ (void)ImportPictGraphic(aStream, aGraphic);
return 0;
}