Version 6.4.0.0.beta1, tag libreoffice-6.4.0.0.beta1
[LibreOffice.git] / vcl / workben / diffuzzer.cxx
blobc9bc77a16e99c514e8f47fc78ec8a9e7d2014794
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
10 #include <tools/stream.hxx>
11 #include "commonfuzzer.hxx"
13 #include <config_features.h>
14 #include <osl/detail/component-mapping.h>
16 extern "C" {
17 void* i18npool_component_getFactory(const char*, void*, void*);
19 void* com_sun_star_i18n_LocaleDataImpl_get_implementation(void*, void*);
20 void* com_sun_star_i18n_BreakIterator_Unicode_get_implementation(void*, void*);
21 void* com_sun_star_i18n_BreakIterator_get_implementation(void*, void*);
22 void* com_sun_star_comp_framework_Desktop_get_implementation(void*, void*);
23 void* com_sun_star_i18n_CharacterClassification_Unicode_get_implementation(void*, void*);
24 void* com_sun_star_i18n_CharacterClassification_get_implementation(void*, void*);
25 void* com_sun_star_i18n_Collator_get_implementation(void*, void*);
26 void* com_sun_star_i18n_NativeNumberSupplier_get_implementation(void*, void*);
27 void* com_sun_star_i18n_NumberFormatCodeMapper_get_implementation(void*, void*);
28 void* com_sun_star_i18n_Transliteration_get_implementation(void*, void*);
31 const lib_to_factory_mapping* lo_get_factory_map(void)
33 static lib_to_factory_mapping map[]
34 = { { "libi18npoollo.a", i18npool_component_getFactory }, { 0, 0 } };
36 return map;
39 const lib_to_constructor_mapping* lo_get_constructor_map(void)
41 static lib_to_constructor_mapping map[]
42 = { { "com_sun_star_i18n_LocaleDataImpl_get_implementation",
43 com_sun_star_i18n_LocaleDataImpl_get_implementation },
44 { "com_sun_star_i18n_BreakIterator_Unicode_get_implementation",
45 com_sun_star_i18n_BreakIterator_Unicode_get_implementation },
46 { "com_sun_star_i18n_BreakIterator_get_implementation",
47 com_sun_star_i18n_BreakIterator_get_implementation },
48 { "com_sun_star_comp_framework_Desktop_get_implementation",
49 com_sun_star_comp_framework_Desktop_get_implementation },
50 { "com_sun_star_i18n_CharacterClassification_Unicode_get_implementation",
51 com_sun_star_i18n_CharacterClassification_Unicode_get_implementation },
52 { "com_sun_star_i18n_CharacterClassification_get_implementation",
53 com_sun_star_i18n_CharacterClassification_get_implementation },
54 { "com_sun_star_i18n_Collator_get_implementation",
55 com_sun_star_i18n_Collator_get_implementation },
56 { "com_sun_star_i18n_NativeNumberSupplier_get_implementation",
57 com_sun_star_i18n_NativeNumberSupplier_get_implementation },
58 { "com_sun_star_i18n_NumberFormatCodeMapper_get_implementation",
59 com_sun_star_i18n_NumberFormatCodeMapper_get_implementation },
60 { "com_sun_star_i18n_Transliteration_get_implementation",
61 com_sun_star_i18n_Transliteration_get_implementation },
62 { 0, 0 } };
64 return map;
67 extern "C" void* lo_get_custom_widget_func(const char*) { return nullptr; }
69 extern "C" void* ScCreateDialogFactory() { return nullptr; }
71 extern "C" bool TestImportDIF(SvStream& rStream);
73 extern "C" int LLVMFuzzerInitialize(int* argc, char*** argv)
75 TypicalFuzzerInitialize(argc, argv);
76 return 0;
79 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
81 SvMemoryStream aStream(const_cast<uint8_t*>(data), size, StreamMode::READ);
82 (void)TestImportDIF(aStream);
83 return 0;
86 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */