2013-12-19 15:32:54 +01:00
#!/usr/bin/python
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from __future__ import print_function
from optparse import OptionParser
2015-01-27 10:51:57 +01:00
import re
2015-01-27 00:53:28 +01:00
import sys
import xml . etree . ElementTree as ET
2013-12-23 17:44:57 +01:00
# foo_component_getFactory functions are split into groups, so that you could
2014-03-06 13:46:02 +01:00
# choose e.g. 'core' and 'writer' functionality and through factory_map,
2013-12-23 17:44:57 +01:00
# relevant function sections will be referenced in lo_get_factory_map().
# That prevents garbage collector to ignore them as unused.
2014-01-09 09:20:55 +01:00
# The same groups are used for constructor based implementations
# referenced in lo_get_constructor_map().
2013-12-23 17:44:57 +01:00
core_factory_list = [
2014-02-17 12:45:27 +02:00
( " libembobj.a " , " embobj_component_getFactory " ) ,
2015-02-09 10:12:57 +01:00
( " libevtattlo.a " , " evtatt_component_getFactory " ) ,
2013-12-23 17:44:57 +01:00
( " libcomphelper.a " , " comphelp_component_getFactory " ) ,
( " libconfigmgrlo.a " , " configmgr_component_getFactory " ) ,
2014-03-05 17:32:41 +02:00
( " libdrawinglayerlo.a " , " drawinglayer_component_getFactory " ) ,
2017-07-19 16:13:06 +01:00
( " libemfiolo.a " , " emfio_component_getFactory " ) ,
2013-12-23 17:44:57 +01:00
( " libfilterconfiglo.a " , " filterconfig1_component_getFactory " ) ,
( " libfsstoragelo.a " , " fsstorage_component_getFactory " ) ,
( " libhyphenlo.a " , " hyphen_component_getFactory " ) ,
2014-03-10 11:49:28 +02:00
( " libi18npoollo.a " , " i18npool_component_getFactory " ) ,
2015-01-29 12:36:56 +01:00
( " libi18nsearchlo.a " , " i18nsearch_component_getFactory " ) ,
2015-02-17 15:24:41 +01:00
( " libinvocadaptlo.a " , " invocadapt_component_getFactory " ) ,
2013-12-23 17:44:57 +01:00
( " liblnglo.a " , " lng_component_getFactory " ) ,
( " liblnthlo.a " , " lnth_component_getFactory " ) ,
( " liblocalebe1lo.a " , " localebe1_component_getFactory " ) ,
( " libpackage2.a " , " package2_component_getFactory " ) ,
2014-02-17 12:45:27 +02:00
( " libsmlo.a " , " sm_component_getFactory " ) ,
2014-01-17 13:36:56 +02:00
( " libsrtrs1.a " , " srtrs1_component_getFactory " ) ,
2014-07-01 15:22:42 +02:00
( " libstoragefdlo.a " , " storagefd_component_getFactory " ) ,
2013-12-23 17:44:57 +01:00
( " libucb1.a " , " ucb_component_getFactory " ) ,
( " libucpfile1.a " , " ucpfile_component_getFactory " ) ,
2014-01-17 13:36:56 +02:00
( " libucphier1.a " , " ucphier1_component_getFactory " ) ,
2014-08-13 11:17:40 +03:00
( " libucptdoc1lo.a " , " ucptdoc1_component_getFactory " ) ,
2013-12-23 17:44:57 +01:00
( " libunordflo.a " , " unordf_component_getFactory " ) ,
( " libunoxmllo.a " , " unoxml_component_getFactory " ) ,
( " libutllo.a " , " utl_component_getFactory " ) ,
2015-02-05 16:35:56 +01:00
( " libxoflo.a " , " xof_component_getFactory " ) ,
2013-12-23 17:44:57 +01:00
( " libxolo.a " , " xo_component_getFactory " ) ,
( " libxstor.a " , " xstor_component_getFactory " ) ,
2015-01-26 23:20:44 +01:00
( " libvclcanvaslo.a " , " vclcanvas_component_getFactory " ) ,
( " libmtfrendererlo.a " , " mtfrenderer_component_getFactory " ) ,
2015-10-02 09:08:54 +02:00
( " libxmlfdlo.a " , " xmlfd_component_getFactory " ) ,
( " libxmlfalo.a " , " xmlfa_component_getFactory " ) ,
( " libodfflatxmllo.a " , " odfflatxml_component_getFactory " ) ,
( " libxmlscriptlo.a " , " xmlscript_component_getFactory " ) ,
2017-04-25 11:40:54 +02:00
( " libmcnttype.a " , " mcnttype_component_getFactory " ) ,
2017-06-21 17:00:33 +05:30
( " libvcllo.a " , " vcl_component_getFactory " ) ,
2018-01-03 09:13:46 +01:00
( " libspelllo.a " , " spell_component_getFactory " ) ,
2018-08-07 06:28:58 -07:00
( " libpdffilterlo.a " , " pdffilter_component_getFactory " ) ,
2018-11-29 15:00:34 +02:00
( " libsvgiolo.a " , " svgio_component_getFactory " ) ,
2019-03-20 23:43:21 +02:00
( " libsvtlo.a " , " svt_component_getFactory " ) ,
2019-03-25 14:23:38 +02:00
( " libctllo.a " , " ctl_component_getFactory " ) ,
( " libMacOSXSpelllo.a " , " MacOSXSpell_component_getFactory " , " #ifdef IOS " ) ,
2013-12-23 17:44:57 +01:00
]
2014-01-09 09:20:55 +01:00
core_constructor_list = [
2015-03-12 10:29:37 +02:00
# canvas/source/factory/canvasfactory.component
" com_sun_star_comp_rendering_CanvasFactory_get_implementation " ,
2015-02-13 11:37:48 +01:00
# chart2/source/chartcore.component
2018-12-13 11:58:43 +02:00
" com_sun_star_chart2_ExponentialScaling_get_implementation " ,
2015-05-02 12:27:55 +02:00
" com_sun_star_chart2_LinearScaling_get_implementation " ,
2018-12-13 11:58:43 +02:00
" com_sun_star_chart2_LogarithmicScaling_get_implementation " ,
" com_sun_star_chart2_PowerScaling_get_implementation " ,
2015-02-13 11:37:48 +01:00
" com_sun_star_comp_chart_AreaChartType_get_implementation " ,
" com_sun_star_comp_chart_BarChartType_get_implementation " ,
" com_sun_star_comp_chart_BubbleChartType_get_implementation " ,
2018-12-13 11:58:43 +02:00
" com_sun_star_comp_chart_CachedDataSequence_get_implementation " ,
2015-02-13 11:37:48 +01:00
" com_sun_star_comp_chart_CandleStickChartType_get_implementation " ,
" com_sun_star_comp_chart_ChartTypeManager_get_implementation " ,
" com_sun_star_comp_chart_ColumnChartType_get_implementation " ,
" com_sun_star_comp_chart_DataSeries_get_implementation " ,
2015-05-02 12:27:55 +02:00
" com_sun_star_comp_chart_DataSource_get_implementation " ,
2015-02-13 11:37:48 +01:00
" com_sun_star_comp_chart_FilledNetChartType_get_implementation " ,
" com_sun_star_comp_chart_FormattedString_get_implementation " ,
2018-12-13 11:58:43 +02:00
" com_sun_star_comp_chart_InternalDataProvider_get_implementation " ,
2015-02-13 11:37:48 +01:00
" com_sun_star_comp_chart_LineChartType_get_implementation " ,
" com_sun_star_comp_chart_NetChartType_get_implementation " ,
" com_sun_star_comp_chart_PieChartType_get_implementation " ,
" com_sun_star_comp_chart_ScatterChartType_get_implementation " ,
" com_sun_star_comp_chart2_Axis_get_implementation " ,
2018-12-13 11:21:43 +02:00
" com_sun_star_comp_chart2_CartesianCoordinateSystem2d_get_implementation " ,
2018-12-13 11:58:43 +02:00
" com_sun_star_comp_chart2_CartesianCoordinateSystem3d_get_implementation " ,
2015-05-02 12:27:55 +02:00
" com_sun_star_comp_chart2_ChartController_get_implementation " ,
" com_sun_star_comp_chart2_ChartDocumentWrapper_get_implementation " ,
2015-02-13 11:37:48 +01:00
" com_sun_star_comp_chart2_ChartModel_get_implementation " ,
2018-12-13 11:58:43 +02:00
" com_sun_star_comp_chart2_ChartView_get_implementation " ,
" com_sun_star_comp_chart2_ConfigDefaultColorScheme_get_implementation " ,
2015-02-13 11:37:48 +01:00
" com_sun_star_comp_chart2_Diagram_get_implementation " ,
2015-05-02 12:27:55 +02:00
" com_sun_star_comp_chart2_ErrorBar_get_implementation " ,
2018-12-13 11:58:43 +02:00
" com_sun_star_comp_chart2_ExponentialRegressionCurve_get_implementation " ,
" com_sun_star_comp_chart2_GridProperties_get_implementation " ,
2015-02-13 11:37:48 +01:00
" com_sun_star_comp_chart2_LabeledDataSequence_get_implementation " ,
" com_sun_star_comp_chart2_Legend_get_implementation " ,
2015-02-23 11:58:13 +01:00
" com_sun_star_comp_chart2_LinearRegressionCurve_get_implementation " ,
2018-12-13 11:58:43 +02:00
" com_sun_star_comp_chart2_LogarithmicRegressionCurve_get_implementation " ,
" com_sun_star_comp_chart2_MeanValueRegressionCurve_get_implementation " ,
" com_sun_star_comp_chart2_MovingAverageRegressionCurve_get_implementation " ,
" com_sun_star_comp_chart2_PageBackground_get_implementation " ,
2015-05-02 12:27:55 +02:00
" com_sun_star_comp_chart2_PolarCoordinateSystem2d_get_implementation " ,
" com_sun_star_comp_chart2_PolarCoordinateSystem3d_get_implementation " ,
" com_sun_star_comp_chart2_PolynomialRegressionCurve_get_implementation " ,
" com_sun_star_comp_chart2_PotentialRegressionCurve_get_implementation " ,
" com_sun_star_comp_chart2_RegressionEquation_get_implementation " ,
2015-02-23 11:58:13 +01:00
" com_sun_star_comp_chart2_Title_get_implementation " ,
2015-02-13 11:37:48 +01:00
" com_sun_star_comp_chart2_XMLFilter_get_implementation " ,
2014-04-25 12:50:27 +03:00
# chart2/source/controller/chartcontroller.component
" com_sun_star_comp_chart2_ChartDocumentWrapper_get_implementation " ,
2015-05-02 12:27:55 +02:00
" com_sun_star_comp_chart2_ChartFrameLoader_get_implementation " ,
2016-03-22 23:40:19 +01:00
# comphelper/util/comphelp.component
2016-04-11 13:06:11 +03:00
" com_sun_star_comp_MemoryStream " ,
2016-03-22 23:40:19 +01:00
" com_sun_star_comp_task_OfficeRestartManager " ,
2018-12-03 15:16:48 +02:00
" AnyCompareFactory_get_implementation " ,
2016-03-22 23:40:19 +01:00
" IndexedPropertyValuesContainer_get_implementation " ,
" NamedPropertyValuesContainer_get_implementation " ,
2016-07-02 17:23:21 +02:00
" com_sun_star_comp_comphelper_OPropertyBag " ,
2016-05-01 15:56:57 +03:00
" com_sun_star_comp_SequenceInputStreamService " ,
" com_sun_star_comp_SequenceOutputStreamService " ,
2018-12-03 15:16:48 +02:00
" com_sun_star_comp_util_OfficeInstallationDirectories " ,
2015-02-11 10:33:40 +01:00
# dbaccess/util/dba.component
2016-12-17 15:49:26 +00:00
( " com_sun_star_comp_dba_ORowSet_get_implementation " , " #if HAVE_FEATURE_DBCONNECTIVITY " ) ,
2015-02-09 10:12:57 +01:00
# forms/util/frm.component
2016-12-19 12:04:12 +00:00
( " com_sun_star_comp_forms_FormOperations_get_implementation " , " #if HAVE_FEATURE_DBCONNECTIVITY " ) ,
( " com_sun_star_comp_forms_ODatabaseForm_get_implementation " , " #if HAVE_FEATURE_DBCONNECTIVITY " ) ,
( " com_sun_star_comp_forms_OFormattedFieldWrapper_ForcedFormatted_get_implementation " , " #if HAVE_FEATURE_DBCONNECTIVITY " ) ,
( " com_sun_star_comp_forms_ORichTextModel_get_implementation " , " #if HAVE_FEATURE_DBCONNECTIVITY " ) ,
( " com_sun_star_comp_forms_OScrollBarModel_get_implementation " , " #if HAVE_FEATURE_DBCONNECTIVITY " ) ,
( " com_sun_star_comp_forms_OSpinButtonModel_get_implementation " , " #if HAVE_FEATURE_DBCONNECTIVITY " ) ,
( " com_sun_star_form_Model_get_implementation " , " #if HAVE_FEATURE_DBCONNECTIVITY " ) ,
( " com_sun_star_form_OButtonControl_get_implementation " , " #if HAVE_FEATURE_DBCONNECTIVITY " ) ,
( " com_sun_star_form_OButtonModel_get_implementation " , " #if HAVE_FEATURE_DBCONNECTIVITY " ) ,
( " com_sun_star_form_OCheckBoxControl_get_implementation " , " #if HAVE_FEATURE_DBCONNECTIVITY " ) ,
( " com_sun_star_form_OCheckBoxModel_get_implementation " , " #if HAVE_FEATURE_DBCONNECTIVITY " ) ,
( " com_sun_star_form_OComboBoxControl_get_implementation " , " #if HAVE_FEATURE_DBCONNECTIVITY " ) ,
( " com_sun_star_form_OComboBoxModel_get_implementation " , " #if HAVE_FEATURE_DBCONNECTIVITY " ) ,
( " com_sun_star_form_ODateControl_get_implementation " , " #if HAVE_FEATURE_DBCONNECTIVITY " ) ,
( " com_sun_star_form_ODateModel_get_implementation " , " #if HAVE_FEATURE_DBCONNECTIVITY " ) ,
( " com_sun_star_form_OEditControl_get_implementation " , " #if HAVE_FEATURE_DBCONNECTIVITY " ) ,
( " com_sun_star_form_OEditModel_get_implementation " , " #if HAVE_FEATURE_DBCONNECTIVITY " ) ,
( " com_sun_star_form_OFixedTextModel_get_implementation " , " #if HAVE_FEATURE_DBCONNECTIVITY " ) ,
( " com_sun_star_form_OFormsCollection_get_implementation " , " #if HAVE_FEATURE_DBCONNECTIVITY " ) ,
( " com_sun_star_form_OGridControlModel_get_implementation " , " #if HAVE_FEATURE_DBCONNECTIVITY " ) ,
( " com_sun_star_form_OGroupBoxModel_get_implementation " , " #if HAVE_FEATURE_DBCONNECTIVITY " ) ,
( " com_sun_star_form_OListBoxModel_get_implementation " , " #if HAVE_FEATURE_DBCONNECTIVITY " ) ,
( " com_sun_star_form_ONumericModel_get_implementation " , " #if HAVE_FEATURE_DBCONNECTIVITY " ) ,
( " com_sun_star_form_ORadioButtonModel_get_implementation " , " #if HAVE_FEATURE_DBCONNECTIVITY " ) ,
( " com_sun_star_form_XForms_get_implementation " , " #if HAVE_FEATURE_DBCONNECTIVITY " ) ,
2014-01-17 14:41:10 +01:00
# framework/util/fwk.component
2014-01-21 15:08:26 +02:00
" com_sun_star_comp_framework_AutoRecovery_get_implementation " ,
2014-01-16 22:30:54 +01:00
" com_sun_star_comp_framework_Desktop_get_implementation " ,
2015-05-02 12:27:55 +02:00
" com_sun_star_comp_framework_DocumentAcceleratorConfiguration_get_implementation " ,
2014-01-21 15:11:24 +02:00
" com_sun_star_comp_framework_Frame_get_implementation " ,
2015-05-02 12:27:55 +02:00
" com_sun_star_comp_framework_GlobalAcceleratorConfiguration_get_implementation " ,
2014-01-21 15:08:26 +02:00
" com_sun_star_comp_framework_JobExecutor_get_implementation " ,
2014-01-21 15:11:24 +02:00
" com_sun_star_comp_framework_LayoutManager_get_implementation " ,
" com_sun_star_comp_framework_ModuleManager_get_implementation " ,
2014-01-29 15:22:09 +02:00
" com_sun_star_comp_framework_ModuleUIConfigurationManager_get_implementation " ,
2014-02-11 09:23:57 +02:00
" com_sun_star_comp_framework_ModuleUIConfigurationManagerSupplier_get_implementation " ,
2014-01-23 18:58:18 +02:00
" com_sun_star_comp_framework_PathSettings_get_implementation " ,
2014-01-09 19:36:11 +01:00
" com_sun_star_comp_framework_PathSubstitution_get_implementation " ,
2014-01-21 15:08:26 +02:00
" com_sun_star_comp_framework_StatusIndicatorFactory_get_implementation " ,
2014-01-09 17:32:35 +01:00
" com_sun_star_comp_framework_TaskCreator_get_implementation " ,
2014-01-29 15:22:09 +02:00
" com_sun_star_comp_framework_ToolBarControllerFactory_get_implementation " ,
" com_sun_star_comp_framework_UIConfigurationManager_get_implementation " ,
" com_sun_star_comp_framework_UIElementFactoryManager_get_implementation " ,
2014-01-21 15:11:24 +02:00
" com_sun_star_comp_framework_URLTransformer_get_implementation " ,
2014-01-09 16:38:11 +01:00
" com_sun_star_comp_framework_WindowStateConfiguration_get_implementation " ,
2015-01-29 15:48:34 +01:00
" com_sun_star_comp_framework_ModuleAcceleratorConfiguration_get_implementation " ,
2014-02-11 14:18:10 +01:00
" org_apache_openoffice_comp_framework_ContextChangeEventMultiplexer_get_implementation " ,
2014-01-27 08:29:52 +01:00
# i18npool/util/i18npool.component
" com_sun_star_i18n_BreakIterator_get_implementation " ,
" com_sun_star_i18n_BreakIterator_Unicode_get_implementation " ,
" com_sun_star_i18n_CharacterClassification_get_implementation " ,
" com_sun_star_i18n_CharacterClassification_Unicode_get_implementation " ,
2014-03-31 20:58:54 +03:00
" com_sun_star_i18n_Collator_get_implementation " ,
2014-01-27 08:29:52 +01:00
" com_sun_star_i18n_LocaleDataImpl_get_implementation " ,
2015-05-02 12:27:55 +02:00
" com_sun_star_i18n_NativeNumberSupplier_get_implementation " ,
2014-01-27 08:29:52 +01:00
" com_sun_star_i18n_NumberFormatCodeMapper_get_implementation " ,
" com_sun_star_i18n_Transliteration_get_implementation " ,
" com_sun_star_i18n_Transliteration_IGNORE_CASE_get_implementation " ,
" com_sun_star_i18n_Transliteration_IGNORE_KANA_get_implementation " ,
" com_sun_star_i18n_Transliteration_IGNORE_WIDTH_get_implementation " ,
" com_sun_star_text_DefaultNumberingProvider_get_implementation " ,
2014-01-09 09:20:55 +01:00
# sax/source/expatwrap/expwrap.component
2014-01-15 20:00:41 +02:00
" com_sun_star_comp_extensions_xml_sax_FastParser_get_implementation " ,
2014-01-21 15:11:24 +02:00
" com_sun_star_comp_extensions_xml_sax_ParserExpat_get_implementation " ,
2014-02-17 12:45:27 +02:00
" com_sun_star_extensions_xml_sax_Writer_get_implementation " ,
2014-01-17 10:30:06 +01:00
# sfx2/util/sfx.component
2014-01-21 15:11:24 +02:00
" SfxDocumentMetaData_get_implementation " ,
" com_sun_star_comp_office_FrameLoader_get_implementation " ,
2015-02-21 22:52:01 +01:00
" com_sun_star_comp_sfx2_AppDispatchProvider_get_implementation " ,
2014-01-17 13:36:56 +02:00
" com_sun_star_comp_sfx2_DocumentTemplates_get_implementation " ,
2014-01-17 10:30:06 +01:00
" com_sun_star_comp_sfx2_GlobalEventBroadcaster_get_implementation " ,
2016-01-05 22:29:27 +01:00
# sot/util/sot.component
" com_sun_star_comp_embed_OLESimpleStorage " ,
2015-02-21 22:52:01 +01:00
# stoc/source/inspect/introspection.component
" com_sun_star_comp_stoc_Introspection_get_implementation " ,
2017-09-14 16:44:17 +01:00
# stoc/source/corereflection/reflection.component
" com_sun_star_comp_stoc_CoreReflection_get_implementation " ,
2015-02-21 22:52:01 +01:00
# stoc/util/stocservices.component
2015-05-02 12:27:55 +02:00
" com_sun_star_comp_stoc_OServiceManagerWrapper_get_implementation " ,
2015-02-21 22:52:01 +01:00
" com_sun_star_comp_stoc_TypeConverter_get_implementation " ,
" com_sun_star_comp_uri_ExternalUriReferenceTranslator_get_implementation " ,
" com_sun_star_comp_uri_UriReferenceFactory_get_implementation " ,
" com_sun_star_comp_uri_UriSchemeParser_vndDOTsunDOTstarDOTexpand_get_implementation " ,
2015-05-02 12:27:55 +02:00
" com_sun_star_comp_uri_UriSchemeParser_vndDOTsunDOTstarDOTscript_get_implementation " ,
2018-03-11 11:16:34 +09:00
# vcl/vcl.android.component
2014-02-17 12:45:27 +02:00
" com_sun_star_graphic_GraphicObject_get_implementation " ,
2014-01-09 09:20:55 +01:00
" com_sun_star_comp_graphic_GraphicProvider_get_implementation " ,
# svx/util/svx.component
2014-01-15 20:00:41 +02:00
" com_sun_star_drawing_EnhancedCustomShapeEngine_get_implementation " ,
2015-05-02 12:27:55 +02:00
" com_sun_star_drawing_SvxShapeCollection_get_implementation " ,
2014-02-17 12:45:27 +02:00
# svx/util/svxcore.component
2014-02-17 14:44:28 +02:00
" com_sun_star_comp_graphic_PrimitiveFactory2D_get_implementation " ,
" com_sun_star_comp_Draw_GraphicExporter_get_implementation " ,
2014-02-17 12:45:27 +02:00
" com_sun_star_comp_Svx_GraphicExportHelper_get_implementation " ,
2014-02-17 14:44:28 +02:00
" com_sun_star_comp_Svx_GraphicImportHelper_get_implementation " ,
2014-01-27 08:29:52 +01:00
# toolkit/util/tk.component
2015-02-17 15:24:41 +01:00
" stardiv_Toolkit_StdTabController_get_implementation " ,
2015-05-02 12:27:55 +02:00
" stardiv_Toolkit_UnoButtonControl_get_implementation " ,
2015-02-11 10:33:40 +01:00
" stardiv_Toolkit_UnoCheckBoxControl_get_implementation " ,
2015-02-05 18:07:05 +01:00
" stardiv_Toolkit_UnoComboBoxControl_get_implementation " ,
2015-05-02 12:27:55 +02:00
" stardiv_Toolkit_UnoControlButtonModel_get_implementation " ,
2015-02-09 10:12:57 +01:00
" stardiv_Toolkit_UnoControlCheckBoxModel_get_implementation " ,
2015-02-05 18:07:05 +01:00
" stardiv_Toolkit_UnoControlComboBoxModel_get_implementation " ,
2014-03-20 09:32:21 +02:00
" stardiv_Toolkit_UnoControlContainer_get_implementation " ,
" stardiv_Toolkit_UnoControlContainerModel_get_implementation " ,
2015-02-05 18:07:05 +01:00
" stardiv_Toolkit_UnoControlDateFieldModel_get_implementation " ,
2015-05-02 12:27:55 +02:00
" stardiv_Toolkit_UnoControlDialogModel_get_implementation " ,
" stardiv_Toolkit_UnoControlFixedTextModel_get_implementation " ,
" stardiv_Toolkit_UnoControlFormattedFieldModel_get_implementation " ,
" stardiv_Toolkit_UnoControlGroupBoxModel_get_implementation " ,
" stardiv_Toolkit_UnoControlListBoxModel_get_implementation " ,
" stardiv_Toolkit_UnoControlNumericFieldModel_get_implementation " ,
" stardiv_Toolkit_UnoControlRadioButtonModel_get_implementation " ,
" stardiv_Toolkit_UnoControlScrollBarModel_get_implementation " ,
" stardiv_Toolkit_UnoDateFieldControl_get_implementation " ,
" stardiv_Toolkit_UnoSpinButtonModel_get_implementation " ,
2015-02-02 23:34:16 +01:00
" stardiv_Toolkit_VCLXPointer_get_implementation " ,
2014-01-24 15:53:16 +02:00
" stardiv_Toolkit_VCLXToolkit_get_implementation " ,
2014-02-10 17:05:19 +02:00
# uui/util/uui.component
" com_sun_star_comp_uui_UUIInteractionHandler_get_implementation " ,
2014-02-11 09:20:03 +02:00
# xmloff/util/xo.component
" XMLVersionListPersistence_get_implementation " ,
2019-01-31 23:16:43 +01:00
" com_sun_star_comp_Impress_XMLOasisImporter_get_implementation " ,
2019-02-07 21:40:54 +01:00
" com_sun_star_comp_Impress_XMLOasisExporter_get_implementation " ,
2019-02-14 21:32:15 +01:00
" com_sun_star_comp_Impress_XMLOasisStylesExporter_get_implementation " ,
2019-02-21 16:41:33 +01:00
" com_sun_star_comp_Impress_XMLOasisContentExporter_get_implementation " ,
2017-09-15 12:44:08 +01:00
# xmlscript/util/xmlscript.component
" com_sun_star_comp_xmlscript_XMLBasicExporter " ,
" com_sun_star_comp_xmlscript_XMLBasicImporter " ,
" com_sun_star_comp_xmlscript_XMLOasisBasicExporter " ,
" com_sun_star_comp_xmlscript_XMLOasisBasicImporter " ,
2018-02-07 12:58:15 +01:00
# xmlsecurity/util/xmlsecurity.component
2018-02-08 14:09:01 +00:00
( " com_sun_star_security_CertificateContainer_get_implementation " , " #if HAVE_FEATURE_NSS " ) ,
( " com_sun_star_security_DocumentDigitalSignatures_get_implementation " , " #if HAVE_FEATURE_NSS " ) ,
2018-07-06 10:03:44 +02:00
# xmlsecurity/util/xsec_xmlsec.component
( " com_sun_star_xml_crypto_NSSInitializer_get_implementation " , " #if HAVE_FEATURE_NSS " ) ,
( " com_sun_star_xml_crypto_SEInitializer_get_implementation " , " #if HAVE_FEATURE_NSS " ) ,
( " com_sun_star_xml_security_SEInitializer_Gpg_get_implementation " , " #if HAVE_FEATURE_GPGME " ) ,
( " com_sun_star_xml_crypto_SecurityEnvironment_get_implementation " , " #if HAVE_FEATURE_NSS " ) ,
( " com_sun_star_xml_wrapper_XMLDocumentWrapper_get_implementation " , " #if HAVE_FEATURE_NSS " ) ,
( " com_sun_star_xml_wrapper_XMLElementWrapper_get_implementation " , " #if HAVE_FEATURE_NSS " ) ,
( " com_sun_star_xml_crypto_XMLSecurityContext_get_implementation " , " #if HAVE_FEATURE_NSS " ) ,
( " com_sun_star_xml_crypto_XMLSignature_get_implementation " , " #if HAVE_FEATURE_NSS " ) ,
2018-08-03 09:09:00 +02:00
# oox/util/oox.component
" com_sun_star_comp_oox_core_FastTokenHandler_get_implementation " ,
2018-08-09 21:27:45 +02:00
" com_sun_star_comp_oox_FormatDetector_get_implementation " ,
2018-08-30 21:58:14 +02:00
" com_sun_star_comp_oox_docprop_DocumentPropertiesImporter_get_implementation " ,
2018-09-07 08:41:44 +02:00
" com_sun_star_comp_oox_ppt_PowerPointImport_get_implementation " ,
2018-10-04 21:56:07 +02:00
" com_sun_star_comp_oox_ShapeContextHandler_get_implementation " ,
2014-01-09 09:20:55 +01:00
]
2014-03-06 14:23:57 +01:00
# edit group for apps, where you can edit documents
edit_factory_list = [
]
edit_constructor_list = [
2015-05-06 12:27:52 +02:00
# framework/util/fwk.component
2014-03-06 14:23:57 +01:00
" com_sun_star_comp_framework_GlobalAcceleratorConfiguration_get_implementation " ,
2015-05-06 12:27:52 +02:00
# i18npool/util/i18npool.component
2014-03-06 14:23:57 +01:00
" com_sun_star_i18n_InputSequenceChecker_get_implementation " ,
" com_sun_star_i18n_OrdinalSuffix_get_implementation " ,
2015-05-06 12:27:52 +02:00
# sc/util/sc.component
" Calc_XMLOasisContentExporter_get_implementation " ,
" Calc_XMLOasisExporter_get_implementation " ,
" Calc_XMLOasisMetaExporter_get_implementation " ,
" Calc_XMLOasisSettingsExporter_get_implementation " ,
" Calc_XMLOasisStylesExporter_get_implementation " ,
# starmath/util/sm.component
" Math_XMLOasisMetaExporter_get_implementation " ,
" Math_XMLOasisSettingsExporter_get_implementation " ,
2018-11-08 21:12:34 +01:00
" Math_XMLImporter_get_implementation " ,
2018-11-15 22:49:07 +01:00
" Math_XMLOasisMetaImporter_get_implementation " ,
2018-11-29 21:34:51 +01:00
" Math_XMLOasisSettingsImporter_get_implementation " ,
2018-12-19 21:55:12 +01:00
# starmath/util/smd.component
" math_FormatDetector_get_implementation " ,
2015-05-06 10:16:47 +02:00
# sw/util/sw.component
" com_sun_star_comp_Writer_XMLOasisContentExporter_get_implementation " ,
" com_sun_star_comp_Writer_XMLOasisMetaExporter_get_implementation " ,
" com_sun_star_comp_Writer_XMLOasisSettingsExporter_get_implementation " ,
" com_sun_star_comp_Writer_XMLOasisStylesExporter_get_implementation " ,
2018-10-18 21:40:05 +02:00
" com_sun_star_comp_Writer_WriterModule_get_implementation " ,
2014-03-06 14:23:57 +01:00
]
2017-12-01 14:52:13 +00:00
# math
math_factory_list = [
]
math_constructor_list = [
# starmath/util/sm.component
" Math_XMLOasisMetaExporter_get_implementation " ,
" Math_XMLOasisSettingsExporter_get_implementation " ,
]
2014-03-06 13:46:02 +01:00
calc_factory_list = [
2013-12-23 17:44:57 +01:00
( " libsclo.a " , " sc_component_getFactory " ) ,
2014-08-03 22:40:02 +02:00
( " libanalysislo.a " , " analysis_component_getFactory " ) ,
( " libdatelo.a " , " date_component_getFactory " ) ,
( " libpricinglo.a " , " pricing_component_getFactory " ) ,
2013-12-23 17:44:57 +01:00
]
2014-03-06 13:46:02 +01:00
calc_constructor_list = [
2015-03-12 14:14:23 +01:00
# avmedia/util/avmedia.component
" com_sun_star_comp_framework_SoundHandler_get_implementation " ,
2015-05-02 12:27:55 +02:00
# sc/util/scd.component
2015-03-12 14:17:57 +01:00
" com_sun_star_comp_calc_ExcelBiffFormatDetector_get_implementation " ,
2015-05-02 12:27:55 +02:00
" com_sun_star_comp_calc_FormatDetector_get_implementation " ,
2015-03-12 14:19:26 +01:00
# sc/util/scfilt.component
" com_sun_star_comp_oox_xls_ExcelFilter_get_implementation " ,
" com_sun_star_comp_oox_xls_FormulaParser_get_implementation " ,
2015-05-02 12:27:55 +02:00
# scripting/source/vbaevents/vbaevents.component
2015-03-16 22:41:43 +01:00
( " ooo_vba_VBAToOOEventDesc_get_implementation " , " #if HAVE_FEATURE_SCRIPTING " ) ,
2015-05-02 12:27:55 +02:00
# svl/util/svl.component
2015-03-12 14:26:46 +01:00
" com_sun_star_uno_util_numbers_SvNumberFormatsSupplierServiceObject_get_implementation " ,
" com_sun_star_uno_util_numbers_SvNumberFormatterServiceObject_get_implementation " ,
2014-01-09 09:20:55 +01:00
]
2014-03-06 13:46:02 +01:00
draw_factory_list = [
2013-12-23 17:44:57 +01:00
( " libsdlo.a " , " sd_component_getFactory " ) ,
( " libsvgfilterlo.a " , " svgfilter_component_getFactory " ) ,
2014-08-03 22:40:02 +02:00
( " libdeployment.a " , " deployment_component_getFactory " ) ,
( " libemboleobj.a " , " emboleobj_component_getFactory " ) ,
2013-12-23 17:44:57 +01:00
]
2014-03-06 13:46:02 +01:00
draw_constructor_list = [
2015-05-02 12:27:55 +02:00
# animations/source/animcore/animcore.component
2015-03-12 13:07:11 +01:00
" com_sun_star_animations_AnimateColor_get_implementation " ,
" com_sun_star_animations_AnimateMotion_get_implementation " ,
" com_sun_star_animations_AnimateSet_get_implementation " ,
" com_sun_star_animations_AnimateTransform_get_implementation " ,
2015-05-02 12:27:55 +02:00
" com_sun_star_animations_Animate_get_implementation " ,
2015-03-12 13:07:11 +01:00
" com_sun_star_animations_Audio_get_implementation " ,
" com_sun_star_animations_Command_get_implementation " ,
" com_sun_star_animations_IterateContainer_get_implementation " ,
" com_sun_star_animations_ParallelTimeContainer_get_implementation " ,
" com_sun_star_animations_SequenceTimeContainer_get_implementation " ,
" com_sun_star_animations_TransitionFilter_get_implementation " ,
2015-05-02 12:27:55 +02:00
# sd/util/sd.component
" RandomAnimationNode_get_implementation " ,
2015-03-18 13:55:49 +01:00
" com_sun_star_comp_Draw_framework_BasicPaneFactory_get_implementation " ,
" com_sun_star_comp_Draw_framework_BasicToolBarFactory_get_implementation " ,
" com_sun_star_comp_Draw_framework_BasicViewFactory_get_implementation " ,
" com_sun_star_comp_Draw_framework_PresentationFactoryProvider_get_implementation " ,
" com_sun_star_comp_Draw_framework_ResourceID_get_implementation " ,
" com_sun_star_comp_Draw_framework_configuration_ConfigurationController_get_implementation " ,
" com_sun_star_comp_Draw_framework_module_ModuleController_get_implementation " ,
2015-03-12 14:22:12 +01:00
# sd/util/sdd.component
" com_sun_star_comp_draw_FormatDetector_get_implementation " ,
2014-01-09 09:20:55 +01:00
]
2014-03-06 13:46:02 +01:00
writer_factory_list = [
2013-12-23 17:44:57 +01:00
( " libswlo.a " , " sw_component_getFactory " ) ,
]
2014-03-06 13:46:02 +01:00
writer_constructor_list = [
2015-02-26 20:39:42 +01:00
# basic/util/sb.component
2015-02-28 21:17:22 +01:00
( " com_sun_star_comp_sfx2_ScriptLibraryContainer_get_implementation " , " #if HAVE_FEATURE_SCRIPTING " ) ,
2017-04-25 11:40:54 +02:00
# filter/source/textfilterdetect/textfd.component
2015-02-19 20:17:58 +01:00
" com_sun_star_comp_filters_PlainTextFilterDetect_get_implementation " ,
2015-02-26 20:39:42 +01:00
# sw/util/sw.component
2015-05-02 12:27:55 +02:00
" com_sun_star_comp_Writer_XMLOasisContentImporter_get_implementation " ,
2015-02-26 20:39:42 +01:00
" com_sun_star_comp_Writer_XMLOasisImporter_get_implementation " ,
" com_sun_star_comp_Writer_XMLOasisMetaImporter_get_implementation " ,
2015-05-02 12:27:55 +02:00
" com_sun_star_comp_Writer_XMLOasisSettingsImporter_get_implementation " ,
" com_sun_star_comp_Writer_XMLOasisStylesImporter_get_implementation " ,
" com_sun_star_util_comp_FinalThreadManager_get_implementation " ,
2015-02-26 20:39:42 +01:00
# sw/util/swd.component
" com_sun_star_comp_writer_FormatDetector_get_implementation " ,
2018-10-07 20:40:54 +01:00
# sw/util/msword.component
" com_sun_star_comp_Writer_RtfExport_get_implementation " ,
2018-10-11 22:58:00 +02:00
" com_sun_star_comp_Writer_DocxExport_get_implementation " ,
2015-02-19 20:17:58 +01:00
# writerfilter/util/writerfilter.component
" com_sun_star_comp_Writer_RtfFilter_get_implementation " ,
" com_sun_star_comp_Writer_WriterFilter_get_implementation " ,
2014-01-09 09:20:55 +01:00
]
2013-12-23 17:44:57 +01:00
factory_map = {
' core ' : core_factory_list ,
2014-03-06 14:23:57 +01:00
' edit ' : edit_factory_list ,
2017-12-01 14:52:13 +00:00
' math ' : math_factory_list ,
2013-12-23 17:44:57 +01:00
' calc ' : calc_factory_list ,
2014-03-06 13:46:02 +01:00
' draw ' : draw_factory_list ,
2013-12-23 17:44:57 +01:00
' writer ' : writer_factory_list ,
}
2014-01-09 09:20:55 +01:00
constructor_map = {
' core ' : core_constructor_list ,
2014-03-06 14:23:57 +01:00
' edit ' : edit_constructor_list ,
2017-12-01 14:52:13 +00:00
' math ' : math_constructor_list ,
2014-01-09 09:20:55 +01:00
' calc ' : calc_constructor_list ,
2014-03-06 13:46:02 +01:00
' draw ' : draw_constructor_list ,
2014-01-09 09:20:55 +01:00
' writer ' : writer_constructor_list ,
}
2013-12-23 17:44:57 +01:00
2018-11-06 10:17:10 +02:00
custom_widgets = [
' ArgEdit ' ,
' BookmarksBox ' ,
' CategoryListBox ' ,
' ClassificationEditView ' ,
' ColorConfigCtrl ' ,
' ColumnEdit ' ,
' ContentListBox ' ,
' ContextVBox ' ,
' CustomAnimationList ' ,
' CustomPropertiesControl ' ,
' DataTreeListBox ' ,
' DriverListControl ' ,
' DropdownBox ' ,
' EditBox ' ,
' EmojiView ' ,
' ExtBoxWithBtns ' ,
' ExtensionBox ' ,
' FontNameBox ' ,
' FontSizeBox ' ,
' FontStyleBox ' ,
' FormulaListBox ' ,
' IndexBox ' ,
' IndexBox ' ,
' IntellectualPropertyPartEdit ' ,
' LightButton ' ,
' LookUpComboBox ' ,
' ManagedMenuButton ' ,
' MultiLineEditSyntaxHighlight ' ,
' OFileURLControl ' ,
' OptionalBox ' ,
' PageNumberListBox ' ,
' PaperSizeListBox ' ,
' PriorityHBox ' ,
' PriorityMergedHBox ' ,
' PropertyControl ' ,
' RecentDocsView ' ,
' RefButton ' ,
' RefEdit ' ,
' ReplaceEdit ' ,
' RowEdit ' ,
' SameContentListBox ' ,
' ScCondFormatList ' ,
' ScCsvTableBox ' ,
' ScCursorRefEdit ' ,
' ScDataTableView ' ,
' ScDoubleField ' ,
' ScEditWindow ' ,
' ScPivotLayoutTreeList ' ,
' ScPivotLayoutTreeListData ' ,
' ScPivotLayoutTreeListLabel ' ,
' ScRefButtonEx ' ,
' SdPageObjsTLB ' ,
' SearchBox ' ,
' SearchResultsBox ' ,
' SentenceEditWindow ' ,
' ShowNupOrderWindow ' ,
' ShowNupOrderWindow ' ,
' SidebarDialControl ' ,
' SidebarToolBox ' ,
' SpacingListBox ' ,
' StatusBar ' ,
' StructListBox ' ,
' SvSimpleTableContainer ' ,
' SvTreeListBox ' ,
' SvtFileView ' ,
' SvtIconChoiceCtrl ' ,
' SvtURLBox ' ,
' Svx3DPreviewControl ' ,
' SvxCharViewControl ' ,
' SvxCheckListBox ' ,
' SvxColorListBox ' ,
' SvxColorValueSet ' ,
' SvxFillAttrBox ' ,
' SvxFillTypeBox ' ,
' SvxFontPrevWindow ' ,
' SvxHlmarkTreeLBox ' ,
' SvxHyperURLBox ' ,
' SvxLanguageBox ' ,
' SvxLanguageComboBox ' ,
' SvxLightCtl3D ' ,
' SvxNoSpaceEdit ' ,
' SvxPathControl ' ,
' SvxRelativeField ' ,
' SvxTextEncodingBox ' ,
' SvxTextEncodingBox ' ,
' SwAddressPreview ' ,
' SwGlTreeListBox ' ,
' SwMarkPreview ' ,
' SwNavHelpToolBox ' ,
' TableValueSet ' ,
' TemplateDefaultView ' ,
' TemplateLocalView ' ,
' TemplateSearchView ' ,
' ThesaurusAlternativesCtrl ' ,
' ValueSet ' ,
]
2015-02-28 21:17:22 +01:00
def get_constructor_guard ( constructor ) :
if type ( full_constructor_map [ constructor ] ) is bool :
return None
else :
return full_constructor_map [ constructor ]
2015-01-27 00:53:28 +01:00
# instead of outputting native-code.cxx, reduce the services.rdb according to
# the constraints, so that we can easily emulate what services do we need to
# add for a fully functional file loading / saving / ...
2015-01-27 09:51:47 +01:00
def limit_rdb ( services_rdb , full_factory_map , full_constructor_map ) :
2015-01-27 00:53:28 +01:00
ET . register_namespace ( ' ' , ' http://openoffice.org/2010/uno-components ' )
tree = ET . parse ( services_rdb [ 0 ] )
root = tree . getroot ( )
for component in root . findall ( ' { http://openoffice.org/2010/uno-components}component ' ) :
2015-01-27 10:51:57 +01:00
# direct
uri = component . get ( ' uri ' )
component_name = None
if uri != None :
component_name = re . sub ( ' ^vnd.sun.star.expand: \ $LO_LIB_DIR/([^.]*).so$ ' , ' \\ 1.a ' , uri )
if component_name in full_factory_map :
continue
# via a constructor - limit only to those we have
has_constructor = False
2015-01-27 00:53:28 +01:00
for implementation in component . findall ( ' { http://openoffice.org/2010/uno-components}implementation ' ) :
constructor = implementation . get ( ' constructor ' )
2015-01-27 10:51:57 +01:00
if constructor in full_constructor_map :
has_constructor = True
else :
2015-01-27 00:53:28 +01:00
component . remove ( implementation )
2015-01-27 10:51:57 +01:00
if not has_constructor :
root . remove ( component )
2015-01-27 00:53:28 +01:00
tree . write ( services_rdb [ 0 ] + ' .out ' , xml_declaration = True , method = ' xml ' )
# do the actual work
2013-12-19 15:32:54 +01:00
opts = OptionParser ( )
opts . add_option ( " -j " , " --java-guard " , action = " store_true " , help = " include external java functions " , dest = " java " , default = False )
2013-12-23 17:44:57 +01:00
opts . add_option ( " -g " , " --group " , action = " append " , help = " group of implementations to make available in application " , dest = " groups " )
2015-01-27 00:53:28 +01:00
opts . add_option ( " -r " , " --limit-rdb " , action = " append " , help = " instead of outputting native-code.cxx, limit the services.rdb only to the services defined by the groups " , dest = " services " )
2017-10-16 20:23:24 +02:00
opts . add_option ( " -C " , " --pure-c " , action = " store_true " , help = " do not print extern \" C \" " , dest = " pure_c " , default = False )
2013-12-19 15:32:54 +01:00
( options , args ) = opts . parse_args ( )
2018-01-19 09:58:05 +01:00
# dict of all the constructors that we need according to -g's
2015-01-27 00:53:28 +01:00
full_constructor_map = { }
if options . groups :
for constructor_group in options . groups :
for constructor in constructor_map [ constructor_group ] :
2015-02-28 21:17:22 +01:00
if type ( constructor ) is tuple :
full_constructor_map [ constructor [ 0 ] ] = constructor [ 1 ]
else :
full_constructor_map [ constructor ] = True
2015-01-27 00:53:28 +01:00
2015-01-27 09:51:47 +01:00
# dict of all the factories that we need according to -g's
full_factory_map = { }
if options . groups :
for factory_group in options . groups :
for entry in factory_map [ factory_group ] :
factory_guard = None
if len ( entry ) > 2 :
factory_guard = entry [ 2 ]
map_entry = { ' function ' : entry [ 1 ] , ' guard ' : factory_guard }
full_factory_map [ entry [ 0 ] ] = map_entry
# are we only shuffling the services.rdb?
2015-01-27 00:53:28 +01:00
if options . services :
2015-01-27 09:51:47 +01:00
limit_rdb ( options . services , full_factory_map , full_constructor_map )
2015-01-27 00:53:28 +01:00
exit ( 0 )
2014-01-01 17:01:18 +00:00
print ( """ /*
* This is a generated file . Do not edit .
2015-03-16 21:18:23 +01:00
*
* File generated by solenv / bin / native - code . py
2014-01-01 17:01:18 +00:00
* /
2015-03-16 21:18:23 +01:00
#include <config_features.h>
2018-11-09 11:40:34 +00:00
#include <config_fuzzers.h>
2018-08-27 20:13:08 +03:00
#include <config_gpgme.h>
2013-12-23 17:44:57 +01:00
#include <osl/detail/component-mapping.h>
2018-11-07 11:24:03 +00:00
#include <string.h>
2013-12-23 17:44:57 +01:00
""" )
2017-10-16 20:23:24 +02:00
if not options . pure_c :
print ( """ extern " C " { """ )
2013-12-23 17:44:57 +01:00
2015-01-27 09:51:47 +01:00
for entry in sorted ( full_factory_map . keys ( ) ) :
factory_function = full_factory_map [ entry ] [ ' function ' ]
factory_guard = full_factory_map [ entry ] [ ' guard ' ]
if factory_guard :
print ( factory_guard )
print ( ' void * ' + factory_function + ' ( const char* , void* , void* ); ' )
if factory_guard :
print ( ' #endif ' )
2013-12-23 17:44:57 +01:00
print ( ' ' )
2015-01-27 09:17:01 +01:00
for constructor in sorted ( full_constructor_map . keys ( ) ) :
2015-02-28 21:17:22 +01:00
constructor_guard = get_constructor_guard ( constructor )
if constructor_guard :
print ( constructor_guard )
2015-01-27 09:17:01 +01:00
print ( ' void * ' + constructor + ' ( void *, void * ); ' )
2015-02-28 21:17:22 +01:00
if constructor_guard :
print ( ' #endif ' )
2013-12-23 17:44:57 +01:00
2018-11-06 10:17:10 +02:00
print ( ' ' )
for entry in sorted ( custom_widgets ) :
print ( ' void make ' + entry + ' (); ' )
2018-11-08 21:30:06 +00:00
print ( ' typedef void (*custom_widget_func)(); ' )
2018-11-10 00:40:41 +02:00
print ( ' #if !ENABLE_FUZZERS ' )
2018-11-08 21:30:06 +00:00
print ( ' static struct { const char *name; custom_widget_func func; } custom_widgets[] = { ' )
2018-11-06 10:17:10 +02:00
for entry in sorted ( custom_widgets ) :
print ( ' { " make ' + entry + ' " , make ' + entry + ' }, ' )
print ( ' }; ' )
2018-11-09 11:40:34 +00:00
print ( ' #endif ' )
2018-11-06 10:17:10 +02:00
print ( ' ' )
print ( """
2018-11-08 21:30:06 +00:00
custom_widget_func lo_get_custom_widget_func ( const char * name )
2018-11-06 10:17:10 +02:00
{
2018-11-10 00:40:41 +02:00
#if ENABLE_FUZZERS
2018-11-09 11:40:34 +00:00
( void ) name ;
return nullptr ;
#else
2018-11-08 21:30:06 +00:00
for ( size_t i = 0 ; i < sizeof ( custom_widgets ) / sizeof ( custom_widgets [ 0 ] ) ; i + + )
2018-11-06 10:17:10 +02:00
if ( strcmp ( name , custom_widgets [ i ] . name ) == 0 )
return custom_widgets [ i ] . func ;
return nullptr ;
2018-11-09 11:40:34 +00:00
#endif
2018-11-06 10:17:10 +02:00
}
""" )
2013-12-23 17:44:57 +01:00
print ( """
2013-12-19 15:32:54 +01:00
const lib_to_factory_mapping *
lo_get_factory_map ( void )
{
static lib_to_factory_mapping map [ ] = { """ )
2015-01-27 09:51:47 +01:00
for entry in sorted ( full_factory_map . keys ( ) ) :
factory_function = full_factory_map [ entry ] [ ' function ' ]
factory_guard = full_factory_map [ entry ] [ ' guard ' ]
if factory_guard :
print ( factory_guard )
print ( ' { " ' + entry + ' " , ' + factory_function + ' }, ' )
if factory_guard :
print ( ' #endif ' )
2013-12-19 15:32:54 +01:00
print ( """
2013-12-23 17:44:57 +01:00
{ 0 , 0 }
2013-12-19 15:32:54 +01:00
} ; """ )
if options . java :
print ( """
2014-06-30 23:34:15 +02:00
extern void Java_org_libreoffice_kit_LibreOfficeKit_initializeNative ( ) ;
2015-05-21 15:04:07 +01:00
volatile void * p = ( void * ) Java_org_libreoffice_kit_LibreOfficeKit_initializeNative ;
2014-06-30 23:34:15 +02:00
2014-11-17 10:38:54 +01:00
extern void Java_org_libreoffice_kit_Office_getError ( ) ;
p = ( void * ) Java_org_libreoffice_kit_Office_getError ;
2014-06-30 23:34:15 +02:00
""" )
2013-12-19 15:32:54 +01:00
print ( """
return map ;
}
const lib_to_constructor_mapping *
lo_get_constructor_map ( void )
{
2013-12-23 17:44:57 +01:00
static lib_to_constructor_mapping map [ ] = { """ )
2014-01-09 09:20:55 +01:00
2015-01-27 09:17:01 +01:00
for constructor in sorted ( full_constructor_map . keys ( ) ) :
2015-02-28 21:17:22 +01:00
constructor_guard = get_constructor_guard ( constructor )
if constructor_guard :
print ( constructor_guard )
2015-01-27 09:17:01 +01:00
print ( ' { " ' + constructor + ' " , ' + constructor + ' }, ' )
2015-02-28 21:17:22 +01:00
if constructor_guard :
print ( ' #endif ' )
2013-12-19 15:32:54 +01:00
print ( """
2013-12-23 17:44:57 +01:00
{ 0 , 0 }
2013-12-19 15:32:54 +01:00
} ;
return map ;
2013-12-23 17:44:57 +01:00
}
2017-10-16 14:14:30 +02:00
""" )
2017-10-16 20:23:24 +02:00
if not options . pure_c :
print ( """ } """ )
2014-12-09 15:15:53 +01:00
# vim:set shiftwidth=4 softtabstop=4 expandtab: