[Libreoffice-commits] .: 9 commits - configure.ac cppunit/ExternalPackage_cppunit.mk ios/CustomTarget_Viewer_app.mk ios/Executable_Viewer.mk ios/experimental ios/Makefile ios/Module_ios.mk ios/prj Makefile.in openssl/ExternalProject_openssl.mk RepositoryExternal.mk Repository.mk RepositoryModule_ooo.mk solenv/gbuild solenv/lldb

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Jan 3 10:22:41 PST 2013


 Makefile.in                                               |    3 
 Repository.mk                                             |    8 
 RepositoryExternal.mk                                     |    5 
 RepositoryModule_ooo.mk                                   |    1 
 configure.ac                                              |    4 
 cppunit/ExternalPackage_cppunit.mk                        |    2 
 ios/CustomTarget_Viewer_app.mk                            |   59 ++
 ios/Executable_Viewer.mk                                  |   33 +
 ios/Makefile                                              |   13 
 ios/Module_ios.mk                                         |   20 
 ios/experimental/DocumentLoader/Makefile                  |  134 ------
 ios/experimental/DocumentLoader/docloader.mm              |  260 ------------
 ios/experimental/Viewer/.gitignore                        |    4 
 ios/experimental/Viewer/Viewer.xcodeproj/project.pbxproj  |  302 ++++++++++++++
 ios/experimental/Viewer/Viewer/Default-568h at 2x.png        |binary
 ios/experimental/Viewer/Viewer/Default.png                |binary
 ios/experimental/Viewer/Viewer/Default at 2x.png             |binary
 ios/experimental/Viewer/Viewer/Icon-72.png                |binary
 ios/experimental/Viewer/Viewer/Icon.png                   |binary
 ios/experimental/Viewer/Viewer/Icon at 2x.png                |binary
 ios/experimental/Viewer/Viewer/LOViewerAppDelegate.h      |   15 
 ios/experimental/Viewer/Viewer/LOViewerAppDelegate.mm     |   76 +++
 ios/experimental/Viewer/Viewer/Viewer-Info.plist          |   47 ++
 ios/experimental/Viewer/Viewer/Viewer-Prefix.pch          |   14 
 ios/experimental/Viewer/Viewer/en.lproj/InfoPlist.strings |    2 
 ios/experimental/Viewer/Viewer/iTunesArtwork              |binary
 ios/experimental/Viewer/Viewer/lo-viewer.h                |   18 
 ios/experimental/Viewer/Viewer/lo-viewer.mm               |  219 ++++++++++
 ios/experimental/Viewer/Viewer/main.mm                    |   21 
 ios/prj/build.lst                                         |    2 
 openssl/ExternalProject_openssl.mk                        |    2 
 solenv/gbuild/platform/IOS_ARM_GCC.mk                     |   48 --
 solenv/gbuild/platform/com_GCC_class.mk                   |   38 +
 solenv/gbuild/platform/macosx.mk                          |   39 -
 solenv/lldb/libreoffice/LO.py                             |   25 -
 35 files changed, 931 insertions(+), 483 deletions(-)

New commits:
commit 55e61ec26d44847ffa55537a6bbe49bdf2fe1d03
Author: Tor Lillqvist <tml at iki.fi>
Date:   Thu Jan 3 20:16:16 2013 +0200

    Use -Wl,-dead-strip
    
    Change-Id: I33a5dad31372b3add97ce31f6f9488a13f944f51

diff --git a/solenv/gbuild/platform/IOS_ARM_GCC.mk b/solenv/gbuild/platform/IOS_ARM_GCC.mk
index 7ab1bc8..4db1865 100644
--- a/solenv/gbuild/platform/IOS_ARM_GCC.mk
+++ b/solenv/gbuild/platform/IOS_ARM_GCC.mk
@@ -106,6 +106,8 @@ $(if $(filter Executable,$(1)),\
 	$$(call gb_Library_get_layer,$(2)))
 endef
 
+# To not export anything: -Wl$(COMMA)-exported_symbols_list$(COMMA)/dev/null
+# But for some reason that slows down ld significantly.
 
 define gb_LinkTarget__command_dynamiclink
 	$(if $(filter Library CppunitTest,$(TARGETTYPE)), at echo No dynamic libraries should be built for iOS && exit 1, \
@@ -114,6 +116,7 @@ define gb_LinkTarget__command_dynamiclink
 		$(gb_Executable_TARGETTYPEFLAGS) \
 		$(subst \d,$$,$(RPATH)) \
 		$(T_LDFLAGS) \
+		-Wl$(COMMA)-dead_strip \
 		$(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \
 		$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \
 		$(foreach object,$(ASMOBJECTS),$(call gb_AsmObject_get_target,$(object))) \
commit b99acf9b2a6c38de3466cd90eea0a4a289142f79
Author: Tor Lillqvist <tml at iki.fi>
Date:   Thu Jan 3 20:01:10 2013 +0200

    Fix typo: s/VISIBILTIY/VISIBILITY/
    
    Change-Id: I6c031e9d2e9211409b28ce0c20a3cd11119ab86e

diff --git a/openssl/ExternalProject_openssl.mk b/openssl/ExternalProject_openssl.mk
index a7bffbe..9f1210b 100644
--- a/openssl/ExternalProject_openssl.mk
+++ b/openssl/ExternalProject_openssl.mk
@@ -61,7 +61,7 @@ $(call gb_ExternalProject_get_state_target,openssl,build):
 	&& export MAKEFLAGS="$(MAKEFLAGS:r=)" \
 	&& $(MAKE) -j1 build_libs \
 	CC="$(CC) $(if $(filter-out WNT,$(OS)),\
-	$(if $(filter TRUE,$(HAVE_GCC_VISIBILTIY_FEATURE)),\
+	$(if $(filter TRUE,$(HAVE_GCC_VISIBILITY_FEATURE)),\
 	-fvisibility=hidden))" \
 	&& touch $@
 endif
commit 3e1a0ff45ea8fcb95505e03b5ce2418c077c214c
Author: Tor Lillqvist <tml at iki.fi>
Date:   Thu Jan 3 19:37:03 2013 +0200

    Factor out gb_ObjCxxObject__command and gb_ObjCObject__command
    
    They should be the same for Mac OS X and iOS, so keep just one copy,
    in com_GCC_class.mk. (Actually the iOS one was missing the
    gb_VISIBILITY_FLAGS, which caused some linker warnings.)
    
    Change-Id: I340fd7e262459bcc2b083c807b783d64d52040ee

diff --git a/solenv/gbuild/platform/IOS_ARM_GCC.mk b/solenv/gbuild/platform/IOS_ARM_GCC.mk
index 944bac7..7ab1bc8 100644
--- a/solenv/gbuild/platform/IOS_ARM_GCC.mk
+++ b/solenv/gbuild/platform/IOS_ARM_GCC.mk
@@ -81,43 +81,6 @@ gb_LinkTarget_LDFLAGS := \
 
 gb_DEBUG_CFLAGS := -g -fno-inline
 
-# ObjCxxObject class
-
-define gb_ObjCxxObject__command
-$(call gb_Output_announce,$(2).mm,$(true),OCX,3)
-$(call gb_Helper_abbreviate_dirs,\
-	mkdir -p $(dir $(1)) $(dir $(4)) && \
-	$(gb_CXX) \
-		$(DEFS) \
-		$(T_OBJCXXFLAGS) \
-		$(if $(WARNINGS_NOT_ERRORS),,$(gb_CXXFLAGS_WERROR)) \
-		-c $(3) \
-		-o $(1) \
-		-MMD -MT $(1) \
-		-MP -MF $(4) \
-		-I$(dir $(3)) \
-		$(INCLUDE))
-endef
-
-# ObjCObject class
-
-define gb_ObjCObject__command
-$(call gb_Output_announce,$(2).m,$(true),OCC,3)
-$(call gb_Helper_abbreviate_dirs,\
-	mkdir -p $(dir $(1)) && \
-	mkdir -p $(dir $(call gb_ObjCObject_get_dep_target,$(2))) && \
-	$(gb_CC) \
-		$(DEFS) $(OBJCFLAGS) \
-		$(if $(WARNINGS_NOT_ERRORS),,$(gb_CFLAGS_WERROR)) \
-		-c $(3) \
-		-o $(1) \
-		-MMD -MT $(call gb_ObjCObject_get_target,$(2)) \
-		-MP -MF $(call gb_ObjCObject_get_dep_target,$(2)) \
-		-I$(dir $(3)) \
-		$(INCLUDE))
-endef
-
-
 # LinkTarget class
 
 gb_LinkTarget_CFLAGS := $(gb_CFLAGS)
diff --git a/solenv/gbuild/platform/com_GCC_class.mk b/solenv/gbuild/platform/com_GCC_class.mk
index 80a168e..350e000 100644
--- a/solenv/gbuild/platform/com_GCC_class.mk
+++ b/solenv/gbuild/platform/com_GCC_class.mk
@@ -132,6 +132,44 @@ $(call gb_Helper_abbreviate_dirs,\
 		)
 endef
 
+# ObjCxxObject class
+
+define gb_ObjCxxObject__command
+$(call gb_Output_announce,$(2).mm,$(true),OCX,3)
+$(call gb_Helper_abbreviate_dirs,\
+	mkdir -p $(dir $(1)) $(dir $(4)) && \
+	$(gb_CXX) \
+		$(DEFS) \
+		$(if $(VISIBILITY),,$(gb_VISIBILITY_FLAGS)) \
+		$(if $(WARNINGS_NOT_ERRORS),,$(gb_CXXFLAGS_WERROR)) \
+		$(T_OBJCXXFLAGS) \
+		-c $(3) \
+		-o $(1) \
+		-MMD -MT $(1) \
+		-MP -MF $(4) \
+		-I$(dir $(3)) \
+		$(INCLUDE))
+endef
+
+# ObjCObject class
+
+define gb_ObjCObject__command
+$(call gb_Output_announce,$(2).m,$(true),OCC,3)
+$(call gb_Helper_abbreviate_dirs,\
+	mkdir -p $(dir $(1)) $(dir $(4)) && \
+	$(gb_CC) \
+		$(DEFS) \
+		$(if $(VISIBILITY),,$(gb_VISIBILITY_FLAGS)) \
+		$(if $(WARNINGS_NOT_ERRORS),,$(gb_CFLAGS_WERROR)) \
+		$(T_OBJCFLAGS) \
+		-c $(3) \
+		-o $(1) \
+		-MMD -MT $(1) \
+		-MP -MF $(4) \
+		-I$(dir $(3)) \
+		$(INCLUDE))
+endef
+
 define gb_SrsPartTarget__command_dep
 $(call gb_Helper_abbreviate_dirs,\
 	mkdir -p $(dir $(call gb_SrsPartTarget_get_dep_target,$(1))) && cd $(SRCDIR) && \
diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk
index b2905bd..ed596e7 100644
--- a/solenv/gbuild/platform/macosx.mk
+++ b/solenv/gbuild/platform/macosx.mk
@@ -97,45 +97,6 @@ gb_DEBUG_CFLAGS := -g
 gb_COMPILEROPTFLAGS := -O2
 gb_COMPILERNOOPTFLAGS := -O0
 
-# ObjCxxObject class
-
-define gb_ObjCxxObject__command
-$(call gb_Output_announce,$(2).mm,$(true),OCX,3)
-$(call gb_Helper_abbreviate_dirs,\
-	mkdir -p $(dir $(1)) $(dir $(4)) && \
-	$(gb_CXX) \
-		$(DEFS) \
-		$(if $(VISIBILITY),,$(gb_VISIBILITY_FLAGS)) \
-		$(if $(WARNINGS_NOT_ERRORS),,$(gb_CXXFLAGS_WERROR)) \
-		$(T_OBJCXXFLAGS) \
-		-c $(3) \
-		-o $(1) \
-		-MMD -MT $(1) \
-		-MP -MF $(4) \
-		-I$(dir $(3)) \
-		$(INCLUDE))
-endef
-
-# ObjCObject class
-
-define gb_ObjCObject__command
-$(call gb_Output_announce,$(2).m,$(true),OCC,3)
-$(call gb_Helper_abbreviate_dirs,\
-	mkdir -p $(dir $(1)) $(dir $(4)) && \
-	$(gb_CC) \
-		$(DEFS) \
-		$(if $(VISIBILITY),,$(gb_VISIBILITY_FLAGS)) \
-		$(if $(WARNINGS_NOT_ERRORS),,$(gb_CFLAGS_WERROR)) \
-		$(T_OBJCFLAGS) \
-		-c $(3) \
-		-o $(1) \
-		-MMD -MT $(1) \
-		-MP -MF $(4) \
-		-I$(dir $(3)) \
-		$(INCLUDE))
-endef
-
-
 # LinkTarget class
 
 define gb_LinkTarget__get_rpath_for_layer
commit 449d657b10446e77b388ff01d4f595b50ecf7c49
Author: Tor Lillqvist <tml at iki.fi>
Date:   Thu Jan 3 15:30:31 2013 +0200

    Don't do dynamic lib tests when we aren't going to build such
    
    Change-Id: I3190fba16638512dbc4247fa3fa95c39fa377b34

diff --git a/configure.ac b/configure.ac
index c60ae01..9f9527d67 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5708,7 +5708,9 @@ istringstream strm( "test" ); return 0;
         LDFLAGS=$sharedlink_ldflags_save
     fi
 
-    if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE" -a "$HAVE_GCC_VISIBILITY_BROKEN" != "TRUE"; then
+    # As the below test checks things when linking self-compiled dynamic libraries, it presumably is irrelevant
+    # when we don't make any dynamic libraries?
+    if test "$DISABLE_DYNLOADING" = "" -a "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE" -a "$HAVE_GCC_VISIBILITY_BROKEN" != "TRUE"; then
         AC_MSG_CHECKING([if gcc is -fvisibility-inlines-hidden safe (Clang bug 11250)])
         cat > conftestlib1.cc <<_ACEOF
 template<typename T> struct S1 { virtual ~S1() {} virtual void f() {} };
commit 13eca8620a34670a1941e7546825f063b4d28efe
Author: Tor Lillqvist <tml at iki.fi>
Date:   Thu Jan 3 13:29:08 2013 +0200

    More hacking on an iOS "Viewer" app that doesn't do much anything yet
    
    The Viewer app is intended to eventually resemble the experimental
    Android DocumentLoader app.
    
    Build using the gbuild mechanism, which is also invoked from an Xcode
    project. This seems to work out fine, the resulting app installs at
    least on the simulator, and you can debug all the LO code involved
    even if Xcode (obviously) has no knowledge of the LO source
    files/classes/etc.
    
    Change-Id: Ic96178d80b8d6467cac969b29e37f0d39513acf9

diff --git a/Makefile.in b/Makefile.in
index 8f7dc97..b5a0428 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -287,6 +287,9 @@ endif
 ifeq ($(OS),ANDROID)
 	cd android && $(GNUMAKE) -j $(PARALLELISM) $(GMAKE_OPTIONS)
 endif
+ifeq ($(OS),IOS)
+	cd ios && $(GNUMAKE) -j $(PARALLELISM) $(GMAKE_OPTIONS)
+endif
 
 build-nocheck : export SKIP_TESTS := YES
 build-nocheck : build
diff --git a/Repository.mk b/Repository.mk
index b712bd2..ddf2785 100755
--- a/Repository.mk
+++ b/Repository.mk
@@ -208,6 +208,14 @@ $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
 ))
 endif
 
+ifeq ($(OS),IOS)
+
+$(eval $(call gb_Helper_register_executables,NONE,\
+    Viewer \
+))
+
+endif
+
 ifeq ($(OS),MACOSX)
 
 $(eval $(call gb_Helper_register_libraries,PLAINLIBS_NONE, \
diff --git a/RepositoryModule_ooo.mk b/RepositoryModule_ooo.mk
index 966cfb1..ff6c730 100644
--- a/RepositoryModule_ooo.mk
+++ b/RepositoryModule_ooo.mk
@@ -98,6 +98,7 @@ $(eval $(call gb_Module_add_moduledirs,ooo,\
 	idl \
 	$(call gb_Helper_optional,DESKTOP,idlc) \
 	io \
+	ios \
 	javaunohelper \
 	$(call gb_Helper_optional,JFREEREPORT,jfreereport) \
 	jurt \
diff --git a/ios/CustomTarget_Viewer_app.mk b/ios/CustomTarget_Viewer_app.mk
new file mode 100644
index 0000000..feb0a46
--- /dev/null
+++ b/ios/CustomTarget_Viewer_app.mk
@@ -0,0 +1,59 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# 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/.
+
+$(eval $(call gb_CustomTarget_CustomTarget,ios/Viewer_app))
+
+# We distinguish between builds for the simulator and device by
+# looking for the "iarmv7" or "i386" in the -arch option that is part
+# of $(CC)
+
+ifneq ($(filter i386,$(CC)),)
+xcode_sdk=iphonesimulator
+xcode_arch=i386
+else
+xcode_sdk=iphoneos
+xcode_arch=armv7
+endif
+
+ifeq ($(debug),)
+xcode_config := Release
+else
+xcode_config := Debug
+endif
+
+# If run from Xcode, check that its configuration (device or
+# simulator) matches that of gbuild. We detect being run from Xcode by
+# looking for $(XCODE_VERSION_ACTUAL)
+
+ifneq ($(XCODE_VERSION_ACTUAL),)
+
+export CCACHE_CPP2=y
+
+ifneq ($(CURRENT_ARCH),$(xcode_arch))
+$(error Xcode platform (device or simulator) does not match that of this build tree)
+endif
+
+ifneq ($(CONFIGURATION),$(xcode_config))
+$(error Xcode configuration (release or debug) does not match that of this build tree)
+endif
+
+endif
+
+APP := Viewer
+
+ios_Viewer_app_DIR := $(SRC_ROOT)/ios/experimental/Viewer/DerivedData/$(APP)/Build/Products/$(xcode_config)-$(xcode_sdk)/$(APP).app
+
+ios_Viewer_app_EXE := $(ios_Viewer_app_DIR)/Viewer
+
+$(call gb_CustomTarget_get_target,ios/Viewer_app) : $(ios_Viewer_app_EXE)
+
+$(ios_Viewer_app_EXE): $(call gb_Executable_get_target,Viewer)
+	mkdir -p $(ios_Viewer_app_DIR)
+	cp $(call gb_Executable_get_target,Viewer) $(ios_Viewer_app_DIR)
+
+# vim: set noet sw=4 ts=4:
diff --git a/ios/Executable_Viewer.mk b/ios/Executable_Viewer.mk
new file mode 100644
index 0000000..1931b54
--- /dev/null
+++ b/ios/Executable_Viewer.mk
@@ -0,0 +1,33 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+$(eval $(call gb_Executable_Executable,Viewer))
+
+$(eval $(call gb_Executable_use_api,Viewer,\
+    udkapi \
+    offapi \
+))
+
+$(eval $(call gb_Executable_use_externals,Viewer,\
+    iconv \
+    zlib \
+))
+
+$(eval $(call gb_Executable_set_include,Viewer,\
+    $$(INCLUDE) \
+))
+
+$(eval $(call gb_Executable_use_system_darwin_frameworks,Viewer,\
+    Foundation \
+    CoreFoundation \
+    CoreGraphics \
+    CoreText \
+    UIKit \
+))
+
+$(eval $(call gb_Executable_add_objcxxobjects,Viewer,\
+    ios/experimental/Viewer/Viewer/lo-viewer \
+    ios/experimental/Viewer/Viewer/LOViewerAppDelegate \
+    ios/experimental/Viewer/Viewer/main \
+))
+
+# vim: set ts=4 sw=4 et:
diff --git a/ios/Makefile b/ios/Makefile
new file mode 100644
index 0000000..0c6f47b
--- /dev/null
+++ b/ios/Makefile
@@ -0,0 +1,13 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# 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/.
+
+module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
+
+include $(module_directory)/../solenv/gbuild/partial_build.mk
+
+# vim: set noet sw=4 ts=4:
diff --git a/ios/Module_ios.mk b/ios/Module_ios.mk
new file mode 100644
index 0000000..e723b43
--- /dev/null
+++ b/ios/Module_ios.mk
@@ -0,0 +1,20 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# 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/.
+
+$(eval $(call gb_Module_Module,ios))
+
+ifeq ($(OS),IOS)
+
+$(eval $(call gb_Module_add_targets,ios,\
+	Executable_Viewer \
+	CustomTarget_Viewer_app \
+))
+
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/ios/experimental/DocumentLoader/Makefile b/ios/experimental/DocumentLoader/Makefile
deleted file mode 100644
index 59b7332d..0000000
--- a/ios/experimental/DocumentLoader/Makefile
+++ /dev/null
@@ -1,134 +0,0 @@
-include ../../../config_host.mk
-
-APP=LODocumentLoader
-
-# If run from Xcode, check the CURRENT_ARCH env var for which platform we are
-# building, device or simulator
-
-ifneq (,$(filter i386,$(CC)))
-PLATFORM=iphonesimulator
-else
-PLATFORM=iphoneos
-endif
-
-APPDIR=build/Debug-$(PLATFORM)/$(APP).app
-
-# Stuff lifted from solenv/gbuild
-
-COMMA := ,
-
-gb_CPUDEFS := -DARM32
-
-gb_CPUDEFS += -D$(CPUNAME)
-
-gb_OSDEFS := \
-	-D$(OS) \
-	-D_PTHREADS \
-	-DUNIX \
-	-DUNX \
-	-D_REENTRANT \
-	-DNO_PTHREAD_PRIORITY \
-	$(EXTRA_CDEFS) \
-
-gb_CPPU_ENV := gcc3
-
-gb_COMPILERDEFS := \
-	-D$(COM) \
-	-DCPPU_ENV=$(gb_CPPU_ENV) \
-
-gb_DEBUGLEVEL := 1
-
-gb_GLOBALDEFS := \
-	-D_REENTRANT \
-	-DOSL_DEBUG_LEVEL=$(gb_DEBUGLEVEL) \
-	-DSUPD=$(UPD) \
-	$(gb_OSDEFS) \
-	$(gb_COMPILERDEFS) \
-	$(gb_CPUDEFS) \
-	-DDISABLE_DYNLOADING \
-
-gb_OBJC_OBJCXX_COMMON_FLAGS := -fobjc-abi-version=2 -fobjc-legacy-dispatch -D__IPHONE_OS_VERSION_MIN_REQUIRED=40300 -g
-gb_OBJCFLAGS := -x objective-c $(gb_OBJC_OBJCXX_COMMON_FLAGS)
-gb_OBJCXXFLAGS := -x objective-c++ $(gb_OBJC_OBJCXX_COMMON_FLAGS)
-
-gb_Library__FRAMEWORKS := \
-    Foundation \
-    CoreFoundation \
-    CoreGraphics \
-    CoreText \
-    UIKit \
-
-SRCS = docloader.mm
-
-CFLAGS = $(SOLARINC)
-
-MOREINCLUDES = -I$(OUTDIR)/inc/udkapi -I$(OUTDIR)/inc/offapi
-
-LIBS = \
-  $(addprefix -Wl$(COMMA),$(wildcard $(OUTDIR)/lib/*.a)) \
-  $(addprefix -framework , $(gb_Library__FRAMEWORKS)) \
-  -lz \
-  -liconv
-
-all: $(APPDIR)/$(APP) stuff
-
-$(APPDIR)/$(APP): $(SRCS)
-	mkdir -p $(APPDIR)
-	$(CXX) -v -miphoneos-version-min=4.3 -fobjc-link-runtime -Wl,-map,$(APP).map.mangled -Wl,-dead_strip -o $@ $(gb_GLOBALDEFS) $(CFLAGS) $(gb_OBJCXXFLAGS) $(MOREINCLUDES) $(SRCS) $(LIBS)
-	c++filt <$(APP).map.mangled >$(APP).map && rm $(APP).map.mangled
-
-stuff:
-# inifile:
-	echo 'URE_BOOTSTRAP=$${ORIGIN}/fundamentalrc' >$(APPDIR)/rc
-#
-# URE_BOOTSTRAP file, fundamentalrc:
-	( \
-	 echo '[Bootstrap]'; \
-	 echo 'BRAND_BASE_DIR=$${ORIGIN}'; \
-	 echo 'CONFIGURATION_LAYERS=xcsxcu:$${BRAND_BASE_DIR}/registry module:$${BRAND_BASE_DIR}/registry/modules res:$${BRAND_BASE_DIR}/registry' \
-	) >$(APPDIR)/fundamentalrc
-
-#
-# An unorc is *mandatory*, sigh. We leave it empty except for the
-# [Bootstrap} section header, though, and set all the stuff using
-# -env: options in docloader.m. Whether that makes sense or not,
-# no idea. The ideal would clearly be if *none* of the various rc
-# files was mandatory, and the code would automatically use sane
-# defaults. (Sane for the particular platform, that is.)
-	( \
-	 echo '[Bootstrap]' \
-	) >$(APPDIR)/unorc
-#
-# hmm, once again, a hodgepodge of stuff, I don't really know which
-# files of which are actually needed...
-	mkdir -p $(APPDIR)/registry/res
-	cp $(OUTDIR)/xml/*.xcd $(APPDIR)/registry
-	mv $(APPDIR)/registry/fcfg_langpack_en-US.xcd $(APPDIR)/registry/res
-	cp -R $(OUTDIR)/xml/registry/* $(APPDIR)/registry
-#
-# .rdb files
-	cp $(OUTDIR)/bin/udkapi.rdb $(OUTDIR)/bin/types.rdb $(OUTDIR)/xml/ure/services.rdb $(APPDIR)
-	mkdir -p $(APPDIR)/ure
-	cp $(OUTDIR)/bin/ure/types.rdb $(APPDIR)/ure
-#
-# a bunch of .component files
-	for F in framework/util/fwk i18npool/util/i18npool sfx2/util/sfx ucb/source/core/ucb1 ucb/source/ucp/file/ucpfile1 unoxml/source/service/unoxml configmgr/source/configmgr basic/util/sb chart2/source/controller/chartcontroller chart2/source/chartcore comphelper/util/comphelp eventattacher/source/evtatt fileaccess/source/fileacc filter/source/config/cache/filterconfig1 oox/util/oox package/source/xstor/xstor package/util/package2 sax/source/expatwrap/expwrap sax/source/fastparser/fastsax sc/util/sc sc/util/scfilt scaddins/source/analysis/analysis scaddins/source/datefunc/date sot/util/sot svl/util/svl toolkit/util/tk ucb/source/ucp/tdoc/ucptdoc1 unotools/util/utl unoxml/source/rdf/unordf; do \
-		mkdir -p $(APPDIR)/ComponentTarget/`dirname $$F`; \
-	        cp $(WORKDIR)/ComponentTarget/$$F.component $(APPDIR)/ComponentTarget/$$F.component; \
-	done
-#
-# .res files
-#
-# $BRAND_BASE_DIR/program/resource hardcoded in
-# ResMgrContainer::init() in tools/source/rc/resmgr.cxx, so let's use
-# that.
-	mkdir -p $(APPDIR)/program/resource
-	for F in $(OUTDIR)/bin/*.res; do \
-		cp $$F $(APPDIR)/program/resource; \
-	done
-#
-# Test documents
-	cp $(SRC_ROOT)/odk/examples/java/DocumentHandling/test/test1.odt $(APPDIR)
-
-clean:
-	rm -rf $(APPDIR)
diff --git a/ios/experimental/DocumentLoader/docloader.mm b/ios/experimental/DocumentLoader/docloader.mm
deleted file mode 100644
index 8eb56a9..0000000
--- a/ios/experimental/DocumentLoader/docloader.mm
+++ /dev/null
@@ -1,260 +0,0 @@
-/* -*- Mode: ObjC; 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/.
- */
-
-#include <stdlib.h>
-
-#include <premac.h>
-#import <UIKit/UIKit.h>
-#include <postmac.h>
-
-#include <cppuhelper/bootstrap.hxx>
-#include <osl/detail/ios-bootstrap.h>
-#include <osl/process.h>
-
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/bridge/XUnoUrlResolver.hpp>
-#include <com/sun/star/frame/XComponentLoader.hpp>
-#include <com/sun/star/lang/XMultiComponentFactory.hpp>
-#include <com/sun/star/registry/XSimpleRegistry.hpp>
-
-using namespace com::sun::star::uno;
-using namespace com::sun::star::lang;
-using namespace com::sun::star::beans;
-using namespace com::sun::star::bridge;
-using namespace com::sun::star::frame;
-using namespace com::sun::star::registry;
-
-using ::rtl::OUString;
-using ::rtl::OUStringToOString;
-
-extern "C" {
-    extern void * animcore_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * avmedia_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * dba_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * dbaxml_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * evtatt_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * fileacc_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * frm_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * fsstorage_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * fwk_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * fwl_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * fwm_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * hwp_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * hyphen_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * lng_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * lnth_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * lotuswordpro_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * oox_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * sc_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * scd_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * scfilt_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * sd_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * sdd_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * sm_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * smd_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * spell_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * svgfilter_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * sw_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * swd_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * t602filter_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * textfd_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * unoxml_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * unordf_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * xmlfd_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * xmlsecurity_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * xo_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * xof_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-
-}
-
-extern "C"
-const lib_to_component_mapping *
-lo_get_libmap(void)
-{
-    static lib_to_component_mapping map[] = {
-        { "libanimcorelo.a", animcore_component_getFactory },
-        { "libavmedialo.a", avmedia_component_getFactory },
-        { "libdbalo.a", dba_component_getFactory },
-        { "libdbaxmllo.a", dbaxml_component_getFactory },
-        { "libevtattlo.a", evtatt_component_getFactory },
-        { "libfileacc.a", fileacc_component_getFactory },
-        { "libfrmlo.a", frm_component_getFactory },
-        { "libfsstorage.uno.a", fsstorage_component_getFactory },
-        { "libfwklo.a", fwk_component_getFactory },
-        { "libfwllo.a", fwl_component_getFactory },
-        { "libfwmlo.a", fwm_component_getFactory },
-        { "libhwplo.a", hwp_component_getFactory },
-        { "libhyphenlo.a", hyphen_component_getFactory },
-        { "liblnglo.a", lng_component_getFactory },
-        { "liblnthlo.a", lnth_component_getFactory },
-        { "liblwpftlo.a", lotuswordpro_component_getFactory },
-        { "libooxlo.a", oox_component_getFactory },
-        { "libscdlo.a", scd_component_getFactory },
-        { "libscfiltlo.a", scfilt_component_getFactory },
-        { "libsclo.a", sc_component_getFactory },
-        { "libsddlo.a", sdd_component_getFactory },
-        { "libsdlo.a", sd_component_getFactory },
-        { "libsmdlo.a", smd_component_getFactory },
-        { "libsmlo.a", sm_component_getFactory },
-        { "libsvgfilterlo.a", svgfilter_component_getFactory },
-        { "libswdlo.a", swd_component_getFactory },
-        { "libswlo.a", sw_component_getFactory },
-        { "libt602filterlo.a", t602filter_component_getFactory },
-        { "libtextfdlo.a", textfd_component_getFactory },
-        { "libunordflo.a", unordf_component_getFactory },
-        { "libunoxmllo.a", unoxml_component_getFactory },
-        { "libxmlfdlo.a", xmlfd_component_getFactory },
-        { "libxmlsecurity.a", xmlsecurity_component_getFactory },
-        { "libxoflo.a", xof_component_getFactory },
-        { "libxolo.a", xo_component_getFactory },
-        { NULL, NULL }
-    };
-
-    return map;
-}
-
-int 
-main(int argc, char ** argv)
-{
-    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-    int retVal = UIApplicationMain (argc, argv, @"UIApplication", @"loAppDelegate");
-    [pool release];
-    return retVal;
-}
-
- at interface loAppDelegate : NSObject <UIApplicationDelegate> {
-}
- at property (nonatomic, retain) UIWindow *window;
- at end
-
- at implementation loAppDelegate
-
- at synthesize window=_window;
-
-- (BOOL)application: (UIApplication *) application
-didFinishLaunchingWithOptions: (NSDictionary *) launchOptions
-{
-    int i;
-
-    (void) application;
-    (void) launchOptions;
-
-    UIWindow *uiw = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
-    uiw.backgroundColor = [UIColor redColor];
-    self.window = uiw;
-    [uiw release];
-
-    // See unotest/source/cpp/bootstrapfixturebase.cxx
-    const char *app_root = [[[NSBundle mainBundle] bundlePath] UTF8String];
-    setenv("SRC_ROOT", app_root, 1);
-    setenv("OUTDIR_FOR_BUILD", app_root, 1);
-
-    setenv("SAL_LOG", "yes", 1);
-
-    const char *argv[] = {
-        "lo-qa-sc-filters-test",
-        "dummy-testlib",
-        "--headless",
-        "--protector",
-        "dummy-libunoexceptionprotector",
-        "unoexceptionprotector",
-        "--protector",
-        "dummy-libunobootstrapprotector",
-        "unobootstrapprotector",
-        "-env:URE_INTERNAL_LIB_DIR=file:///",
-        "placeholder-uno-types",
-        "placeholder-uno-services"
-    };
-
-    const int argc = sizeof(argv)/sizeof(*argv);
-
-    NSString *app_root_escaped = [[[NSBundle mainBundle] bundlePath] stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding];
-
-    NSString *uno_types = @"-env:UNO_TYPES=";
-
-    uno_types = [uno_types stringByAppendingString: @"file://"];
-    uno_types = [uno_types stringByAppendingString: [app_root_escaped stringByAppendingPathComponent: @"udkapi.rdb"]];
-
-    uno_types = [uno_types stringByAppendingString: @" "];
-    uno_types = [uno_types stringByAppendingString: @"file://"];
-    uno_types = [uno_types stringByAppendingString: [app_root_escaped stringByAppendingPathComponent: @"types.rdb"]];
-
-    uno_types = [uno_types stringByAppendingString: @" "];
-    uno_types = [uno_types stringByAppendingString: @"file://"];
-    uno_types = [uno_types stringByAppendingString: [app_root_escaped stringByAppendingPathComponent: @"ure/types.rdb"]];
-
-    assert(strcmp(argv[argc-2], "placeholder-uno-types") == 0);
-    argv[argc-2] = [uno_types UTF8String];
-
-    NSString *uno_services = @"-env:UNO_SERVICES=";
-
-    const char *services[] = {
-        "services.rdb",
-        "ComponentTarget/basic/util/sb.component",
-        "ComponentTarget/chart2/source/controller/chartcontroller.component",
-        "ComponentTarget/chart2/source/chartcore.component",
-        "ComponentTarget/comphelper/util/comphelp.component",
-        "ComponentTarget/eventattacher/source/evtatt.component",
-        "ComponentTarget/fileaccess/source/fileacc.component",
-        "ComponentTarget/filter/source/config/cache/filterconfig1.component",
-        "ComponentTarget/oox/util/oox.component",
-        "ComponentTarget/package/source/xstor/xstor.component",
-        "ComponentTarget/package/util/package2.component",
-        "ComponentTarget/sax/source/expatwrap/expwrap.component",
-        "ComponentTarget/sax/source/fastparser/fastsax.component",
-        "ComponentTarget/sc/util/sc.component",
-        "ComponentTarget/sc/util/scfilt.component",
-        "ComponentTarget/scaddins/source/analysis/analysis.component",
-        "ComponentTarget/scaddins/source/datefunc/date.component",
-        "ComponentTarget/sot/util/sot.component",
-        "ComponentTarget/svl/util/svl.component",
-        "ComponentTarget/toolkit/util/tk.component",
-        "ComponentTarget/ucb/source/ucp/tdoc/ucptdoc1.component",
-        "ComponentTarget/unotools/util/utl.component",
-        "ComponentTarget/unoxml/source/rdf/unordf.component",
-        "ComponentTarget/framework/util/fwk.component",
-        "ComponentTarget/i18npool/util/i18npool.component",
-        "ComponentTarget/sfx2/util/sfx.component",
-        "ComponentTarget/unoxml/source/service/unoxml.component",
-        "ComponentTarget/configmgr/source/configmgr.component",
-        "ComponentTarget/ucb/source/core/ucb1.component",
-        "ComponentTarget/ucb/source/ucp/file/ucpfile1.component"
-    };
-
-    for (i = 0; i < sizeof(services)/sizeof(services[0]); i++) {
-        uno_services = [uno_services stringByAppendingString: @"file://"];
-        uno_services = [uno_services stringByAppendingString: [app_root_escaped stringByAppendingPathComponent: [NSString stringWithUTF8String: services[i]]]];
-        if (i < sizeof(services)/sizeof(services[0]) - 1)
-            uno_services = [uno_services stringByAppendingString: @" "];
-    }
-
-    assert(strcmp(argv[argc-1], "placeholder-uno-services") == 0);
-    argv[argc-1] = [uno_services UTF8String];
-
-    osl_setCommandArgs(argc, (char **) argv);
-
-    Reference< XComponentContext > xComponentContext(::cppu::defaultBootstrap_InitialComponentContext());
-
-    Reference< XMultiComponentFactory > xMultiComponentFactoryClient(
-        xComponentContext->getServiceManager() );
-
-    Reference< XInterface > xInterface =
-        xMultiComponentFactoryClient->createInstanceWithContext(
-            OUString("com.sun.star.frame.Desktop"),
-            xComponentContext );
-
-    // Do something here
-
-    [self.window makeKeyAndVisible];
-    return YES;
-}
-
- at end
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ios/experimental/Viewer/.gitignore b/ios/experimental/Viewer/.gitignore
new file mode 100644
index 0000000..44ac7a8
--- /dev/null
+++ b/ios/experimental/Viewer/.gitignore
@@ -0,0 +1,4 @@
+.DS_Store
+DerivedData
+Viewer.xcodeproj/project.xcworkspace
+Viewer.xcodeproj/xcuserdata
diff --git a/ios/experimental/Viewer/Viewer.xcodeproj/project.pbxproj b/ios/experimental/Viewer/Viewer.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..5e65aae
--- /dev/null
+++ b/ios/experimental/Viewer/Viewer.xcodeproj/project.pbxproj
@@ -0,0 +1,302 @@
+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 46;
+	objects = {
+
+/* Begin PBXBuildFile section */
+		BE5A22641664F87600CF01C9 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = BE5A22621664F87600CF01C9 /* InfoPlist.strings */; };
+		BE5A226C1664F87600CF01C9 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = BE5A226B1664F87600CF01C9 /* Default.png */; };
+		BE5A226E1664F87600CF01C9 /* Default at 2x.png in Resources */ = {isa = PBXBuildFile; fileRef = BE5A226D1664F87600CF01C9 /* Default at 2x.png */; };
+		BE5A22701664F87600CF01C9 /* Default-568h at 2x.png in Resources */ = {isa = PBXBuildFile; fileRef = BE5A226F1664F87600CF01C9 /* Default-568h at 2x.png */; };
+		BE69AD88169592C4001BE1CD /* iTunesArtwork in Resources */ = {isa = PBXBuildFile; fileRef = BE69AD87169592C4001BE1CD /* iTunesArtwork */; };
+		BE69AD8D1695954D001BE1CD /* Icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = BE69AD8A1695954D001BE1CD /* Icon-72.png */; };
+		BE69AD8E1695954D001BE1CD /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = BE69AD8B1695954D001BE1CD /* Icon.png */; };
+		BE69AD8F1695954D001BE1CD /* Icon at 2x.png in Resources */ = {isa = PBXBuildFile; fileRef = BE69AD8C1695954D001BE1CD /* Icon at 2x.png */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+		BE5A22551664F87600CF01C9 /* Viewer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Viewer.app; sourceTree = BUILT_PRODUCTS_DIR; };
+		BE5A22591664F87600CF01C9 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
+		BE5A225B1664F87600CF01C9 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+		BE5A225D1664F87600CF01C9 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
+		BE5A22611664F87600CF01C9 /* Viewer-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Viewer-Info.plist"; sourceTree = "<group>"; };
+		BE5A22631664F87600CF01C9 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+		BE5A22651664F87600CF01C9 /* main.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = main.mm; sourceTree = "<group>"; };
+		BE5A22671664F87600CF01C9 /* Viewer-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Viewer-Prefix.pch"; sourceTree = "<group>"; };
+		BE5A22681664F87600CF01C9 /* LOViewerAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LOViewerAppDelegate.h; sourceTree = "<group>"; };
+		BE5A22691664F87600CF01C9 /* LOViewerAppDelegate.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = LOViewerAppDelegate.mm; sourceTree = "<group>"; };
+		BE5A226B1664F87600CF01C9 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = "<group>"; };
+		BE5A226D1664F87600CF01C9 /* Default at 2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default at 2x.png"; sourceTree = "<group>"; };
+		BE5A226F1664F87600CF01C9 /* Default-568h at 2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h at 2x.png"; sourceTree = "<group>"; };
+		BE5A22771664F87600CF01C9 /* SenTestingKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SenTestingKit.framework; path = Library/Frameworks/SenTestingKit.framework; sourceTree = DEVELOPER_DIR; };
+		BE69AD87169592C4001BE1CD /* iTunesArtwork */ = {isa = PBXFileReference; lastKnownFileType = file; path = iTunesArtwork; sourceTree = "<group>"; };
+		BE69AD8A1695954D001BE1CD /* Icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-72.png"; sourceTree = "<group>"; };
+		BE69AD8B1695954D001BE1CD /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Icon.png; sourceTree = "<group>"; };
+		BE69AD8C1695954D001BE1CD /* Icon at 2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon at 2x.png"; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		BECC59C2169344C300D29860 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		BE5A224A1664F87600CF01C9 = {
+			isa = PBXGroup;
+			children = (
+				BE5A225F1664F87600CF01C9 /* Viewer */,
+				BE5A22581664F87600CF01C9 /* Frameworks */,
+				BE5A22561664F87600CF01C9 /* Products */,
+			);
+			sourceTree = "<group>";
+		};
+		BE5A22561664F87600CF01C9 /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				BE5A22551664F87600CF01C9 /* Viewer.app */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		BE5A22581664F87600CF01C9 /* Frameworks */ = {
+			isa = PBXGroup;
+			children = (
+				BE5A22591664F87600CF01C9 /* UIKit.framework */,
+				BE5A225B1664F87600CF01C9 /* Foundation.framework */,
+				BE5A225D1664F87600CF01C9 /* CoreGraphics.framework */,
+				BE5A22771664F87600CF01C9 /* SenTestingKit.framework */,
+			);
+			name = Frameworks;
+			sourceTree = "<group>";
+		};
+		BE5A225F1664F87600CF01C9 /* Viewer */ = {
+			isa = PBXGroup;
+			children = (
+				BE69AD3716958CA0001BE1CD /* Resources */,
+				BE5A22681664F87600CF01C9 /* LOViewerAppDelegate.h */,
+				BE5A22691664F87600CF01C9 /* LOViewerAppDelegate.mm */,
+				BE5A22601664F87600CF01C9 /* Supporting Files */,
+			);
+			path = Viewer;
+			sourceTree = "<group>";
+		};
+		BE5A22601664F87600CF01C9 /* Supporting Files */ = {
+			isa = PBXGroup;
+			children = (
+				BE5A22611664F87600CF01C9 /* Viewer-Info.plist */,
+				BE5A22621664F87600CF01C9 /* InfoPlist.strings */,
+				BE5A22651664F87600CF01C9 /* main.mm */,
+				BE5A22671664F87600CF01C9 /* Viewer-Prefix.pch */,
+				BE5A226B1664F87600CF01C9 /* Default.png */,
+				BE5A226D1664F87600CF01C9 /* Default at 2x.png */,
+				BE5A226F1664F87600CF01C9 /* Default-568h at 2x.png */,
+			);
+			name = "Supporting Files";
+			sourceTree = "<group>";
+		};
+		BE69AD3716958CA0001BE1CD /* Resources */ = {
+			isa = PBXGroup;
+			children = (
+				BE69AD87169592C4001BE1CD /* iTunesArtwork */,
+				BE69AD8A1695954D001BE1CD /* Icon-72.png */,
+				BE69AD8B1695954D001BE1CD /* Icon.png */,
+				BE69AD8C1695954D001BE1CD /* Icon at 2x.png */,
+			);
+			name = Resources;
+			sourceTree = "<group>";
+		};
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+		BE5A22541664F87600CF01C9 /* Viewer */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = BE5A22881664F87600CF01C9 /* Build configuration list for PBXNativeTarget "Viewer" */;
+			buildPhases = (
+				BE8B879916933FCD00F61E9F /* ShellScript */,
+				BE5A22531664F87600CF01C9 /* Resources */,
+				BECC59C2169344C300D29860 /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = Viewer;
+			productName = Viewer;
+			productReference = BE5A22551664F87600CF01C9 /* Viewer.app */;
+			productType = "com.apple.product-type.application";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		BE5A224C1664F87600CF01C9 /* Project object */ = {
+			isa = PBXProject;
+			attributes = {
+				CLASSPREFIX = LOViewer;
+				LastUpgradeCheck = 0450;
+				ORGANIZATIONNAME = "Tor Lillqvist";
+			};
+			buildConfigurationList = BE5A224F1664F87600CF01C9 /* Build configuration list for PBXProject "Viewer" */;
+			compatibilityVersion = "Xcode 3.2";
+			developmentRegion = English;
+			hasScannedForEncodings = 0;
+			knownRegions = (
+				en,
+			);
+			mainGroup = BE5A224A1664F87600CF01C9;
+			productRefGroup = BE5A22561664F87600CF01C9 /* Products */;
+			projectDirPath = "";
+			projectRoot = "";
+			targets = (
+				BE5A22541664F87600CF01C9 /* Viewer */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+		BE5A22531664F87600CF01C9 /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				BE5A22641664F87600CF01C9 /* InfoPlist.strings in Resources */,
+				BE5A226C1664F87600CF01C9 /* Default.png in Resources */,
+				BE5A226E1664F87600CF01C9 /* Default at 2x.png in Resources */,
+				BE5A22701664F87600CF01C9 /* Default-568h at 2x.png in Resources */,
+				BE69AD88169592C4001BE1CD /* iTunesArtwork in Resources */,
+				BE69AD8D1695954D001BE1CD /* Icon-72.png in Resources */,
+				BE69AD8E1695954D001BE1CD /* Icon.png in Resources */,
+				BE69AD8F1695954D001BE1CD /* Icon at 2x.png in Resources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+		BE8B879916933FCD00F61E9F /* ShellScript */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+			);
+			outputPaths = (
+				"$(DERIVED_FILE_DIR)/Viewer.app",
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "cd ../.. && /opt/lo/bin/make";
+		};
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+		BE5A22621664F87600CF01C9 /* InfoPlist.strings */ = {
+			isa = PBXVariantGroup;
+			children = (
+				BE5A22631664F87600CF01C9 /* en */,
+			);
+			name = InfoPlist.strings;
+			sourceTree = "<group>";
+		};
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+		BE5A22861664F87600CF01C9 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				COPY_PHASE_STRIP = NO;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"DEBUG=1",
+					"$(inherited)",
+				);
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 5.0;
+				LIBRARY_SEARCH_PATHS = "";
+				OTHER_LDFLAGS = "-v";
+				SDKROOT = iphoneos;
+				TARGETED_DEVICE_FAMILY = 2;
+				VALID_ARCHS = armv7;
+			};
+			name = Debug;
+		};
+		BE5A22871664F87600CF01C9 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				COPY_PHASE_STRIP = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 5.0;
+				LIBRARY_SEARCH_PATHS = "";
+				OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
+				OTHER_LDFLAGS = "-v";
+				SDKROOT = iphoneos;
+				TARGETED_DEVICE_FAMILY = 2;
+				VALID_ARCHS = armv7;
+			};
+			name = Release;
+		};
+		BE5A22891664F87600CF01C9 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = "Viewer/Viewer-Prefix.pch";
+				INFOPLIST_FILE = "Viewer/Viewer-Info.plist";
+				IPHONEOS_DEPLOYMENT_TARGET = 5.0;
+				LIBRARY_SEARCH_PATHS = "../../../workdir/$(LO_INPATH)/LinkTarget/Library";
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				WRAPPER_EXTENSION = app;
+			};
+			name = Debug;
+		};
+		BE5A228A1664F87600CF01C9 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = "Viewer/Viewer-Prefix.pch";
+				INFOPLIST_FILE = "Viewer/Viewer-Info.plist";
+				IPHONEOS_DEPLOYMENT_TARGET = 5.0;
+				LIBRARY_SEARCH_PATHS = "../../../workdir/$(LO_INPATH)/LinkTarget/Library";
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				WRAPPER_EXTENSION = app;
+			};
+			name = Release;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		BE5A224F1664F87600CF01C9 /* Build configuration list for PBXProject "Viewer" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				BE5A22861664F87600CF01C9 /* Debug */,
+				BE5A22871664F87600CF01C9 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		BE5A22881664F87600CF01C9 /* Build configuration list for PBXNativeTarget "Viewer" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				BE5A22891664F87600CF01C9 /* Debug */,
+				BE5A228A1664F87600CF01C9 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+/* End XCConfigurationList section */
+	};
+	rootObject = BE5A224C1664F87600CF01C9 /* Project object */;
+}
diff --git a/ios/experimental/Viewer/Viewer/Default-568h at 2x.png b/ios/experimental/Viewer/Viewer/Default-568h at 2x.png
new file mode 100644
index 0000000..0891b7a
Binary files /dev/null and b/ios/experimental/Viewer/Viewer/Default-568h at 2x.png differ
diff --git a/ios/experimental/Viewer/Viewer/Default.png b/ios/experimental/Viewer/Viewer/Default.png
new file mode 100644
index 0000000..4c8ca6f
Binary files /dev/null and b/ios/experimental/Viewer/Viewer/Default.png differ
diff --git a/ios/experimental/Viewer/Viewer/Default at 2x.png b/ios/experimental/Viewer/Viewer/Default at 2x.png
new file mode 100644
index 0000000..35b84cf
Binary files /dev/null and b/ios/experimental/Viewer/Viewer/Default at 2x.png differ
diff --git a/ios/experimental/Viewer/Viewer/Icon-72.png b/ios/experimental/Viewer/Viewer/Icon-72.png
new file mode 100644
index 0000000..e5a34fd
Binary files /dev/null and b/ios/experimental/Viewer/Viewer/Icon-72.png differ
diff --git a/ios/experimental/Viewer/Viewer/Icon.png b/ios/experimental/Viewer/Viewer/Icon.png
new file mode 100644
index 0000000..04254bf
Binary files /dev/null and b/ios/experimental/Viewer/Viewer/Icon.png differ
diff --git a/ios/experimental/Viewer/Viewer/Icon at 2x.png b/ios/experimental/Viewer/Viewer/Icon at 2x.png
new file mode 100644
index 0000000..6d90d1f
Binary files /dev/null and b/ios/experimental/Viewer/Viewer/Icon at 2x.png differ
diff --git a/ios/experimental/Viewer/Viewer/LOViewerAppDelegate.h b/ios/experimental/Viewer/Viewer/LOViewerAppDelegate.h
new file mode 100644
index 0000000..3b33bc9
--- /dev/null
+++ b/ios/experimental/Viewer/Viewer/LOViewerAppDelegate.h
@@ -0,0 +1,15 @@
+//
+//  LOViewerAppDelegate.h
+//  Viewer
+//
+//  Created by Tor Lillqvist on 2012-11-27.
+//  Copyright (c) 2012 Tor Lillqvist. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+ at interface LOViewerAppDelegate : UIResponder <UIApplicationDelegate>
+
+ at property (strong, nonatomic) UIWindow *window;
+
+ at end
diff --git a/ios/experimental/Viewer/Viewer/LOViewerAppDelegate.mm b/ios/experimental/Viewer/Viewer/LOViewerAppDelegate.mm
new file mode 100644
index 0000000..bf0c67a
--- /dev/null
+++ b/ios/experimental/Viewer/Viewer/LOViewerAppDelegate.mm
@@ -0,0 +1,76 @@
+// -*- Mode: ObjC; 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/.
+//
+
+#include <stdlib.h>
+
+#import <UIKit/UIKit.h>
+
+#import "LOViewerAppDelegate.h"
+
+#include "lo-viewer.h"
+
+ at implementation LOViewerAppDelegate
+
+- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
+{
+    (void) application;
+    (void) launchOptions;
+
+    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
+    // Override point for customization after application launch.
+    self.window.backgroundColor = [UIColor whiteColor];
+
+    lo_initialize();
+
+    // Do something here
+
+    [self.window makeKeyAndVisible];
+    return YES;
+}
+
+- (void)applicationWillResignActive:(UIApplication *)application
+{
+    (void) application;
+
+    // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
+    // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
+}
+
+- (void)applicationDidEnterBackground:(UIApplication *)application
+{
+    (void) application;
+
+    // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 
+    // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
+}
+
+- (void)applicationWillEnterForeground:(UIApplication *)application
+{
+    (void) application;
+
+    // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
+}
+
+- (void)applicationDidBecomeActive:(UIApplication *)application
+{
+    (void) application;
+
+    // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
+}
+
+- (void)applicationWillTerminate:(UIApplication *)application
+{
+    (void) application;
+
+    // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
+}
+
+ at end
+
+// vim:set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/ios/experimental/Viewer/Viewer/Viewer-Info.plist b/ios/experimental/Viewer/Viewer/Viewer-Info.plist
new file mode 100644
index 0000000..7ac2f9d
--- /dev/null
+++ b/ios/experimental/Viewer/Viewer/Viewer-Info.plist
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>en</string>
+	<key>CFBundleDisplayName</key>
+	<string>${PRODUCT_NAME}</string>
+	<key>CFBundleExecutable</key>
+	<string>${EXECUTABLE_NAME}</string>
+	<key>CFBundleIdentifier</key>
+	<string>org.libreoffice.${PRODUCT_NAME:rfc1034identifier}</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundleName</key>
+	<string>${PRODUCT_NAME}</string>
+	<key>CFBundlePackageType</key>
+	<string>APPL</string>
+	<key>CFBundleShortVersionString</key>
+	<string>1.0</string>
+	<key>CFBundleSignature</key>
+	<string>????</string>
+	<key>CFBundleVersion</key>
+	<string>1.0</string>
+	<key>LSRequiresIPhoneOS</key>
+	<true/>
+	<key>UIRequiredDeviceCapabilities</key>
+	<array>
+		<string>armv7</string>
+	</array>
+	<key>CFBundleIconFile</key>
+	<string></string>
+	<key>UISupportedInterfaceOrientations~ipad</key>
+	<array>
+		<string>UIInterfaceOrientationPortrait</string>
+		<string>UIInterfaceOrientationPortraitUpsideDown</string>
+		<string>UIInterfaceOrientationLandscapeLeft</string>
+		<string>UIInterfaceOrientationLandscapeRight</string>
+	</array>
+	<key>CFBundleIconFiles</key>
+	<array>
+		<string>Icon.png</string>
+		<string>Icon-72.png</string>
+		<string>Icon at 2x.png</string>
+	</array>
+</dict>
+</plist>
diff --git a/ios/experimental/Viewer/Viewer/Viewer-Prefix.pch b/ios/experimental/Viewer/Viewer/Viewer-Prefix.pch
new file mode 100644
index 0000000..381aee4
--- /dev/null
+++ b/ios/experimental/Viewer/Viewer/Viewer-Prefix.pch
@@ -0,0 +1,14 @@
+//
+// Prefix header for all source files of the 'Viewer' target in the 'Viewer' project
+//
+
+#import <Availability.h>
+
+#ifndef __IPHONE_3_0
+#warning "This project uses features only available in iOS SDK 3.0 and later."
+#endif
+
+#ifdef __OBJC__
+    #import <UIKit/UIKit.h>
+    #import <Foundation/Foundation.h>
+#endif
diff --git a/ios/experimental/Viewer/Viewer/en.lproj/InfoPlist.strings b/ios/experimental/Viewer/Viewer/en.lproj/InfoPlist.strings
new file mode 100644
index 0000000..477b28f
--- /dev/null
+++ b/ios/experimental/Viewer/Viewer/en.lproj/InfoPlist.strings
@@ -0,0 +1,2 @@
+/* Localized versions of Info.plist keys */
+
diff --git a/ios/experimental/Viewer/Viewer/iTunesArtwork b/ios/experimental/Viewer/Viewer/iTunesArtwork
new file mode 100644
index 0000000..ef1890b
Binary files /dev/null and b/ios/experimental/Viewer/Viewer/iTunesArtwork differ
diff --git a/ios/experimental/Viewer/Viewer/lo-viewer.h b/ios/experimental/Viewer/Viewer/lo-viewer.h
new file mode 100644
index 0000000..1ce2031
--- /dev/null
+++ b/ios/experimental/Viewer/Viewer/lo-viewer.h
@@ -0,0 +1,18 @@
+// -*- 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 LO_VIEWER_H
+#define LO_VIEWER_H
+
+void lo_initialize(void);
+
+#endif // LO_VIEWER_H
+
+// vim:set shiftwidth=4 softtabstop=4 expandtab:
+
diff --git a/ios/experimental/Viewer/Viewer/lo-viewer.mm b/ios/experimental/Viewer/Viewer/lo-viewer.mm
new file mode 100644
index 0000000..a40cb78
--- /dev/null
+++ b/ios/experimental/Viewer/Viewer/lo-viewer.mm
@@ -0,0 +1,219 @@
+// -*- Mode: ObjC; 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/.
+//
+
+#include <stdlib.h>
+
+#include <premac.h>
+#import <UIKit/UIKit.h>
+#include <postmac.h>
+
+#include <cppuhelper/bootstrap.hxx>
+#include <osl/detail/ios-bootstrap.h>
+#include <osl/process.h>
+
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/bridge/XUnoUrlResolver.hpp>
+#include <com/sun/star/frame/XComponentLoader.hpp>
+#include <com/sun/star/lang/XMultiComponentFactory.hpp>
+#include <com/sun/star/registry/XSimpleRegistry.hpp>
+
+using namespace com::sun::star::uno;
+using namespace com::sun::star::lang;
+using namespace com::sun::star::beans;
+using namespace com::sun::star::bridge;
+using namespace com::sun::star::frame;
+using namespace com::sun::star::registry;
+
+using ::rtl::OUString;
+using ::rtl::OUStringToOString;
+
+extern "C" {
+    extern void * animcore_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
+    extern void * avmedia_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
+    extern void * dba_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
+    extern void * dbaxml_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
+    extern void * evtatt_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
+    extern void * fileacc_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
+    extern void * frm_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
+    extern void * fsstorage_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
+    extern void * fwk_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
+    extern void * fwl_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
+    extern void * fwm_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
+    extern void * hwp_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
+    extern void * hyphen_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
+    extern void * lng_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
+    extern void * lnth_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
+    extern void * lotuswordpro_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
+    extern void * oox_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
+    extern void * sc_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
+    extern void * scd_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
+    extern void * scfilt_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
+    extern void * sd_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
+    extern void * sdd_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
+    extern void * sm_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
+    extern void * smd_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
+    extern void * spell_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
+    extern void * svgfilter_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
+    extern void * sw_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
+    extern void * swd_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
+    extern void * t602filter_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
+    extern void * textfd_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
+    extern void * unoxml_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
+    extern void * unordf_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
+    extern void * xmlfd_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
+    extern void * xmlsecurity_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
+    extern void * xo_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
+    extern void * xof_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
+
+}
+
+extern "C"
+const lib_to_component_mapping *
+lo_get_libmap(void)
+{
+    static lib_to_component_mapping map[] = {
+        { "libanimcorelo.a", animcore_component_getFactory },
+        { "libavmedialo.a", avmedia_component_getFactory },
+        { "libdbalo.a", dba_component_getFactory },
+        { "libdbaxmllo.a", dbaxml_component_getFactory },
+        { "libevtattlo.a", evtatt_component_getFactory },
+        { "libfileacc.a", fileacc_component_getFactory },
+        { "libfrmlo.a", frm_component_getFactory },
+        { "libfsstorage.uno.a", fsstorage_component_getFactory },
+        { "libfwklo.a", fwk_component_getFactory },
+        { "libfwllo.a", fwl_component_getFactory },
+        { "libfwmlo.a", fwm_component_getFactory },
+        { "libhwplo.a", hwp_component_getFactory },
+        { "libhyphenlo.a", hyphen_component_getFactory },
+        { "liblnglo.a", lng_component_getFactory },
+        { "liblnthlo.a", lnth_component_getFactory },
+        { "liblwpftlo.a", lotuswordpro_component_getFactory },
+        { "libooxlo.a", oox_component_getFactory },
+        { "libscdlo.a", scd_component_getFactory },
+        { "libscfiltlo.a", scfilt_component_getFactory },
+        { "libsclo.a", sc_component_getFactory },
+        { "libsddlo.a", sdd_component_getFactory },
+        { "libsdlo.a", sd_component_getFactory },
+        { "libsmdlo.a", smd_component_getFactory },
+        { "libsmlo.a", sm_component_getFactory },
+        { "libsvgfilterlo.a", svgfilter_component_getFactory },
+        { "libswdlo.a", swd_component_getFactory },
+        { "libswlo.a", sw_component_getFactory },
+        { "libt602filterlo.a", t602filter_component_getFactory },
+        { "libtextfdlo.a", textfd_component_getFactory },
+        { "libunordflo.a", unordf_component_getFactory },
+        { "libunoxmllo.a", unoxml_component_getFactory },
+        { "libxmlfdlo.a", xmlfd_component_getFactory },
+        { "libxmlsecurity.a", xmlsecurity_component_getFactory },
+        { "libxoflo.a", xof_component_getFactory },
+        { "libxolo.a", xo_component_getFactory },
+        { NULL, NULL }
+    };
+
+    return map;
+}
+
+void
+lo_initialize(void)
+{
+    // See unotest/source/cpp/bootstrapfixturebase.cxx
+    const char *app_root = [[[NSBundle mainBundle] bundlePath] UTF8String];
+    setenv("SRC_ROOT", app_root, 1);
+    setenv("OUTDIR_FOR_BUILD", app_root, 1);
+
+    setenv("SAL_LOG", "yes", 1);
+
+    const char *argv[] = {
+        "Viewer",
+        "-env:URE_INTERNAL_LIB_DIR=file:///",
+        "placeholder-uno-types",
+        "placeholder-uno-services"
+    };
+
+    const int argc = sizeof(argv)/sizeof(*argv);
+
+    NSString *app_root_escaped = [[[NSBundle mainBundle] bundlePath] stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding];
+
+    NSString *uno_types = @"-env:UNO_TYPES=";
+
+    uno_types = [uno_types stringByAppendingString: @"file://"];
+    uno_types = [uno_types stringByAppendingString: [app_root_escaped stringByAppendingPathComponent: @"udkapi.rdb"]];
+
+    uno_types = [uno_types stringByAppendingString: @" "];
+    uno_types = [uno_types stringByAppendingString: @"file://"];
+    uno_types = [uno_types stringByAppendingString: [app_root_escaped stringByAppendingPathComponent: @"types.rdb"]];
+
+    uno_types = [uno_types stringByAppendingString: @" "];
+    uno_types = [uno_types stringByAppendingString: @"file://"];
+    uno_types = [uno_types stringByAppendingString: [app_root_escaped stringByAppendingPathComponent: @"ure/types.rdb"]];
+
+    assert(strcmp(argv[argc-2], "placeholder-uno-types") == 0);
+    argv[argc-2] = [uno_types UTF8String];
+
+    NSString *uno_services = @"-env:UNO_SERVICES=";
+
+    const char *services[] = {
+        "services.rdb",
+        "ComponentTarget/basic/util/sb.component",
+        "ComponentTarget/chart2/source/controller/chartcontroller.component",
+        "ComponentTarget/chart2/source/chartcore.component",
+        "ComponentTarget/comphelper/util/comphelp.component",
+        "ComponentTarget/eventattacher/source/evtatt.component",
+        "ComponentTarget/fileaccess/source/fileacc.component",
+        "ComponentTarget/filter/source/config/cache/filterconfig1.component",
+        "ComponentTarget/oox/util/oox.component",
+        "ComponentTarget/package/source/xstor/xstor.component",
+        "ComponentTarget/package/util/package2.component",
+        "ComponentTarget/sax/source/expatwrap/expwrap.component",
+        "ComponentTarget/sax/source/fastparser/fastsax.component",
+        "ComponentTarget/sc/util/sc.component",
+        "ComponentTarget/sc/util/scfilt.component",
+        "ComponentTarget/scaddins/source/analysis/analysis.component",
+        "ComponentTarget/scaddins/source/datefunc/date.component",
+        "ComponentTarget/sot/util/sot.component",
+        "ComponentTarget/svl/util/svl.component",
+        "ComponentTarget/toolkit/util/tk.component",
+        "ComponentTarget/ucb/source/ucp/tdoc/ucptdoc1.component",
+        "ComponentTarget/unotools/util/utl.component",
+        "ComponentTarget/unoxml/source/rdf/unordf.component",
+        "ComponentTarget/framework/util/fwk.component",
+        "ComponentTarget/i18npool/util/i18npool.component",
+        "ComponentTarget/sfx2/util/sfx.component",
+        "ComponentTarget/unoxml/source/service/unoxml.component",
+        "ComponentTarget/configmgr/source/configmgr.component",
+        "ComponentTarget/ucb/source/core/ucb1.component",
+        "ComponentTarget/ucb/source/ucp/file/ucpfile1.component"
+    };
+
+    for (unsigned i = 0; i < sizeof(services)/sizeof(services[0]); i++) {
+        uno_services = [uno_services stringByAppendingString: @"file://"];
+        uno_services = [uno_services stringByAppendingString: [app_root_escaped stringByAppendingPathComponent: [NSString stringWithUTF8String: services[i]]]];
+        if (i < sizeof(services)/sizeof(services[0]) - 1)
+            uno_services = [uno_services stringByAppendingString: @" "];
+    }
+
+    assert(strcmp(argv[argc-1], "placeholder-uno-services") == 0);
+    argv[argc-1] = [uno_services UTF8String];
+
+    osl_setCommandArgs(argc, (char **) argv);
+
+    try {
+
+        Reference< XComponentContext > xComponentContext(::cppu::defaultBootstrap_InitialComponentContext());
+
+        Reference< XMultiComponentFactory > xMultiComponentFactoryClient( xComponentContext->getServiceManager() );
+
+        Reference< XInterface > xInterface =
+            xMultiComponentFactoryClient->createInstanceWithContext( OUString("com.sun.star.frame.Desktop"),
+                                                                     xComponentContext );
+    }
+    catch (Exception e) {
+        SAL_WARN("Viewer", e.Message);
+    }
+}
diff --git a/ios/experimental/Viewer/Viewer/main.mm b/ios/experimental/Viewer/Viewer/main.mm
new file mode 100644
index 0000000..247c2dc
--- /dev/null
+++ b/ios/experimental/Viewer/Viewer/main.mm
@@ -0,0 +1,21 @@
+// -*- Mode: ObjC; 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/.
+//
+
+#import <UIKit/UIKit.h>
+
+#import "LOViewerAppDelegate.h"
+
+int main(int argc, char *argv[])
+{
+    @autoreleasepool {
+        return UIApplicationMain(argc, argv, nil, NSStringFromClass([LOViewerAppDelegate class]));
+    }
+}
+
+// vim:set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/ios/prj/build.lst b/ios/prj/build.lst
new file mode 100644
index 0000000..dcd87cc
--- /dev/null
+++ b/ios/prj/build.lst
@@ -0,0 +1,2 @@
+ios ios :: packimages postprocess NULL
+ios ios\prj nmake - all an_prj NULL
commit f6c44ad3f7351e5285f26c4504fae7c8155db1a2
Author: Tor Lillqvist <tml at iki.fi>
Date:   Thu Jan 3 12:48:49 2013 +0200

    Do build executables for iOS
    
    The ones that are included in an app bundle, that is. Link them with
    all our (static) libraries.
    
    Change-Id: I36262dc32d09d28b43fcd702e9af1666c1daee3a

diff --git a/solenv/gbuild/platform/IOS_ARM_GCC.mk b/solenv/gbuild/platform/IOS_ARM_GCC.mk
index de8c590..944bac7 100644
--- a/solenv/gbuild/platform/IOS_ARM_GCC.mk
+++ b/solenv/gbuild/platform/IOS_ARM_GCC.mk
@@ -153,14 +153,15 @@ define gb_LinkTarget__command_dynamiclink
 		$(T_LDFLAGS) \
 		$(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \
 		$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \
+		$(foreach object,$(ASMOBJECTS),$(call gb_AsmObject_get_target,$(object))) \
 		$(foreach object,$(OBJCOBJECTS),$(call gb_ObjCObject_get_target,$(object))) \
 		$(foreach object,$(OBJCXXOBJECTS),$(call gb_ObjCxxObject_get_target,$(object))) \
-		$(foreach object,$(ASMOBJECTS),$(call gb_AsmObject_get_target,$(object))) \
 		$(foreach object,$(GENCOBJECTS),$(call gb_GenCObject_get_target,$(object))) \
 		$(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \
 		$(foreach extraobjectlist,$(EXTRAOBJECTLISTS),`cat $(extraobjectlist)`) \
 		$(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_target,$(lib))) \
 		$(call gb_LinkTarget__get_liblinkflags,$(LINKED_LIBS)) \
+		$(wildcard $(OUTDIR)/lib/*.a) \
 		$(LIBS) \
 		-o $(1))
 endef
@@ -184,7 +185,8 @@ endef
 
 define gb_LinkTarget__command
 $(call gb_Output_announce,$(2),$(true),LNK,4)
-$(call gb_LinkTarget__command_staticlink,$(1))
+$(if $(filter Executable,$(TARGETTYPE)),$(call gb_LinkTarget__command_dynamiclink,$(1),$(2)))
+$(if $(filter CppunitTest Library StaticLibrary,$(TARGETTYPE)),$(call gb_LinkTarget__command_staticlink,$(1)))
 endef
 
 define gb_LinkTarget_use_system_darwin_frameworks
@@ -247,7 +249,7 @@ gb_StaticLibrary_StaticLibrary_platform =
 
 # Executable class
 
-gb_Executable_EXT := .a
+gb_Executable_EXT :=
 gb_Executable_TARGETTYPEFLAGS := 
 
 gb_Executable_LAYER := \
commit 40900fbd7dfe7614f2d6f49d53b2166ee7669f15
Author: Tor Lillqvist <tml at iki.fi>
Date:   Thu Jan 3 12:48:14 2013 +0200

    Add iconv library
    
    Change-Id: Ice30031754e00958e9b1906ed767f56d481889c3

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 0d3058b..06a3c23 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -178,6 +178,11 @@ endef
 
 endif
 
+define gb_LinkTarget__use_iconv
+$(call gb_LinkTarget_add_libs,$(1),-liconv)
+
+endef
+
 ifeq ($(SYSTEM_ZLIB),YES)
 
 define gb_LinkTarget__use_zlib
commit 8df455d7b9d3fb4df5f35b49453756133724de81
Author: Tor Lillqvist <tml at iki.fi>
Date:   Thu Jan 3 11:06:37 2013 +0200

    Make the rtl_uString pretty-printer work better
    
    Change-Id: I4c376f53af0a20203a4c8ea34abbf607ac7e987e

diff --git a/solenv/lldb/libreoffice/LO.py b/solenv/lldb/libreoffice/LO.py
index 8f7c247..594af09 100644
--- a/solenv/lldb/libreoffice/LO.py
+++ b/solenv/lldb/libreoffice/LO.py
@@ -29,21 +29,30 @@
 
 # script sys.path[:0] = [os.path.expanduser('~/lo/ios/solenv/lldb/libreoffice')]
 # script import LO
-# type summary add --python-function LO.rtluString_summary rtl_uString
-# type summary add --python-function LO.rtl_OUString_summary rtl::OUString
+# type summary add --skip-references --python-function LO.rtl_uString_summary rtl_uString
+# type summary add --skip-pointers --skip-references --python-function LO.rtl_OUString_summary rtl::OUString
 
 import lldb
 
-def rtluString_summary(rtlustring, dict):
+def rtl_uString_summary(valobj, dict):
     e = lldb.SBError()
 
-    length = rtlustring.GetChildMemberWithName('length').GetValueAsUnsigned(0)
-    buffer = rtlustring.GetChildMemberWithName('buffer')
+    # print "valobj = " + str(valobj) + ", valobj.GetData() = " + str(valobj.GetData()) + ", valobj.GetTypeName() = " + str(valobj.GetTypeName())
+
+    # As we don't use --skip-pointers when doing the "type summary add" for this function,
+    # the value to be printed might actually be a pointer to a rtl_uString. Weird, huh?
+    if valobj.TypeIsPointerType():
+        return rtl_uString_summary(valobj.Dereference(), dict)
+
+    length = valobj.GetChildMemberWithName('length').GetValueAsUnsigned(0)
+    buffer = valobj.GetChildMemberWithName('buffer')
+
+    buffer_ptr = buffer.AddressOf();
 
     s = '"'
     i = 0
     while i < length:
-        c = buffer.GetPointeeData(i, 1).GetUnsignedInt16(e, 0)
+        c = buffer_ptr.GetPointeeData(i, 1).GetUnsignedInt16(e, 0)
         if c == ord('"'):
             s = s + '\\"'
         elif c == ord('\\'):
@@ -65,7 +74,7 @@ def rtluString_summary(rtlustring, dict):
 
     return s
 
-def rtl_OUString_summary(rtloustring, dict):
-    return rtluString_summary(rtloustring.GetChildMemberWithName('pData'), dict)
+def rtl_OUString_summary(valobj, dict):
+    return rtl_uString_summary(valobj.GetChildMemberWithName('pData'), dict)
 
 # vim:set shiftwidth=4 softtabstop=4 expandtab:
commit 92dbf9df486c3f77f48756ffae424990158d9963
Author: Tor Lillqvist <tml at iki.fi>
Date:   Wed Jan 2 14:18:11 2013 +0200

    No point in the DllPlugInTester executable on non-desktop OSes, I think
    
    Change-Id: I46e4081375e2f7eda0c9f443cf28dcfe575a7dba

diff --git a/cppunit/ExternalPackage_cppunit.mk b/cppunit/ExternalPackage_cppunit.mk
index 3a24f52..d5f3f53 100644
--- a/cppunit/ExternalPackage_cppunit.mk
+++ b/cppunit/ExternalPackage_cppunit.mk
@@ -24,8 +24,10 @@ else
 ifneq ($(DISABLE_DYNLOADING),TRUE)
 $(eval $(call gb_ExternalPackage_add_file,cppunit,bin/DllPlugInTester,src/DllPlugInTester/.libs/DllPlugInTester))
 else
+ifneq ($(filter DESKTOP,$(BUILD_TYPE)),)
 $(eval $(call gb_ExternalPackage_add_file,cppunit,bin/DllPlugInTester,src/DllPlugInTester/DllPlugInTester))
 endif
+endif
 ifeq ($(OS),MACOSX)
 $(eval $(call gb_ExternalPackage_add_file,cppunit,lib/libcppunit-1.13.0.dylib,src/cppunit/.libs/libcppunit-1.13.0.dylib))
 $(eval $(call gb_ExternalPackage_add_file,cppunit,lib/libcppunit.dylib,src/cppunit/.libs/libcppunit.dylib))


More information about the Libreoffice-commits mailing list