bump product version to 7.2.5.1
[LibreOffice.git] / vcl / workben / ww6fuzzer.cxx
bloba17be9105a0663e923863992c07ea9cbab97f792
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 <vcl/FilterConfigItem.hxx>
12 #include "commonfuzzer.hxx"
14 #include <config_features.h>
15 #include <osl/detail/component-mapping.h>
17 extern "C" {
18 void * i18npool_component_getFactory( const char* , void* , void* );
20 void * com_sun_star_comp_framework_Desktop_get_implementation( void *, void * );
21 void * com_sun_star_i18n_LocaleDataImpl_get_implementation( void *, void * );
22 void * com_sun_star_i18n_BreakIterator_Unicode_get_implementation( void *, void * );
23 void * com_sun_star_i18n_BreakIterator_get_implementation( void *, void * );
24 void * SfxDocumentMetaData_get_implementation( void *, void * );
25 void * com_sun_star_i18n_CharacterClassification_Unicode_get_implementation( void *, void * );
26 void * com_sun_star_i18n_CharacterClassification_get_implementation( void *, void * );
27 void * com_sun_star_i18n_NativeNumberSupplier_get_implementation( void *, void * );
28 void * com_sun_star_i18n_NumberFormatCodeMapper_get_implementation( void *, void * );
29 void * com_sun_star_comp_graphic_GraphicProvider_get_implementation( void *, void * );
30 void * IndexedPropertyValuesContainer_get_implementation( void *, void * );
31 void * com_sun_star_comp_uui_UUIInteractionHandler_get_implementation( void *, void * );
32 void * com_sun_star_comp_comphelper_OPropertyBag( void *, void * );
33 void * com_sun_star_i18n_Transliteration_get_implementation( void *, void * );
34 void * com_sun_star_text_DefaultNumberingProvider_get_implementation( void *, void * );
35 void * com_sun_star_comp_uri_UriReferenceFactory_get_implementation( void *, void * );
36 void * emfio_emfreader_XEmfParser_get_implementation( void *, void * );
37 void * i18npool_CalendarImpl_get_implementation(void*, void*);
38 void * i18npool_Calendar_gregorian_get_implementation( void *, void * );
39 void * unoxml_rdfRepository_get_implementation( void *, void * );
40 void * unoxml_CURI_get_implementation( void *, void * );
41 void * unoxml_CLiteral_get_implementation( void *, void * );
42 void * unoxml_CBlankNode_get_implementation( void *, void * );
43 void * unoxml_CXPathAPI_get_implementation( void *, void * );
44 void * unoxml_CSAXDocumentBuilder_get_implementation( void *, void * );
45 void * unoxml_CDocumentBuilder_get_implementation( void *, void * );
46 void * ucb_UcbCommandEnvironment_get_implementation( void *, void * );
47 void * ucb_UcbContentProviderProxyFactory_get_implementation( void *, void * );
48 void * ucb_UcbPropertiesManager_get_implementation( void *, void * );
49 void * ucb_UcbStore_get_implementation( void *, void * );
50 void * ucb_UniversalContentBroker_get_implementation( void *, void * );
51 void * ucb_OFileAccess_get_implementation( void *, void * );
54 const lib_to_factory_mapping *
55 lo_get_factory_map(void)
57 static lib_to_factory_mapping map[] = {
58 { "libi18npoollo.a", i18npool_component_getFactory },
59 { 0, 0 }
62 return map;
65 const lib_to_constructor_mapping *
66 lo_get_constructor_map(void)
68 static lib_to_constructor_mapping map[] = {
69 { "com_sun_star_comp_framework_Desktop_get_implementation", com_sun_star_comp_framework_Desktop_get_implementation },
70 { "com_sun_star_i18n_LocaleDataImpl_get_implementation", com_sun_star_i18n_LocaleDataImpl_get_implementation },
71 { "com_sun_star_i18n_BreakIterator_Unicode_get_implementation", com_sun_star_i18n_BreakIterator_Unicode_get_implementation },
72 { "com_sun_star_i18n_BreakIterator_get_implementation", com_sun_star_i18n_BreakIterator_get_implementation },
73 { "SfxDocumentMetaData_get_implementation", SfxDocumentMetaData_get_implementation },
74 { "com_sun_star_i18n_CharacterClassification_Unicode_get_implementation", com_sun_star_i18n_CharacterClassification_Unicode_get_implementation },
75 { "com_sun_star_i18n_CharacterClassification_get_implementation", com_sun_star_i18n_CharacterClassification_get_implementation },
76 { "com_sun_star_i18n_NativeNumberSupplier_get_implementation", com_sun_star_i18n_NativeNumberSupplier_get_implementation },
77 { "com_sun_star_i18n_NumberFormatCodeMapper_get_implementation", com_sun_star_i18n_NumberFormatCodeMapper_get_implementation },
78 { "com_sun_star_comp_graphic_GraphicProvider_get_implementation", com_sun_star_comp_graphic_GraphicProvider_get_implementation },
79 { "IndexedPropertyValuesContainer_get_implementation", IndexedPropertyValuesContainer_get_implementation },
80 { "com_sun_star_comp_uui_UUIInteractionHandler_get_implementation", com_sun_star_comp_uui_UUIInteractionHandler_get_implementation },
81 { "com_sun_star_comp_comphelper_OPropertyBag", com_sun_star_comp_comphelper_OPropertyBag },
82 { "com_sun_star_i18n_Transliteration_get_implementation", com_sun_star_i18n_Transliteration_get_implementation },
83 { "com_sun_star_text_DefaultNumberingProvider_get_implementation", com_sun_star_text_DefaultNumberingProvider_get_implementation },
84 { "com_sun_star_comp_uri_UriReferenceFactory_get_implementation", com_sun_star_comp_uri_UriReferenceFactory_get_implementation},
85 { "emfio_emfreader_XEmfParser_get_implementation", emfio_emfreader_XEmfParser_get_implementation},
86 { "i18npool_CalendarImpl_get_implementation", i18npool_CalendarImpl_get_implementation },
87 { "i18npool_Calendar_gregorian_get_implementation", i18npool_Calendar_gregorian_get_implementation},
88 { "unoxml_rdfRepository_get_implementation", unoxml_rdfRepository_get_implementation },
89 { "unoxml_CURI_get_implementation", unoxml_CURI_get_implementation },
90 { "unoxml_CLiteral_get_implementation", unoxml_CLiteral_get_implementation },
91 { "unoxml_CBlankNode_get_implementation", unoxml_CBlankNode_get_implementation },
92 { "unoxml_CXPathAPI_get_implementation", unoxml_CXPathAPI_get_implementation },
93 { "unoxml_CSAXDocumentBuilder_get_implementation", unoxml_CSAXDocumentBuilder_get_implementation },
94 { "unoxml_CDocumentBuilder_get_implementation", unoxml_CDocumentBuilder_get_implementation },
95 { "ucb_UcbCommandEnvironment_get_implementation", ucb_UcbCommandEnvironment_get_implementation, },
96 { "ucb_UcbContentProviderProxyFactory_get_implementation", ucb_UcbContentProviderProxyFactory_get_implementation },
97 { "ucb_UcbPropertiesManager_get_implementation", ucb_UcbPropertiesManager_get_implementation },
98 { "ucb_UcbStore_get_implementation", ucb_UcbStore_get_implementation },
99 { "ucb_UniversalContentBroker_get_implementation", ucb_UniversalContentBroker_get_implementation },
100 { "ucb_OFileAccess_get_implementation", ucb_OFileAccess_get_implementation },
101 { 0, 0 }
104 return map;
107 extern "C" void* lo_get_custom_widget_func(const char*)
109 return nullptr;
112 extern "C" void* SwCreateDialogFactory()
114 return nullptr;
117 extern "C" bool TestImportWW6(SvStream &rStream);
119 extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv)
121 TypicalFuzzerInitialize(argc, argv);
122 return 0;
125 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
127 SvMemoryStream aStream(const_cast<uint8_t*>(data), size, StreamMode::READ);
128 (void)TestImportWW6(aStream);
129 return 0;
132 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */