Kaydet (Commit) 645fb66b authored tarafından Matúš Kukan's avatar Matúš Kukan Kaydeden (comit) Tor Lillqvist

Use native-code.py generated code also for iOS.

This allows us to get rid of component-declarations.h and
simplify component-mapping.h.
For new, converted, implementation_getFactories, adding one line into
native-code.py should be enough to make them available in application.

Change-Id: I042320e5b7f8a9aa9f02b77d2bdd07cf9a690ee6
üst c48ecfaf
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* 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/.
*/
#ifndef INCLUDED_OSL_DETAIL_COMPONENT_DECLARATIONS_H
#define INCLUDED_OSL_DETAIL_COMPONENT_DECLARATIONS_H
#ifdef DISABLE_DYNLOADING
#ifdef __cplusplus
extern "C" {
#endif
void * analysis_component_getFactory( const char * , void * , void * );
void * animcore_component_getFactory( const char * , void * , void * );
void * avmedia_component_getFactory( const char * , void * , void * );
void * basprov_component_getFactory( const char * , void * , void * );
void * bootstrap_component_getFactory( const char * , void * , void * );
void * chartcore_component_getFactory( const char * , void * , void * );
void * comphelp_component_getFactory( const char * , void * , void * );
void * configmgr_component_getFactory( const char * , void * , void * );
void * cui_component_getFactory( const char * , void * , void * );
void * date_component_getFactory( const char * , void * , void * );
void * dba_component_getFactory( const char * , void * , void * );
void * dbaxml_component_getFactory( const char * , void * , void * );
void * deployment_component_getFactory( const char * , void * , void * );
void * dlgprov_component_getFactory( const char * , void * , void * );
void * embobj_component_getFactory( const char * , void * , void * );
void * emboleobj_component_getFactory( const char * , void * , void * );
void * evtatt_component_getFactory( const char * , void * , void * );
void * filterconfig1_component_getFactory( const char * , void * , void * );
void * frm_component_getFactory( const char * , void * , void * );
void * fsstorage_component_getFactory( const char * , void * , void * );
void * fwk_component_getFactory( const char * , void * , void * );
void * fwl_component_getFactory( const char * , void * , void * );
void * fwm_component_getFactory( const char * , void * , void * );
void * hwp_component_getFactory( const char * , void * , void * );
void * hyphen_component_getFactory( const char * , void * , void * );
void * i18npool_component_getFactory( const char * , void * , void * );
void * i18nsearch_component_getFactory( const char * , void * , void * );
void * introspection_component_getFactory( const char * , void * , void * );
void * lng_component_getFactory( const char * , void * , void * );
void * lnth_component_getFactory( const char * , void * , void * );
void * localebe1_component_getFactory( const char * , void * , void * );
void * oox_component_getFactory( const char * , void * , void * );
void * package2_component_getFactory( const char * , void * , void * );
void * pricing_component_getFactory( const char * , void * , void * );
void * protocolhandler_component_getFactory( const char * , void * , void * );
void * reflection_component_getFactory( const char * , void * , void * );
void * sb_component_getFactory( const char * , void * , void * );
void * sc_component_getFactory( const char * , void * , void * );
void * scd_component_getFactory( const char * , void * , void * );
void * scfilt_component_getFactory( const char * , void * , void * );
void * scriptframe_component_getFactory( const char * , void * , void * );
void * sd_component_getFactory( const char * , void * , void * );
void * sdd_component_getFactory( const char * , void * , void * );
void * sfx_component_getFactory( const char * , void * , void * );
void * sm_component_getFactory( const char * , void * , void * );
void * smd_component_getFactory( const char * , void * , void * );
void * sot_component_getFactory( const char * , void * , void * );
void * spell_component_getFactory( const char * , void * , void * );
void * spl_component_getFactory( const char * , void * , void * );
void * stocservices_component_getFactory( const char * , void * , void * );
void * stringresource_component_getFactory( const char * , void * , void * );
void * svgfilter_component_getFactory( const char * , void * , void * );
void * svl_component_getFactory( const char * , void * , void * );
void * svt_component_getFactory( const char * , void * , void * );
void * svx_component_getFactory( const char * , void * , void * );
void * svxcore_component_getFactory( const char * , void * , void * );
void * sw_component_getFactory( const char * , void * , void * );
void * swd_component_getFactory( const char * , void * , void * );
void * t602filter_component_getFactory( const char * , void * , void * );
void * textfd_component_getFactory( const char * , void * , void * );
void * tk_component_getFactory( const char * , void * , void * );
void * ucb_component_getFactory( const char * , void * , void * );
void * ucpexpand1_component_getFactory( const char * , void * , void * );
void * ucpfile_component_getFactory( const char * , void * , void * );
void * ucppkg1_component_getFactory( const char * , void * , void * );
void * unordf_component_getFactory( const char * , void * , void * );
void * unoxml_component_getFactory( const char * , void * , void * );
void * utl_component_getFactory( const char * , void * , void * );
void * uui_component_getFactory( const char * , void * , void * );
void * vbaevents_component_getFactory( const char * , void * , void * );
void * vbaswobj_component_getFactory( const char * , void * , void * );
void * vcl_component_getFactory( const char * , void * , void * );
void * wpftdraw_component_getFactory( const char * , void * , void * );
void * wpftwriter_component_getFactory( const char * , void * , void * );
void * writerfilter_component_getFactory( const char * , void * , void * );
void * xmlfd_component_getFactory( const char * , void * , void * );
void * xmlsecurity_component_getFactory( const char * , void * , void * );
void * xo_component_getFactory( const char * , void * , void * );
void * xof_component_getFactory( const char * , void * , void * );
void * xstor_component_getFactory( const char * , void * , void * );
void * com_sun_star_comp_extensions_xml_sax_FastParser( void * , void * );
void * com_sun_star_comp_extensions_xml_sax_ParserExpat( void * , void * );
void * com_sun_star_comp_stoc_DLLComponentLoader( void * , void * );
void * com_sun_star_comp_stoc_ImplementationRegistration( void * , void * );
void * com_sun_star_comp_stoc_NestedRegistry( void * , void * );
void * com_sun_star_comp_stoc_ORegistryServiceManager( void * , void * );
void * com_sun_star_comp_stoc_OServiceManager( void * , void * );
void * com_sun_star_comp_stoc_OServiceManagerWrapper( void * , void * );
void * com_sun_star_comp_stoc_SimpleRegistry( void * , void * );
void * com_sun_star_extensions_xml_sax_Writer( void * , void * );
void * com_sun_star_security_comp_stoc_AccessController( void * , void * );
void * com_sun_star_security_comp_stoc_FilePolicy( void * , void * );
#ifdef __cplusplus
}
#endif
#endif /* DISABLE_DYNLOADING */
#endif // INCLUDED_OSL_DETAIL_COMPONENT_DECLARATIONS_H
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -10,8 +10,6 @@ ...@@ -10,8 +10,6 @@
#ifndef INCLUDED_OSL_DETAIL_COMPONENT_MAPPING_H #ifndef INCLUDED_OSL_DETAIL_COMPONENT_MAPPING_H
#define INCLUDED_OSL_DETAIL_COMPONENT_MAPPING_H #define INCLUDED_OSL_DETAIL_COMPONENT_MAPPING_H
#include <osl/detail/component-declarations.h>
#ifdef DISABLE_DYNLOADING #ifdef DISABLE_DYNLOADING
#ifdef __cplusplus #ifdef __cplusplus
...@@ -43,111 +41,6 @@ const lib_to_constructor_mapping *lo_get_constructor_map(void); ...@@ -43,111 +41,6 @@ const lib_to_constructor_mapping *lo_get_constructor_map(void);
} }
#endif #endif
#define LO_CORE_FACTORY_MAP \
{ "libembobj.a", embobj_component_getFactory }, \
{ "libemboleobj.a", emboleobj_component_getFactory }, \
{ "libintrospectionlo.a", introspection_component_getFactory }, \
{ "libreflectionlo.a", reflection_component_getFactory }, \
{ "libstocserviceslo.a", stocservices_component_getFactory }, \
{ "libcomphelper.a", comphelp_component_getFactory }, \
{ "libconfigmgrlo.a", configmgr_component_getFactory }, \
{ "libdeployment.a", deployment_component_getFactory }, \
{ "libevtattlo.a", evtatt_component_getFactory }, \
{ "libfilterconfiglo.a", filterconfig1_component_getFactory }, \
{ "libfsstoragelo.a", fsstorage_component_getFactory }, \
{ "libfwklo.a", fwk_component_getFactory }, \
{ "libfwllo.a", fwl_component_getFactory }, \
{ "libhyphenlo.a", hyphen_component_getFactory }, \
{ "libi18npoollo.a", i18npool_component_getFactory }, \
{ "liblnglo.a", lng_component_getFactory }, \
{ "liblnthlo.a", lnth_component_getFactory }, \
{ "liblocalebe1lo.a", localebe1_component_getFactory }, \
{ "libooxlo.a", oox_component_getFactory }, \
{ "libpackage2.a", package2_component_getFactory }, \
{ "libsfxlo.a", sfx_component_getFactory }, \
{ "libsotlo.a", sot_component_getFactory }, \
{ "libspelllo.a", spell_component_getFactory }, \
{ "libsvllo.a", svl_component_getFactory }, \
{ "libsvtlo.a", svt_component_getFactory }, \
{ "libsvxlo.a", svx_component_getFactory }, \
{ "libtklo.a", tk_component_getFactory }, \
{ "libucb1.a", ucb_component_getFactory }, \
{ "libucpexpand1lo.a", ucpexpand1_component_getFactory }, \
{ "libucpfile1.a", ucpfile_component_getFactory }, \
{ "libunordflo.a", unordf_component_getFactory }, \
{ "libunoxmllo.a", unoxml_component_getFactory }, \
{ "libutllo.a", utl_component_getFactory }, \
{ "libvcllo.a", vcl_component_getFactory }, \
{ "libxmlsecurity.a", xmlsecurity_component_getFactory }, \
{ "libxolo.a", xo_component_getFactory }, \
{ "libxoflo.a", xof_component_getFactory }, \
{ "libxstor.a", xstor_component_getFactory }, \
#define LO_EXTENDED_CORE_FACTORY_MAP \
LO_CORE_FACTORY_MAP \
{ "libanimcorelo.a", animcore_component_getFactory }, \
{ "libavmedialo.a", avmedia_component_getFactory }, \
{ "libchartcorelo.a", chartcore_component_getFactory }, \
{ "libfilterconfiglo.a", filterconfig1_component_getFactory }, \
{ "libfrmlo.a", frm_component_getFactory }, \
{ "libfwklo.a", fwk_component_getFactory }, \
{ "libfwmlo.a", fwm_component_getFactory }, \
{ "libsvxcorelo.a", svxcore_component_getFactory }, \
{ "libtextfdlo.a", textfd_component_getFactory }, \
{ "libtklo.a", tk_component_getFactory }, \
{ "libucppkg1.a", ucppkg1_component_getFactory }, \
{ "libxmlfdlo.a", xmlfd_component_getFactory }, \
#define LO_BASE_CORE_FACTORY_MAP \
{ "libdbalo.a", dba_component_getFactory }, \
{ "libdbaxmllo.a", dbaxml_component_getFactory }, \
#define LO_CALC_CORE_FACTORY_MAP \
{ "libscdlo.a", scd_component_getFactory }, \
{ "libscfiltlo.a", scfilt_component_getFactory }, \
{ "libsclo.a", sc_component_getFactory }, \
#define LO_CALC_FACTORY_MAP \
LO_CALC_CORE_FACTORY_MAP \
{ "libanalysislo.a", analysis_component_getFactory }, \
{ "libdatelo.a", date_component_getFactory }, \
{ "libpricinglo.a", pricing_component_getFactory }, \
#define LO_DRAW_CORE_FACTORY_MAP \
{ "libsddlo.a", sdd_component_getFactory }, \
{ "libsdlo.a", sd_component_getFactory }, \
{ "libsvgfilterlo.a", svgfilter_component_getFactory }, \
{ "libwpftdrawlo.a", wpftdraw_component_getFactory }, \
#define LO_MATH_FACTORY_MAP \
{ "libsmdlo.a", smd_component_getFactory }, \
{ "libsmlo.a", sm_component_getFactory }, \
#define LO_WRITER_CORE_FACTORY_MAP \
{ "libswdlo.a", swd_component_getFactory }, \
{ "libswlo.a", sw_component_getFactory }, \
{ "libwriterfilterlo.a", writerfilter_component_getFactory }, \
#define LO_WRITER_FACTORY_MAP \
LO_WRITER_CORE_FACTORY_MAP \
{ "libhwplo.a", hwp_component_getFactory }, \
{ "libt602filterlo.a", t602filter_component_getFactory }, \
{ "libwpftwriterlo.a", wpftwriter_component_getFactory }, \
#define NON_APP_SPECIFIC_CONSTRUCTOR_MAP \
{ "com_sun_star_comp_extensions_xml_sax_ParserExpat", com_sun_star_comp_extensions_xml_sax_ParserExpat }, \
{ "com_sun_star_comp_extensions_xml_sax_FastParser", com_sun_star_comp_extensions_xml_sax_FastParser }, \
{ "com_sun_star_comp_stoc_DLLComponentLoader", com_sun_star_comp_stoc_DLLComponentLoader }, \
{ "com_sun_star_comp_stoc_ImplementationRegistration", com_sun_star_comp_stoc_ImplementationRegistration }, \
{ "com_sun_star_comp_stoc_NestedRegistry", com_sun_star_comp_stoc_NestedRegistry }, \
{ "com_sun_star_comp_stoc_ORegistryServiceManager", com_sun_star_comp_stoc_ORegistryServiceManager }, \
{ "com_sun_star_comp_stoc_OServiceManager", com_sun_star_comp_stoc_OServiceManager }, \
{ "com_sun_star_comp_stoc_OServiceManagerWrapper", com_sun_star_comp_stoc_OServiceManagerWrapper }, \
{ "com_sun_star_comp_stoc_SimpleRegistry", com_sun_star_comp_stoc_SimpleRegistry }, \
{ "com_sun_star_extensions_xml_sax_Writer", com_sun_star_extensions_xml_sax_Writer }, \
{ "com_sun_star_security_comp_stoc_AccessController", com_sun_star_security_comp_stoc_AccessController }, \
{ "com_sun_star_security_comp_stoc_FilePolicy", com_sun_star_security_comp_stoc_FilePolicy }, \
#endif /* DISABLE_DYNLOADING */ #endif /* DISABLE_DYNLOADING */
#endif // INCLUDED_OSL_DETAIL_COMPONENT_MAPPING_H #endif // INCLUDED_OSL_DETAIL_COMPONENT_MAPPING_H
......
...@@ -137,6 +137,10 @@ else ...@@ -137,6 +137,10 @@ else
# Copy the Xcode project to BUILDDIR if SRCDIR!=BUILDDIR, so that one # Copy the Xcode project to BUILDDIR if SRCDIR!=BUILDDIR, so that one
# can then open it from there in Xcode. # can then open it from there in Xcode.
$(call gb_CustomTarget_get_target,ios/LibreOffice_app) : $(gb_Helper_PHONY) $(call gb_CustomTarget_get_target,ios/LibreOffice_app) : $(gb_Helper_PHONY)
$(SRCDIR)/solenv/bin/native-code.py \
-g extended_core -g writer \
-s cui -s spl -s uui \
> $(SRCDIR)/ios/experimental/LibreOffice/LibreOffice/native-code.mm
if test $(SRCDIR) != $(BUILDDIR); then \ if test $(SRCDIR) != $(BUILDDIR); then \
(cd $(SRCDIR) && tar cf - ios/experimental/LibreOffice/LibreOffice.xcodeproj/project.pbxproj) | (cd $(BUILDDIR) && tar xf -); \ (cd $(SRCDIR) && tar cf - ios/experimental/LibreOffice/LibreOffice.xcodeproj/project.pbxproj) | (cd $(BUILDDIR) && tar xf -); \
fi fi
......
...@@ -33,6 +33,10 @@ $(eval $(call gb_CustomTarget_CustomTarget,ios/MobileLibreOffice)) ...@@ -33,6 +33,10 @@ $(eval $(call gb_CustomTarget_CustomTarget,ios/MobileLibreOffice))
$(call gb_CustomTarget_get_target,ios/MobileLibreOffice): $(call gb_CustomTarget_get_target,ios/Lo_Xcconfig) MobileLibreOffice_setup $(call gb_CustomTarget_get_target,ios/MobileLibreOffice): $(call gb_CustomTarget_get_target,ios/Lo_Xcconfig) MobileLibreOffice_setup
#============================================================================== #==============================================================================
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),APP,2) $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),APP,2)
$(SRCDIR)/solenv/bin/native-code.py \
-g core -g writer_core \
-s i18nsearch -s uui \
> $(SRCDIR)/ios/shared/ios_sharedlo/cxx/native-code.mm
$(call MobileLibreOfficeXcodeBuild, clean build) $(call MobileLibreOfficeXcodeBuild, clean build)
#============================================================================== #==============================================================================
......
...@@ -28,6 +28,10 @@ $(eval $(call gb_CustomTarget_CustomTarget,ios/TiledLibreOffice)) ...@@ -28,6 +28,10 @@ $(eval $(call gb_CustomTarget_CustomTarget,ios/TiledLibreOffice))
# Depend on the custom target that sets up lo.xcconfig # Depend on the custom target that sets up lo.xcconfig
$(call gb_CustomTarget_get_target,ios/TiledLibreOffice): $(call gb_CustomTarget_get_target,ios/Lo_Xcconfig) TiledLibreOffice_setup $(call gb_CustomTarget_get_target,ios/TiledLibreOffice): $(call gb_CustomTarget_get_target,ios/Lo_Xcconfig) TiledLibreOffice_setup
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),APP,2) $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),APP,2)
$(SRCDIR)/solenv/bin/native-code.py \
-g extended_core -g writer \
-s cui -s spl -s uui \
> $(SRCDIR)/ios/experimental/TiledLibreOffice/TiledLibreOffice/native-code.mm
$(call TiledLibreOfficeXcodeBuild, clean build) $(call TiledLibreOfficeXcodeBuild, clean build)
# Setup # Setup
......
...@@ -12,38 +12,11 @@ ...@@ -12,38 +12,11 @@
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
#include <postmac.h> #include <postmac.h>
#include <osl/detail/component-mapping.h>
#include <osl/process.h> #include <osl/process.h>
#include <touch/touch.h> #include <touch/touch.h>
extern "C" // generated by solenv/bin/native-code.py:
const lib_to_factory_mapping * #include "native-code.mm"
lo_get_factory_map(void)
{
static lib_to_factory_mapping map[] = {
LO_EXTENDED_CORE_FACTORY_MAP
LO_WRITER_FACTORY_MAP
{ "libcuilo.a", cui_component_getFactory },
{ "libspllo.a", spl_component_getFactory },
{ "libsvtlo.a", svt_component_getFactory },
{ "libuuilo.a", uui_component_getFactory },
{ NULL, NULL }
};
return map;
}
extern "C"
const lib_to_constructor_mapping *
lo_get_constructor_map(void)
{
static lib_to_constructor_mapping map[] = {
NON_APP_SPECIFIC_CONSTRUCTOR_MAP
{ NULL, NULL }
};
return map;
}
extern "C" extern "C"
void void
......
...@@ -12,37 +12,11 @@ ...@@ -12,37 +12,11 @@
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
#include <postmac.h> #include <postmac.h>
#include <osl/detail/component-mapping.h>
#include <osl/process.h> #include <osl/process.h>
#include <touch/touch.h> #include <touch/touch.h>
extern "C" // generated by solenv/bin/native-code.py:
const lib_to_factory_mapping * #include "native-code.mm"
lo_get_factory_map(void)
{
static lib_to_factory_mapping map[] = {
LO_EXTENDED_CORE_FACTORY_MAP
LO_WRITER_FACTORY_MAP
{ "libcuilo.a", cui_component_getFactory },
{ "libspllo.a", spl_component_getFactory },
{ "libuuilo.a", uui_component_getFactory },
{ NULL, NULL }
};
return map;
}
extern "C"
const lib_to_constructor_mapping *
lo_get_constructor_map(void)
{
static lib_to_constructor_mapping map[] = {
NON_APP_SPECIFIC_CONSTRUCTOR_MAP
{ NULL, NULL }
};
return map;
}
static NSString *createPaths(NSString *base, NSString *appRootEscaped, NSArray *fileNames) static NSString *createPaths(NSString *base, NSString *appRootEscaped, NSArray *fileNames)
{ {
......
...@@ -13,41 +13,12 @@ ...@@ -13,41 +13,12 @@
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
#include <postmac.h> #include <postmac.h>
#include <osl/detail/component-mapping.h>
#include <touch/touch.h> #include <touch/touch.h>
#undef TimeValue #undef TimeValue
#include <osl/process.h> #include <osl/process.h>
#define MAP_LIB(LIB) { "lib" #LIB ".a", LIB##_component_getFactory } // generated by solenv/bin/native-code.py:
#define MAP_LIB_LO(LIB) { "lib" #LIB "lo.a", LIB##_component_getFactory } #include "native-code.mm"
#define MAP_LIB_LO_1(LIB) { "lib" #LIB "lo.a", LIB##1_component_getFactory }
extern "C"
const lib_to_factory_mapping *
lo_get_factory_map(void)
{
static lib_to_factory_mapping map[] = {
LO_CORE_FACTORY_MAP
LO_WRITER_CORE_FACTORY_MAP
MAP_LIB_LO(uui),
MAP_LIB_LO(i18nsearch),
{ NULL, NULL }
};
return map;
}
extern "C"
const lib_to_constructor_mapping *
lo_get_constructor_map(void)
{
static lib_to_constructor_mapping map[] = {
NON_APP_SPECIFIC_CONSTRUCTOR_MAP
{ NULL, NULL }
};
return map;
}
NSString * createPaths(NSString * base,NSString * appRootEscaped,NSArray * fileNames){ NSString * createPaths(NSString * base,NSString * appRootEscaped,NSArray * fileNames){
NSString * prefix = @"file://"; NSString * prefix = @"file://";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment