summaryrefslogtreecommitdiff
path: root/ios
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@collabora.com>2013-12-31 15:05:01 +0100
committerTor Lillqvist <tml@collabora.com>2014-01-01 17:33:29 +0200
commit645fb66bbdf756cedbcbcfd8be59ce9f58b2e731 (patch)
tree40177b3e17190bc89ae8c54fbc3262cb1d88a76f /ios
parentc48ecfaf2b31f6dd64b6c779ed3a076a7efbc113 (diff)
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
Diffstat (limited to 'ios')
-rw-r--r--ios/CustomTarget_LibreOffice_app.mk4
-rw-r--r--ios/CustomTarget_MobileLibreOffice_app.mk4
-rw-r--r--ios/CustomTarget_TiledLibreOffice_app.mk4
-rw-r--r--ios/experimental/LibreOffice/LibreOffice/lo.mm31
-rw-r--r--ios/experimental/TiledLibreOffice/TiledLibreOffice/lo.mm30
-rw-r--r--ios/shared/ios_sharedlo/cxx/mlo.mm33
6 files changed, 18 insertions, 88 deletions
diff --git a/ios/CustomTarget_LibreOffice_app.mk b/ios/CustomTarget_LibreOffice_app.mk
index 719ff0905bb7..f9101148dc91 100644
--- a/ios/CustomTarget_LibreOffice_app.mk
+++ b/ios/CustomTarget_LibreOffice_app.mk
@@ -137,6 +137,10 @@ else
# Copy the Xcode project to BUILDDIR if SRCDIR!=BUILDDIR, so that one
# can then open it from there in Xcode.
$(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 \
(cd $(SRCDIR) && tar cf - ios/experimental/LibreOffice/LibreOffice.xcodeproj/project.pbxproj) | (cd $(BUILDDIR) && tar xf -); \
fi
diff --git a/ios/CustomTarget_MobileLibreOffice_app.mk b/ios/CustomTarget_MobileLibreOffice_app.mk
index dcf20d911308..997ad10cbbcd 100644
--- a/ios/CustomTarget_MobileLibreOffice_app.mk
+++ b/ios/CustomTarget_MobileLibreOffice_app.mk
@@ -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_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)
#==============================================================================
diff --git a/ios/CustomTarget_TiledLibreOffice_app.mk b/ios/CustomTarget_TiledLibreOffice_app.mk
index 44cacf50f4ac..7a280e286513 100644
--- a/ios/CustomTarget_TiledLibreOffice_app.mk
+++ b/ios/CustomTarget_TiledLibreOffice_app.mk
@@ -28,6 +28,10 @@ $(eval $(call gb_CustomTarget_CustomTarget,ios/TiledLibreOffice))
# 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_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)
# Setup
diff --git a/ios/experimental/LibreOffice/LibreOffice/lo.mm b/ios/experimental/LibreOffice/LibreOffice/lo.mm
index 04760a75bf91..3e69eb74c803 100644
--- a/ios/experimental/LibreOffice/LibreOffice/lo.mm
+++ b/ios/experimental/LibreOffice/LibreOffice/lo.mm
@@ -12,38 +12,11 @@
#import <UIKit/UIKit.h>
#include <postmac.h>
-#include <osl/detail/component-mapping.h>
#include <osl/process.h>
#include <touch/touch.h>
-extern "C"
-const lib_to_factory_mapping *
-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;
-}
+// generated by solenv/bin/native-code.py:
+#include "native-code.mm"
extern "C"
void
diff --git a/ios/experimental/TiledLibreOffice/TiledLibreOffice/lo.mm b/ios/experimental/TiledLibreOffice/TiledLibreOffice/lo.mm
index 755ff1a2384f..09cdc95d7605 100644
--- a/ios/experimental/TiledLibreOffice/TiledLibreOffice/lo.mm
+++ b/ios/experimental/TiledLibreOffice/TiledLibreOffice/lo.mm
@@ -12,37 +12,11 @@
#import <UIKit/UIKit.h>
#include <postmac.h>
-#include <osl/detail/component-mapping.h>
#include <osl/process.h>
#include <touch/touch.h>
-extern "C"
-const lib_to_factory_mapping *
-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;
-}
+// generated by solenv/bin/native-code.py:
+#include "native-code.mm"
static NSString *createPaths(NSString *base, NSString *appRootEscaped, NSArray *fileNames)
{
diff --git a/ios/shared/ios_sharedlo/cxx/mlo.mm b/ios/shared/ios_sharedlo/cxx/mlo.mm
index 8095b2af19c1..4279d0d8a5d9 100644
--- a/ios/shared/ios_sharedlo/cxx/mlo.mm
+++ b/ios/shared/ios_sharedlo/cxx/mlo.mm
@@ -13,41 +13,12 @@
#import <UIKit/UIKit.h>
#include <postmac.h>
-#include <osl/detail/component-mapping.h>
#include <touch/touch.h>
#undef TimeValue
#include <osl/process.h>
-#define MAP_LIB(LIB) { "lib" #LIB ".a", LIB##_component_getFactory }
-#define MAP_LIB_LO(LIB) { "lib" #LIB "lo.a", LIB##_component_getFactory }
-#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;
-}
+// generated by solenv/bin/native-code.py:
+#include "native-code.mm"
NSString * createPaths(NSString * base,NSString * appRootEscaped,NSArray * fileNames){
NSString * prefix = @"file://";