2 # This file is part of the LibreOffice project.
4 # This Source Code Form is subject to the terms of the Mozilla Public
5 # License, v. 2.0. If a copy of the MPL was not distributed with this
6 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 from optparse
import OptionParser
12 import xml
.etree
.ElementTree
as ET
14 # foo_component_getFactory functions are split into groups, so that you could
15 # choose e.g. 'core' and 'writer' functionality and through factory_map,
16 # relevant function sections will be referenced in lo_get_factory_map().
17 # That prevents garbage collector to ignore them as unused.
19 # The same groups are used for constructor based implementations
20 # referenced in lo_get_constructor_map().
23 ("libembobj.a", "embobj_component_getFactory"),
24 ("libevtattlo.a", "evtatt_component_getFactory"),
25 ("libcomphelper.a", "comphelp_component_getFactory"),
26 ("libconfigmgrlo.a", "configmgr_component_getFactory"),
27 ("libdrawinglayerlo.a", "drawinglayer_component_getFactory"),
28 ("libemfiolo.a", "emfio_component_getFactory"),
29 ("libfilterconfiglo.a", "filterconfig1_component_getFactory"),
30 ("libfsstoragelo.a", "fsstorage_component_getFactory"),
31 ("libhyphenlo.a", "hyphen_component_getFactory"),
32 ("libi18npoollo.a", "i18npool_component_getFactory"),
33 ("libi18nsearchlo.a", "i18nsearch_component_getFactory"),
34 ("libinvocadaptlo.a", "invocadapt_component_getFactory"),
35 ("liblnglo.a", "lng_component_getFactory"),
36 ("liblnthlo.a", "lnth_component_getFactory"),
37 ("liblocalebe1lo.a", "localebe1_component_getFactory"),
38 ("libpackage2.a", "package2_component_getFactory"),
39 ("libsmlo.a", "sm_component_getFactory"),
40 ("libsrtrs1.a", "srtrs1_component_getFactory"),
41 ("libstoragefdlo.a", "storagefd_component_getFactory"),
42 ("libucb1.a", "ucb_component_getFactory"),
43 ("libucpfile1.a", "ucpfile_component_getFactory"),
44 ("libucphier1.a", "ucphier1_component_getFactory"),
45 ("libucptdoc1lo.a", "ucptdoc1_component_getFactory"),
46 ("libunordflo.a", "unordf_component_getFactory"),
47 ("libunoxmllo.a", "unoxml_component_getFactory"),
48 ("libutllo.a", "utl_component_getFactory"),
49 ("libxoflo.a", "xof_component_getFactory"),
50 ("libxolo.a", "xo_component_getFactory"),
51 ("libxstor.a", "xstor_component_getFactory"),
52 ("libvclcanvaslo.a", "vclcanvas_component_getFactory"),
53 ("libmtfrendererlo.a", "mtfrenderer_component_getFactory"),
54 ("libxmlfdlo.a", "xmlfd_component_getFactory"),
55 ("libxmlfalo.a", "xmlfa_component_getFactory"),
56 ("libodfflatxmllo.a", "odfflatxml_component_getFactory"),
57 ("libxmlscriptlo.a", "xmlscript_component_getFactory"),
58 ("libmcnttype.a", "mcnttype_component_getFactory"),
59 ("libvcllo.a", "vcl_component_getFactory"),
60 ("libspelllo.a", "spell_component_getFactory"),
61 ("libpdffilterlo.a", "pdffilter_component_getFactory"),
62 ("libsvgiolo.a", "svgio_component_getFactory"),
63 ("libsvtlo.a", "svt_component_getFactory"),
64 ("libctllo.a", "ctl_component_getFactory"),
65 ("libMacOSXSpelllo.a", "MacOSXSpell_component_getFactory", "#ifdef IOS"),
66 ("libcuilo.a", "cui_component_getFactory"),
67 ("libproxyfaclo.a", "proxyfac_component_getFactory"),
68 ("libguesslanglo.a", "guesslang_component_getFactory"),
71 core_constructor_list
= [
72 # canvas/source/factory/canvasfactory.component
73 "com_sun_star_comp_rendering_CanvasFactory_get_implementation",
74 # chart2/source/chartcore.component
75 "com_sun_star_chart2_ExponentialScaling_get_implementation",
76 "com_sun_star_chart2_LinearScaling_get_implementation",
77 "com_sun_star_chart2_LogarithmicScaling_get_implementation",
78 "com_sun_star_chart2_PowerScaling_get_implementation",
79 "com_sun_star_comp_chart_AreaChartType_get_implementation",
80 "com_sun_star_comp_chart_BarChartType_get_implementation",
81 "com_sun_star_comp_chart_BubbleChartType_get_implementation",
82 "com_sun_star_comp_chart_CachedDataSequence_get_implementation",
83 "com_sun_star_comp_chart_CandleStickChartType_get_implementation",
84 "com_sun_star_comp_chart_ChartTypeManager_get_implementation",
85 "com_sun_star_comp_chart_ColumnChartType_get_implementation",
86 "com_sun_star_comp_chart_DataSeries_get_implementation",
87 "com_sun_star_comp_chart_DataSource_get_implementation",
88 "com_sun_star_comp_chart_FilledNetChartType_get_implementation",
89 "com_sun_star_comp_chart_FormattedString_get_implementation",
90 "com_sun_star_comp_chart_InternalDataProvider_get_implementation",
91 "com_sun_star_comp_chart_LineChartType_get_implementation",
92 "com_sun_star_comp_chart_NetChartType_get_implementation",
93 "com_sun_star_comp_chart_PieChartType_get_implementation",
94 "com_sun_star_comp_chart_ScatterChartType_get_implementation",
95 "com_sun_star_comp_chart2_Axis_get_implementation",
96 "com_sun_star_comp_chart2_CartesianCoordinateSystem2d_get_implementation",
97 "com_sun_star_comp_chart2_CartesianCoordinateSystem3d_get_implementation",
98 "com_sun_star_comp_chart2_ChartController_get_implementation",
99 "com_sun_star_comp_chart2_ChartDocumentWrapper_get_implementation",
100 "com_sun_star_comp_chart2_ChartModel_get_implementation",
101 "com_sun_star_comp_chart2_ChartView_get_implementation",
102 "com_sun_star_comp_chart2_ConfigDefaultColorScheme_get_implementation",
103 "com_sun_star_comp_chart2_Diagram_get_implementation",
104 "com_sun_star_comp_chart2_ErrorBar_get_implementation",
105 "com_sun_star_comp_chart2_ExponentialRegressionCurve_get_implementation",
106 "com_sun_star_comp_chart2_GridProperties_get_implementation",
107 "com_sun_star_comp_chart2_LabeledDataSequence_get_implementation",
108 "com_sun_star_comp_chart2_Legend_get_implementation",
109 "com_sun_star_comp_chart2_LinearRegressionCurve_get_implementation",
110 "com_sun_star_comp_chart2_LogarithmicRegressionCurve_get_implementation",
111 "com_sun_star_comp_chart2_MeanValueRegressionCurve_get_implementation",
112 "com_sun_star_comp_chart2_MovingAverageRegressionCurve_get_implementation",
113 "com_sun_star_comp_chart2_PageBackground_get_implementation",
114 "com_sun_star_comp_chart2_PolarCoordinateSystem2d_get_implementation",
115 "com_sun_star_comp_chart2_PolarCoordinateSystem3d_get_implementation",
116 "com_sun_star_comp_chart2_PolynomialRegressionCurve_get_implementation",
117 "com_sun_star_comp_chart2_PotentialRegressionCurve_get_implementation",
118 "com_sun_star_comp_chart2_RegressionEquation_get_implementation",
119 "com_sun_star_comp_chart2_Title_get_implementation",
120 "com_sun_star_comp_chart2_XMLFilter_get_implementation",
121 # chart2/source/controller/chartcontroller.component
122 "com_sun_star_comp_chart2_ChartDocumentWrapper_get_implementation",
123 "com_sun_star_comp_chart2_ChartFrameLoader_get_implementation",
124 "com_sun_star_comp_chart2_WizardDialog_get_implementation",
125 # comphelper/util/comphelp.component
126 "com_sun_star_comp_MemoryStream",
127 "com_sun_star_comp_task_OfficeRestartManager",
128 "AnyCompareFactory_get_implementation",
129 "IndexedPropertyValuesContainer_get_implementation",
130 "NamedPropertyValuesContainer_get_implementation",
131 "com_sun_star_comp_comphelper_OPropertyBag",
132 "com_sun_star_comp_SequenceInputStreamService",
133 "com_sun_star_comp_SequenceOutputStreamService",
134 "com_sun_star_comp_util_OfficeInstallationDirectories",
135 # dbaccess/util/dba.component
136 ("com_sun_star_comp_dba_ORowSet_get_implementation", "#if HAVE_FEATURE_DBCONNECTIVITY"),
137 # forms/util/frm.component
138 ("com_sun_star_comp_forms_FormOperations_get_implementation", "#if HAVE_FEATURE_DBCONNECTIVITY"),
139 ("com_sun_star_comp_forms_ODatabaseForm_get_implementation", "#if HAVE_FEATURE_DBCONNECTIVITY"),
140 ("com_sun_star_comp_forms_OFormattedFieldWrapper_ForcedFormatted_get_implementation", "#if HAVE_FEATURE_DBCONNECTIVITY"),
141 ("com_sun_star_comp_forms_ORichTextModel_get_implementation", "#if HAVE_FEATURE_DBCONNECTIVITY"),
142 ("com_sun_star_comp_forms_OScrollBarModel_get_implementation", "#if HAVE_FEATURE_DBCONNECTIVITY"),
143 ("com_sun_star_comp_forms_OSpinButtonModel_get_implementation", "#if HAVE_FEATURE_DBCONNECTIVITY"),
144 ("com_sun_star_form_Model_get_implementation", "#if HAVE_FEATURE_DBCONNECTIVITY"),
145 ("com_sun_star_form_OButtonControl_get_implementation", "#if HAVE_FEATURE_DBCONNECTIVITY"),
146 ("com_sun_star_form_OButtonModel_get_implementation", "#if HAVE_FEATURE_DBCONNECTIVITY"),
147 ("com_sun_star_form_OCheckBoxControl_get_implementation", "#if HAVE_FEATURE_DBCONNECTIVITY"),
148 ("com_sun_star_form_OCheckBoxModel_get_implementation", "#if HAVE_FEATURE_DBCONNECTIVITY"),
149 ("com_sun_star_form_OComboBoxControl_get_implementation", "#if HAVE_FEATURE_DBCONNECTIVITY"),
150 ("com_sun_star_form_OComboBoxModel_get_implementation", "#if HAVE_FEATURE_DBCONNECTIVITY"),
151 ("com_sun_star_form_ODateControl_get_implementation", "#if HAVE_FEATURE_DBCONNECTIVITY"),
152 ("com_sun_star_form_ODateModel_get_implementation", "#if HAVE_FEATURE_DBCONNECTIVITY"),
153 ("com_sun_star_form_OEditControl_get_implementation", "#if HAVE_FEATURE_DBCONNECTIVITY"),
154 ("com_sun_star_form_OEditModel_get_implementation", "#if HAVE_FEATURE_DBCONNECTIVITY"),
155 ("com_sun_star_form_OFixedTextModel_get_implementation", "#if HAVE_FEATURE_DBCONNECTIVITY"),
156 ("com_sun_star_form_OFormsCollection_get_implementation", "#if HAVE_FEATURE_DBCONNECTIVITY"),
157 ("com_sun_star_form_OGridControlModel_get_implementation", "#if HAVE_FEATURE_DBCONNECTIVITY"),
158 ("com_sun_star_form_OGroupBoxModel_get_implementation", "#if HAVE_FEATURE_DBCONNECTIVITY"),
159 ("com_sun_star_form_OListBoxModel_get_implementation", "#if HAVE_FEATURE_DBCONNECTIVITY"),
160 ("com_sun_star_form_ONumericModel_get_implementation", "#if HAVE_FEATURE_DBCONNECTIVITY"),
161 ("com_sun_star_form_ORadioButtonModel_get_implementation", "#if HAVE_FEATURE_DBCONNECTIVITY"),
162 ("com_sun_star_form_XForms_get_implementation", "#if HAVE_FEATURE_DBCONNECTIVITY"),
163 # framework/util/fwk.component
164 "com_sun_star_comp_framework_AutoRecovery_get_implementation",
165 "com_sun_star_comp_framework_Desktop_get_implementation",
166 "com_sun_star_comp_framework_DocumentAcceleratorConfiguration_get_implementation",
167 "com_sun_star_comp_framework_Frame_get_implementation",
168 "com_sun_star_comp_framework_GlobalAcceleratorConfiguration_get_implementation",
169 "com_sun_star_comp_framework_JobExecutor_get_implementation",
170 "com_sun_star_comp_framework_LayoutManager_get_implementation",
171 "com_sun_star_comp_framework_ModuleManager_get_implementation",
172 "com_sun_star_comp_framework_ModuleUIConfigurationManager_get_implementation",
173 "com_sun_star_comp_framework_ModuleUIConfigurationManagerSupplier_get_implementation",
174 "com_sun_star_comp_framework_PathSettings_get_implementation",
175 "com_sun_star_comp_framework_PathSubstitution_get_implementation",
176 "com_sun_star_comp_framework_StatusIndicatorFactory_get_implementation",
177 "com_sun_star_comp_framework_TaskCreator_get_implementation",
178 "com_sun_star_comp_framework_ToolBarControllerFactory_get_implementation",
179 "com_sun_star_comp_framework_UIConfigurationManager_get_implementation",
180 "com_sun_star_comp_framework_UIElementFactoryManager_get_implementation",
181 "com_sun_star_comp_framework_URLTransformer_get_implementation",
182 "com_sun_star_comp_framework_WindowStateConfiguration_get_implementation",
183 "com_sun_star_comp_framework_ModuleAcceleratorConfiguration_get_implementation",
184 "org_apache_openoffice_comp_framework_ContextChangeEventMultiplexer_get_implementation",
185 # i18npool/util/i18npool.component
186 "com_sun_star_i18n_BreakIterator_get_implementation",
187 "com_sun_star_i18n_BreakIterator_Unicode_get_implementation",
188 "com_sun_star_i18n_CharacterClassification_get_implementation",
189 "com_sun_star_i18n_CharacterClassification_Unicode_get_implementation",
190 "com_sun_star_i18n_Collator_get_implementation",
191 "com_sun_star_i18n_LocaleDataImpl_get_implementation",
192 "com_sun_star_i18n_NativeNumberSupplier_get_implementation",
193 "com_sun_star_i18n_NumberFormatCodeMapper_get_implementation",
194 "com_sun_star_i18n_Transliteration_get_implementation",
195 "com_sun_star_i18n_Transliteration_IGNORE_CASE_get_implementation",
196 "com_sun_star_i18n_Transliteration_IGNORE_KANA_get_implementation",
197 "com_sun_star_i18n_Transliteration_IGNORE_WIDTH_get_implementation",
198 "com_sun_star_text_DefaultNumberingProvider_get_implementation",
199 # sax/source/expatwrap/expwrap.component
200 "com_sun_star_comp_extensions_xml_sax_FastParser_get_implementation",
201 "com_sun_star_comp_extensions_xml_sax_ParserExpat_get_implementation",
202 "com_sun_star_extensions_xml_sax_Writer_get_implementation",
203 # sfx2/util/sfx.component
204 "SfxDocumentMetaData_get_implementation",
205 "com_sun_star_comp_office_FrameLoader_get_implementation",
206 "com_sun_star_comp_sfx2_AppDispatchProvider_get_implementation",
207 "com_sun_star_comp_sfx2_DocumentTemplates_get_implementation",
208 "com_sun_star_comp_sfx2_GlobalEventBroadcaster_get_implementation",
209 # sot/util/sot.component
210 "com_sun_star_comp_embed_OLESimpleStorage",
211 # stoc/source/inspect/introspection.component
212 "com_sun_star_comp_stoc_Introspection_get_implementation",
213 # stoc/source/corereflection/reflection.component
214 "com_sun_star_comp_stoc_CoreReflection_get_implementation",
215 # stoc/util/stocservices.component
216 "com_sun_star_comp_stoc_OServiceManagerWrapper_get_implementation",
217 "com_sun_star_comp_stoc_TypeConverter_get_implementation",
218 "com_sun_star_comp_uri_ExternalUriReferenceTranslator_get_implementation",
219 "com_sun_star_comp_uri_UriReferenceFactory_get_implementation",
220 "com_sun_star_comp_uri_UriSchemeParser_vndDOTsunDOTstarDOTexpand_get_implementation",
221 "com_sun_star_comp_uri_UriSchemeParser_vndDOTsunDOTstarDOTscript_get_implementation",
222 # svtools/util/svt.component
223 "com_sun_star_comp_embed_HatchWindowFactory_get_implementation",
224 # vcl/vcl.android.component
225 "com_sun_star_graphic_GraphicObject_get_implementation",
226 "com_sun_star_comp_graphic_GraphicProvider_get_implementation",
227 # svx/util/svx.component
228 "com_sun_star_comp_svx_NumberingToolBoxControl_get_implementation",
229 "com_sun_star_drawing_EnhancedCustomShapeEngine_get_implementation",
230 "com_sun_star_drawing_SvxShapeCollection_get_implementation",
231 "com_sun_star_svx_FontHeightToolBoxController_get_implementation",
232 "org_apache_openoffice_comp_svx_sidebar_PanelFactory_get_implementation",
233 # svx/util/svxcore.component
234 "com_sun_star_comp_graphic_PrimitiveFactory2D_get_implementation",
235 "com_sun_star_comp_Draw_GraphicExporter_get_implementation",
236 "com_sun_star_comp_svx_ColorToolBoxControl_get_implementation",
237 "com_sun_star_comp_svx_FontNameToolBoxControl_get_implementation",
238 "com_sun_star_comp_Svx_GraphicExportHelper_get_implementation",
239 "com_sun_star_comp_Svx_GraphicImportHelper_get_implementation",
240 # toolkit/util/tk.component
241 "stardiv_Toolkit_StdTabController_get_implementation",
242 "stardiv_Toolkit_UnoButtonControl_get_implementation",
243 "stardiv_Toolkit_UnoCheckBoxControl_get_implementation",
244 "stardiv_Toolkit_UnoComboBoxControl_get_implementation",
245 "stardiv_Toolkit_UnoControlButtonModel_get_implementation",
246 "stardiv_Toolkit_UnoControlCheckBoxModel_get_implementation",
247 "stardiv_Toolkit_UnoControlComboBoxModel_get_implementation",
248 "stardiv_Toolkit_UnoControlContainer_get_implementation",
249 "stardiv_Toolkit_UnoControlContainerModel_get_implementation",
250 "stardiv_Toolkit_UnoControlDateFieldModel_get_implementation",
251 "stardiv_Toolkit_UnoControlDialogModel_get_implementation",
252 "stardiv_Toolkit_UnoControlFixedTextModel_get_implementation",
253 "stardiv_Toolkit_UnoControlFormattedFieldModel_get_implementation",
254 "stardiv_Toolkit_UnoControlGroupBoxModel_get_implementation",
255 "stardiv_Toolkit_UnoControlListBoxModel_get_implementation",
256 "stardiv_Toolkit_UnoControlNumericFieldModel_get_implementation",
257 "stardiv_Toolkit_UnoControlRadioButtonModel_get_implementation",
258 "stardiv_Toolkit_UnoControlScrollBarModel_get_implementation",
259 "stardiv_Toolkit_UnoDateFieldControl_get_implementation",
260 "stardiv_Toolkit_UnoSpinButtonModel_get_implementation",
261 "stardiv_Toolkit_VCLXPointer_get_implementation",
262 "stardiv_Toolkit_VCLXToolkit_get_implementation",
263 # uui/util/uui.component
264 "com_sun_star_comp_uui_UUIInteractionHandler_get_implementation",
265 # xmloff/util/xo.component
266 "XMLMetaExportComponent_get_implementation",
267 "XMLMetaImportComponent_get_implementation",
268 "XMLVersionListPersistence_get_implementation",
269 "com_sun_star_comp_Impress_XMLOasisImporter_get_implementation",
270 "com_sun_star_comp_Impress_XMLOasisExporter_get_implementation",
271 "com_sun_star_comp_Impress_XMLOasisStylesExporter_get_implementation",
272 "com_sun_star_comp_Impress_XMLOasisContentExporter_get_implementation",
273 "com_sun_star_comp_Impress_XMLOasisMetaExporter_get_implementation",
274 "com_sun_star_comp_Impress_XMLOasisMetaImporter_get_implementation",
275 "com_sun_star_comp_Impress_XMLOasisContentImporter_get_implementation",
276 "com_sun_star_comp_Impress_XMLOasisStylesImporter_get_implementation",
277 "com_sun_star_comp_Impress_XMLOasisSettingsExporter_get_implementation",
278 "com_sun_star_comp_Impress_XMLOasisSettingsImporter_get_implementation",
279 "com_sun_star_comp_Impress_XMLStylesExporter_get_implementation",
280 "com_sun_star_comp_Impress_XMLContentExporter_get_implementation",
281 "com_sun_star_comp_Impress_XMLMetaExporter_get_implementation",
282 "com_sun_star_comp_Impress_XMLSettingsExporter_get_implementation",
283 "com_sun_star_comp_Impress_XMLExporter_get_implementation",
284 "com_sun_star_comp_Draw_XMLExporter_get_implementation",
285 "com_sun_star_comp_Draw_XMLStylesExporter_get_implementation",
286 "com_sun_star_comp_Draw_XMLContentExporter_get_implementation",
287 "com_sun_star_comp_Draw_XMLMetaExporter_get_implementation",
288 "com_sun_star_comp_Draw_XMLSettingsExporter_get_implementation",
289 "com_sun_star_comp_Draw_XMLOasisSettingsExporter_get_implementation",
290 "com_sun_star_comp_Draw_XMLOasisMetaExporter_get_implementation",
291 "com_sun_star_comp_Draw_XMLOasisContentExporter_get_implementation",
292 "com_sun_star_comp_Draw_XMLOasisStylesExporter_get_implementation",
293 "com_sun_star_comp_Draw_XMLOasisExporter_get_implementation",
294 "com_sun_star_comp_Draw_XMLOasisImporter_get_implementation",
295 "com_sun_star_comp_Draw_XMLOasisStylesImporter_get_implementation",
296 "com_sun_star_comp_Draw_XMLOasisContentImporter_get_implementation",
297 "com_sun_star_comp_Draw_XMLOasisMetaImporter_get_implementation",
298 "com_sun_star_comp_Draw_XMLOasisSettingsImporter_get_implementation",
299 # xmlscript/util/xmlscript.component
300 "com_sun_star_comp_xmlscript_XMLBasicExporter",
301 "com_sun_star_comp_xmlscript_XMLBasicImporter",
302 "com_sun_star_comp_xmlscript_XMLOasisBasicExporter",
303 "com_sun_star_comp_xmlscript_XMLOasisBasicImporter",
304 # xmlsecurity/util/xmlsecurity.component
305 ("com_sun_star_security_CertificateContainer_get_implementation", "#if HAVE_FEATURE_NSS"),
306 ("com_sun_star_security_DocumentDigitalSignatures_get_implementation", "#if HAVE_FEATURE_NSS"),
307 # xmlsecurity/util/xsec_xmlsec.component
308 ("com_sun_star_xml_crypto_NSSInitializer_get_implementation", "#if HAVE_FEATURE_NSS"),
309 ("com_sun_star_xml_crypto_SEInitializer_get_implementation", "#if HAVE_FEATURE_NSS"),
310 ("com_sun_star_xml_security_SEInitializer_Gpg_get_implementation", "#if HAVE_FEATURE_GPGME"),
311 ("com_sun_star_xml_crypto_SecurityEnvironment_get_implementation", "#if HAVE_FEATURE_NSS"),
312 ("com_sun_star_xml_wrapper_XMLDocumentWrapper_get_implementation", "#if HAVE_FEATURE_NSS"),
313 ("com_sun_star_xml_wrapper_XMLElementWrapper_get_implementation", "#if HAVE_FEATURE_NSS"),
314 ("com_sun_star_xml_crypto_XMLSecurityContext_get_implementation", "#if HAVE_FEATURE_NSS"),
315 ("com_sun_star_xml_crypto_XMLSignature_get_implementation", "#if HAVE_FEATURE_NSS"),
316 # oox/util/oox.component
317 "com_sun_star_comp_oox_core_FastTokenHandler_get_implementation",
318 "com_sun_star_comp_oox_FormatDetector_get_implementation",
319 "com_sun_star_comp_oox_docprop_DocumentPropertiesImporter_get_implementation",
320 "com_sun_star_comp_oox_ppt_PowerPointImport_get_implementation",
321 "com_sun_star_comp_oox_ShapeContextHandler_get_implementation",
324 # edit group for apps, where you can edit documents
325 edit_factory_list
= [
328 edit_constructor_list
= [
329 # framework/util/fwk.component
330 "com_sun_star_comp_framework_GlobalAcceleratorConfiguration_get_implementation",
331 "com_sun_star_comp_framework_UICommandDescription_get_implementation",
332 # i18npool/util/i18npool.component
333 "com_sun_star_i18n_InputSequenceChecker_get_implementation",
334 "com_sun_star_i18n_OrdinalSuffix_get_implementation",
335 # sc/util/sc.component
336 "Calc_XMLOasisContentExporter_get_implementation",
337 "Calc_XMLOasisExporter_get_implementation",
338 "Calc_XMLOasisMetaExporter_get_implementation",
339 "Calc_XMLOasisSettingsExporter_get_implementation",
340 "Calc_XMLOasisStylesExporter_get_implementation",
341 # starmath/util/sm.component
342 "Math_XMLOasisMetaExporter_get_implementation",
343 "Math_XMLOasisSettingsExporter_get_implementation",
344 "Math_XMLImporter_get_implementation",
345 "Math_XMLOasisMetaImporter_get_implementation",
346 "Math_XMLOasisSettingsImporter_get_implementation",
347 # starmath/util/smd.component
348 "math_FormatDetector_get_implementation",
349 # sw/util/sw.component
350 "com_sun_star_comp_Writer_XMLOasisContentExporter_get_implementation",
351 "com_sun_star_comp_Writer_XMLOasisMetaExporter_get_implementation",
352 "com_sun_star_comp_Writer_XMLOasisSettingsExporter_get_implementation",
353 "com_sun_star_comp_Writer_XMLOasisStylesExporter_get_implementation",
354 "com_sun_star_comp_Writer_WriterModule_get_implementation",
355 "org_apache_openoffice_comp_sw_sidebar_SwPanelFactory_get_implementation",
359 math_factory_list
= [
362 math_constructor_list
= [
363 # starmath/util/sm.component
364 "Math_XMLOasisMetaExporter_get_implementation",
365 "Math_XMLOasisSettingsExporter_get_implementation",
368 calc_factory_list
= [
369 ("libsclo.a", "sc_component_getFactory"),
370 ("libanalysislo.a", "analysis_component_getFactory"),
371 ("libdatelo.a", "date_component_getFactory"),
372 ("libpricinglo.a", "pricing_component_getFactory"),
375 calc_constructor_list
= [
376 # avmedia/util/avmedia.component
377 "com_sun_star_comp_framework_SoundHandler_get_implementation",
378 # sc/util/scd.component
379 "com_sun_star_comp_calc_ExcelBiffFormatDetector_get_implementation",
380 "com_sun_star_comp_calc_FormatDetector_get_implementation",
381 # sc/util/scfilt.component
382 "com_sun_star_comp_oox_xls_ExcelFilter_get_implementation",
383 "com_sun_star_comp_oox_xls_FormulaParser_get_implementation",
384 # scripting/source/vbaevents/vbaevents.component
385 ("ooo_vba_VBAToOOEventDesc_get_implementation", "#if HAVE_FEATURE_SCRIPTING"),
386 # svl/util/svl.component
387 "com_sun_star_uno_util_numbers_SvNumberFormatsSupplierServiceObject_get_implementation",
388 "com_sun_star_uno_util_numbers_SvNumberFormatterServiceObject_get_implementation",
391 draw_factory_list
= [
392 ("libsdlo.a", "sd_component_getFactory"),
393 ("libsvgfilterlo.a", "svgfilter_component_getFactory"),
394 ("libdeployment.a", "deployment_component_getFactory"),
395 ("libemboleobj.a", "emboleobj_component_getFactory"),
398 draw_constructor_list
= [
399 # animations/source/animcore/animcore.component
400 "com_sun_star_animations_AnimateColor_get_implementation",
401 "com_sun_star_animations_AnimateMotion_get_implementation",
402 "com_sun_star_animations_AnimateSet_get_implementation",
403 "com_sun_star_animations_AnimateTransform_get_implementation",
404 "com_sun_star_animations_Animate_get_implementation",
405 "com_sun_star_animations_Audio_get_implementation",
406 "com_sun_star_animations_Command_get_implementation",
407 "com_sun_star_animations_IterateContainer_get_implementation",
408 "com_sun_star_animations_ParallelTimeContainer_get_implementation",
409 "com_sun_star_animations_SequenceTimeContainer_get_implementation",
410 "com_sun_star_animations_TransitionFilter_get_implementation",
411 # sd/util/sd.component
412 "RandomAnimationNode_get_implementation",
413 "com_sun_star_comp_Draw_framework_BasicPaneFactory_get_implementation",
414 "com_sun_star_comp_Draw_framework_BasicToolBarFactory_get_implementation",
415 "com_sun_star_comp_Draw_framework_BasicViewFactory_get_implementation",
416 "com_sun_star_comp_Draw_framework_PresentationFactoryProvider_get_implementation",
417 "com_sun_star_comp_Draw_framework_ResourceID_get_implementation",
418 "com_sun_star_comp_Draw_framework_configuration_ConfigurationController_get_implementation",
419 "com_sun_star_comp_Draw_framework_module_ModuleController_get_implementation",
420 "org_openoffice_comp_Draw_framework_PanelFactory_get_implementation",
421 # sd/util/sdd.component
422 "com_sun_star_comp_draw_FormatDetector_get_implementation",
423 # sd/util/sdfilt.component
424 "css_comp_Impress_oox_PowerPointExport",
425 # writerperfect/source/draw/wpftdraw.component
426 "com_sun_star_comp_Draw_VisioImportFilter_get_implementation",
429 writer_factory_list
= [
430 ("libswlo.a", "sw_component_getFactory"),
433 writer_constructor_list
= [
434 # basic/util/sb.component
435 ("com_sun_star_comp_sfx2_ScriptLibraryContainer_get_implementation", "#if HAVE_FEATURE_SCRIPTING"),
436 # filter/source/textfilterdetect/textfd.component
437 "com_sun_star_comp_filters_PlainTextFilterDetect_get_implementation",
438 # sw/util/sw.component
439 "com_sun_star_comp_Writer_XMLOasisContentImporter_get_implementation",
440 "com_sun_star_comp_Writer_XMLOasisImporter_get_implementation",
441 "com_sun_star_comp_Writer_XMLOasisMetaImporter_get_implementation",
442 "com_sun_star_comp_Writer_XMLOasisSettingsImporter_get_implementation",
443 "com_sun_star_comp_Writer_XMLOasisStylesImporter_get_implementation",
444 "com_sun_star_util_comp_FinalThreadManager_get_implementation",
445 # sw/util/swd.component
446 "com_sun_star_comp_writer_FormatDetector_get_implementation",
447 # sw/util/msword.component
448 "com_sun_star_comp_Writer_RtfExport_get_implementation",
449 "com_sun_star_comp_Writer_DocxExport_get_implementation",
450 # writerfilter/util/writerfilter.component
451 "com_sun_star_comp_Writer_RtfFilter_get_implementation",
452 "com_sun_star_comp_Writer_WriterFilter_get_implementation",
456 'core' : core_factory_list
,
457 'edit' : edit_factory_list
,
458 'math' : math_factory_list
,
459 'calc' : calc_factory_list
,
460 'draw' : draw_factory_list
,
461 'writer' : writer_factory_list
,
465 'core' : core_constructor_list
,
466 'edit' : edit_constructor_list
,
467 'math' : math_constructor_list
,
468 'calc' : calc_constructor_list
,
469 'draw' : draw_constructor_list
,
470 'writer' : writer_constructor_list
,
479 'CustomAnimationList',
493 'PriorityMergedHBox',
497 'SameContentListBox',
501 'SidebarDialControl',
504 'Svx3DPreviewControl',
505 'SvxCharViewControl',
514 'TemplateDefaultView',
518 def get_constructor_guard(constructor
):
519 if type(full_constructor_map
[constructor
]) is bool:
522 return full_constructor_map
[constructor
]
524 # instead of outputting native-code.cxx, reduce the services.rdb according to
525 # the constraints, so that we can easily emulate what services do we need to
526 # add for a fully functional file loading / saving / ...
527 def limit_rdb(services_rdb
, full_factory_map
, full_constructor_map
):
528 ET
.register_namespace('','http://openoffice.org/2010/uno-components')
529 tree
= ET
.parse(services_rdb
[0])
530 root
= tree
.getroot()
532 for component
in root
.findall('{http://openoffice.org/2010/uno-components}component'):
534 uri
= component
.get('uri')
535 component_name
= None
537 component_name
= re
.sub('^vnd.sun.star.expand:\$LO_LIB_DIR/([^.]*).so$', '\\1.a', uri
)
538 if component_name
in full_factory_map
:
541 # via a constructor - limit only to those we have
542 has_constructor
= False
543 for implementation
in component
.findall('{http://openoffice.org/2010/uno-components}implementation'):
544 constructor
= implementation
.get('constructor')
545 if constructor
in full_constructor_map
:
546 has_constructor
= True
548 component
.remove(implementation
)
550 if not has_constructor
:
551 root
.remove(component
)
553 tree
.write(services_rdb
[0] + '.out', xml_declaration
= True, method
= 'xml')
557 opts
= OptionParser()
558 opts
.add_option("-j", "--java-guard", action
="store_true", help="include external java functions", dest
="java", default
=False)
559 opts
.add_option("-g", "--group", action
="append", help="group of implementations to make available in application", dest
="groups")
560 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")
561 opts
.add_option("-C", "--pure-c", action
="store_true", help="do not print extern \"C\"", dest
="pure_c", default
=False)
563 (options
, args
) = opts
.parse_args()
565 # dict of all the constructors that we need according to -g's
566 full_constructor_map
= {}
568 for constructor_group
in options
.groups
:
569 for constructor
in constructor_map
[constructor_group
]:
570 if type(constructor
) is tuple:
571 full_constructor_map
[constructor
[0]] = constructor
[1]
573 full_constructor_map
[constructor
] = True
575 # dict of all the factories that we need according to -g's
576 full_factory_map
= {}
578 for factory_group
in options
.groups
:
579 for entry
in factory_map
[factory_group
]:
582 factory_guard
= entry
[2]
583 map_entry
= { 'function': entry
[1], 'guard': factory_guard
}
584 full_factory_map
[entry
[0]] = map_entry
586 # are we only shuffling the services.rdb?
588 limit_rdb(options
.services
, full_factory_map
, full_constructor_map
)
592 * This is a generated file. Do not edit.
594 * File generated by solenv/bin/native-code.py
597 #include <config_features.h>
598 #include <config_fuzzers.h>
599 #include <config_gpgme.h>
600 #include <osl/detail/component-mapping.h>
604 if not options
.pure_c
:
605 print ("""extern "C" {""")
607 for entry
in sorted(full_factory_map
.keys()):
608 factory_function
= full_factory_map
[entry
]['function']
609 factory_guard
= full_factory_map
[entry
]['guard']
611 print (factory_guard
)
612 print('void * ' + factory_function
+ '( const char* , void* , void* );')
617 for constructor
in sorted(full_constructor_map
.keys()):
618 constructor_guard
= get_constructor_guard(constructor
)
619 if constructor_guard
:
620 print (constructor_guard
)
621 print ('void * '+constructor
+'( void *, void * );')
622 if constructor_guard
:
626 for entry
in sorted(custom_widgets
):
627 print ('void make' + entry
+ '();')
628 print ('typedef void (*custom_widget_func)();')
629 print ('#if !ENABLE_FUZZERS')
630 print ('static struct { const char *name; custom_widget_func func; } custom_widgets[] = {')
631 for entry
in sorted(custom_widgets
):
632 print (' { "make' + entry
+ '", make' + entry
+ ' },')
637 custom_widget_func lo_get_custom_widget_func(const char* name)
643 for (size_t i = 0; i < sizeof(custom_widgets) / sizeof(custom_widgets[0]); i++)
644 if (strcmp(name, custom_widgets[i].name) == 0)
645 return custom_widgets[i].func;
652 const lib_to_factory_mapping *
653 lo_get_factory_map(void)
655 static lib_to_factory_mapping map[] = {""")
657 for entry
in sorted(full_factory_map
.keys()):
658 factory_function
= full_factory_map
[entry
]['function']
659 factory_guard
= full_factory_map
[entry
]['guard']
661 print (factory_guard
)
662 print(' { "' + entry
+ '", ' + factory_function
+ ' },')
672 extern void Java_org_libreoffice_kit_LibreOfficeKit_initializeNative();
673 volatile void *p = (void *) Java_org_libreoffice_kit_LibreOfficeKit_initializeNative;
675 extern void Java_org_libreoffice_kit_Office_getError();
676 p = (void *) Java_org_libreoffice_kit_Office_getError;
684 const lib_to_constructor_mapping *
685 lo_get_constructor_map(void)
687 static lib_to_constructor_mapping map[] = {""")
689 for constructor
in sorted(full_constructor_map
.keys()):
690 constructor_guard
= get_constructor_guard(constructor
)
691 if constructor_guard
:
692 print (constructor_guard
)
693 print (' { "' +constructor
+ '", ' +constructor
+ ' },')
694 if constructor_guard
:
705 if not options
.pure_c
:
708 # vim:set shiftwidth=4 softtabstop=4 expandtab: