bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm.cxx                          | 
  25 +
 bridges/source/cpp_uno/gcc3_ios_arm/except.cxx                               | 
 129 +++++++---
 bridges/source/cpp_uno/gcc3_ios_arm/generate-snippets.pl                     | 
   4 
 ios/MobileLibreOffice/MobileLibreOffice.xcodeproj/project.pbxproj            | 
   6 
 ios/README                                                                   | 
  30 ++
 ios/experimental/LibreOffice/LibreOffice.xcodeproj/project.pbxproj           | 
   8 
 ios/experimental/TiledLibreOffice/TiledLibreOffice.xcodeproj/project.pbxproj | 
  46 +++
 ios/shared/ios_sharedlo.xcodeproj/project.pbxproj                            | 
   6 
 8 files changed, 201 insertions(+), 53 deletions(-)

New commits:
commit 0324a62e1977c60961cbf86e454e676d825a4e03
Author: Tor Lillqvist <t...@collabora.com>
Date:   Mon Dec 23 11:29:14 2013 +0200

    Add source files from bridges for quicker breakpoint setting
    
    Change-Id: I7842d9d0e5786647d14d0c30be5230c05883ada2

diff --git 
a/ios/experimental/TiledLibreOffice/TiledLibreOffice.xcodeproj/project.pbxproj 
b/ios/experimental/TiledLibreOffice/TiledLibreOffice.xcodeproj/project.pbxproj
index f236daf..73dfcf8e 100644
--- 
a/ios/experimental/TiledLibreOffice/TiledLibreOffice.xcodeproj/project.pbxproj
+++ 
b/ios/experimental/TiledLibreOffice/TiledLibreOffice.xcodeproj/project.pbxproj
@@ -81,6 +81,25 @@
                BE82BDAB182190E400A447B5 /* TiledView.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path 
= TiledView.m; sourceTree = "<group>"; };
                BE82BDAD1821A1D000A447B5 /* View.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
View.h; sourceTree = "<group>"; };
                BE82BDAE1821A1D000A447B5 /* View.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path 
= View.m; sourceTree = "<group>"; };
+               BE9F45F91868396500B8BE69 /* cpp2uno-arm.cxx */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = 
"cpp2uno-arm.cxx"; path = 
"../../../bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm.cxx"; sourceTree = 
"<group>"; };
+               BE9F45FA1868396500B8BE69 /* cpp2uno-arm64.cxx */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = 
"cpp2uno-arm64.cxx"; path = 
"../../../bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm64.cxx"; sourceTree = 
"<group>"; };
+               BE9F45FB1868396500B8BE69 /* cpp2uno-i386.cxx */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = 
"cpp2uno-i386.cxx"; path = 
"../../../bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-i386.cxx"; sourceTree = 
"<group>"; };
+               BE9F45FC1868396500B8BE69 /* cpp2uno.cxx */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = cpp2uno.cxx; 
path = ../../../bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno.cxx; sourceTree = 
"<group>"; };
+               BE9F45FD1868396500B8BE69 /* except.cxx */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = except.cxx; 
path = ../../../bridges/source/cpp_uno/gcc3_ios_arm/except.cxx; sourceTree = 
"<group>"; };
+               BE9F45FE1868396500B8BE69 /* helper.s */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.asm; name = helper.s; path = 
../../../bridges/source/cpp_uno/gcc3_ios_arm/helper.s; sourceTree = "<group>"; 
};
+               BE9F45FF1868396500B8BE69 /* temp.cxx */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = temp.cxx; path 
= ../../../bridges/source/cpp_uno/gcc3_ios_arm/temp.cxx; sourceTree = 
"<group>"; };
+               BE9F46001868396500B8BE69 /* uno2cpp-arm.cxx */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = 
"uno2cpp-arm.cxx"; path = 
"../../../bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm.cxx"; sourceTree = 
"<group>"; };
+               BE9F46011868396500B8BE69 /* uno2cpp-arm64.cxx */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = 
"uno2cpp-arm64.cxx"; path = 
"../../../bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm64.cxx"; sourceTree = 
"<group>"; };
+               BE9F46021868396500B8BE69 /* uno2cpp-i386.cxx */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = 
"uno2cpp-i386.cxx"; path = 
"../../../bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-i386.cxx"; sourceTree = 
"<group>"; };
+               BE9F46031868396500B8BE69 /* uno2cpp.cxx */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = uno2cpp.cxx; 
path = ../../../bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp.cxx; sourceTree = 
"<group>"; };
+               BE9F4604186839C100B8BE69 /* bridge.cxx */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = bridge.cxx; 
path = ../../../bridges/source/cpp_uno/shared/bridge.cxx; sourceTree = 
"<group>"; };
+               BE9F4605186839C100B8BE69 /* component.cxx */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = component.cxx; 
path = ../../../bridges/source/cpp_uno/shared/component.cxx; sourceTree = 
"<group>"; };
+               BE9F4606186839C100B8BE69 /* cppinterfaceproxy.cxx */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = 
cppinterfaceproxy.cxx; path = 
../../../bridges/source/cpp_uno/shared/cppinterfaceproxy.cxx; sourceTree = 
"<group>"; };
+               BE9F4607186839C100B8BE69 /* guardedarray.hxx */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.cpp.h; name = 
guardedarray.hxx; path = 
../../../bridges/source/cpp_uno/shared/guardedarray.hxx; sourceTree = 
"<group>"; };
+               BE9F4608186839C100B8BE69 /* types.cxx */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = types.cxx; 
path = ../../../bridges/source/cpp_uno/shared/types.cxx; sourceTree = 
"<group>"; };
+               BE9F4609186839C100B8BE69 /* unointerfaceproxy.cxx */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = 
unointerfaceproxy.cxx; path = 
../../../bridges/source/cpp_uno/shared/unointerfaceproxy.cxx; sourceTree = 
"<group>"; };
+               BE9F460A186839C100B8BE69 /* vtablefactory.cxx */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = 
vtablefactory.cxx; path = 
../../../bridges/source/cpp_uno/shared/vtablefactory.cxx; sourceTree = 
"<group>"; };
+               BE9F460B186839C100B8BE69 /* vtables.cxx */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = vtables.cxx; 
path = ../../../bridges/source/cpp_uno/shared/vtables.cxx; sourceTree = 
"<group>"; };
                BECAB371186054DE00F814F9 /* lo.mm */ = {isa = PBXFileReference; 
fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = lo.mm; 
sourceTree = "<group>"; };
                BEDB0F08185B7537009A6F26 /* lo.xcconfig */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = 
lo.xcconfig; path = ../../../lo.xcconfig; sourceTree = "<group>"; };
                BEEE02CE1860ABB700FBDE67 /* program */ = {isa = 
PBXFileReference; lastKnownFileType = folder; name = program; path = 
Resources/program; sourceTree = SOURCE_ROOT; };
@@ -117,6 +136,7 @@
                BE0898E61860D3CD0021A679 /* LibreOffice source files */ = {
                        isa = PBXGroup;
                        children = (
+                               BE9F45F81868393D00B8BE69 /* bridges */,
                                BE0898E71860D3DA0021A679 /* vcl */,
                        );
                        name = "LibreOffice source files";
@@ -236,6 +256,32 @@
                        name = "Supporting Files";
                        sourceTree = "<group>";
                };
+               BE9F45F81868393D00B8BE69 /* bridges */ = {
+                       isa = PBXGroup;
+                       children = (
+                               BE9F4604186839C100B8BE69 /* bridge.cxx */,
+                               BE9F4605186839C100B8BE69 /* component.cxx */,
+                               BE9F4606186839C100B8BE69 /* 
cppinterfaceproxy.cxx */,
+                               BE9F4607186839C100B8BE69 /* guardedarray.hxx */,
+                               BE9F4608186839C100B8BE69 /* types.cxx */,
+                               BE9F4609186839C100B8BE69 /* 
unointerfaceproxy.cxx */,
+                               BE9F460A186839C100B8BE69 /* vtablefactory.cxx 
*/,
+                               BE9F460B186839C100B8BE69 /* vtables.cxx */,
+                               BE9F45F91868396500B8BE69 /* cpp2uno-arm.cxx */,
+                               BE9F45FA1868396500B8BE69 /* cpp2uno-arm64.cxx 
*/,
+                               BE9F45FB1868396500B8BE69 /* cpp2uno-i386.cxx */,
+                               BE9F45FC1868396500B8BE69 /* cpp2uno.cxx */,
+                               BE9F45FD1868396500B8BE69 /* except.cxx */,
+                               BE9F45FE1868396500B8BE69 /* helper.s */,
+                               BE9F45FF1868396500B8BE69 /* temp.cxx */,
+                               BE9F46001868396500B8BE69 /* uno2cpp-arm.cxx */,
+                               BE9F46011868396500B8BE69 /* uno2cpp-arm64.cxx 
*/,
+                               BE9F46021868396500B8BE69 /* uno2cpp-i386.cxx */,
+                               BE9F46031868396500B8BE69 /* uno2cpp.cxx */,
+                       );
+                       name = bridges;
+                       sourceTree = "<group>";
+               };
                BEEEF9681860A21F00FBDE67 /* Resources */ = {
                        isa = PBXGroup;
                        children = (
commit 5dcd53835d1420e6421efd087d392f308c1df833
Author: Tor Lillqvist <t...@collabora.com>
Date:   Mon Dec 23 11:13:11 2013 +0200

    More informative logging
    
    Change-Id: I71b04086ae0418f0a6c988fc71c1e5fee6eed690

diff --git a/bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm.cxx 
b/bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm.cxx
index 5de27f8..8883523 100644
--- a/bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm.cxx
+++ b/bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm.cxx
@@ -467,8 +467,11 @@ extern "C" sal_Int64 cpp_vtable_call( long 
*pFunctionAndOffset,
 
 namespace
 {
-    unsigned char *codeSnippet(sal_Int32 functionIndex,
-        sal_Int32 vtableOffset, bool bHasHiddenParam)
+    unsigned char *codeSnippet(const typelib_InterfaceTypeDescription *type,
+                               const typelib_TypeDescription *member,
+                               sal_Int32 functionIndex,
+                               sal_Int32 vtableOffset,
+                               bool bHasHiddenParam)
     {
         assert(functionIndex < nFunIndexes);
         if (!(functionIndex < nFunIndexes))
@@ -484,7 +487,7 @@ namespace
         int index = functionIndex*nVtableOffsets*2 + vtableOffset*2 + 
bHasHiddenParam;
         unsigned char *result = ((unsigned char *) &codeSnippets) + 
codeSnippets[index];
 
-        SAL_INFO( "bridges.ios", "codeSnippet: [" << functionIndex << "," << 
vtableOffset << "," << (int)bHasHiddenParam << "]=" << (void *) result << " (" 
<< std::hex << ((int*)result)[0] << "," << ((int*)result)[1] << "," << 
((int*)result)[2] << "," << ((int*)result)[3] << ")");
+        SAL_INFO( "bridges.ios", "codeSnippet(" << 
OUString(type->aBase.pTypeName) << "::" << OUString(member->pTypeName) << "): 
[" << functionIndex << "," << vtableOffset << "," << (int)bHasHiddenParam << 
"]=" << (void *) result << " (" << std::hex << ((int*)result)[0] << "," << 
((int*)result)[1] << "," << ((int*)result)[2] << "," << ((int*)result)[3] << 
")");
 
         return result;
     }
@@ -534,15 +537,16 @@ unsigned char * 
bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
                     reinterpret_cast<typelib_InterfaceAttributeTypeDescription 
*>( member );
 
                 // Getter:
-                (s++)->fn = codeSnippet(
-                    functionOffset++, vtableOffset,
-                    arm::return_in_hidden_param( pAttrTD->pAttributeTypeRef ));
+                (s++)->fn = codeSnippet(type, member,
+                                        functionOffset++, vtableOffset,
+                                        arm::return_in_hidden_param( 
pAttrTD->pAttributeTypeRef ));
 
                 // Setter:
                 if (!pAttrTD->bReadOnly)
                 {
-                    (s++)->fn = codeSnippet(
-                        functionOffset++, vtableOffset, false);
+                    (s++)->fn = codeSnippet(type, member,
+                                            functionOffset++, vtableOffset,
+                                            false);
                 }
                 break;
             }
@@ -552,8 +556,9 @@ unsigned char * 
bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
                     reinterpret_cast<
                         typelib_InterfaceMethodTypeDescription * >(member);
 
-                (s++)->fn = codeSnippet(functionOffset++, vtableOffset,
-                    arm::return_in_hidden_param(pMethodTD->pReturnTypeRef));
+                (s++)->fn = codeSnippet(type, member,
+                                        functionOffset++, vtableOffset,
+                                        
arm::return_in_hidden_param(pMethodTD->pReturnTypeRef));
                 break;
             }
         default:
diff --git a/bridges/source/cpp_uno/gcc3_ios_arm/except.cxx 
b/bridges/source/cpp_uno/gcc3_ios_arm/except.cxx
index c398631..01690d3 100644
--- a/bridges/source/cpp_uno/gcc3_ios_arm/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_ios_arm/except.cxx
@@ -119,8 +119,6 @@ void dummy_can_throw_anything( char const * )
 
 static OUString toUNOname( char const * p ) SAL_THROW(())
 {
-    char const * start = p;
-
     // example: N3com3sun4star4lang24IllegalArgumentExceptionE
 
     OUStringBuffer buf( 64 );
@@ -144,8 +142,6 @@ static OUString toUNOname( char const * p ) SAL_THROW(())
 
     OUString result( buf.makeStringAndClear() );
 
-    SAL_INFO( "bridges.ios", "toUNOname(" << start << "): " << result );
-
     return result;
 }
 
@@ -207,11 +203,11 @@ std::type_info * RTTI::getRTTI( 
typelib_CompoundTypeDescription *pTypeDescr ) SA
         buf.append( 'E' );
 
         OString symName( buf.makeStringAndClear() );
-        SAL_INFO( "bridges.ios", "getRTTI: calling dlsym() for type_info for " 
<< unoName );
         rtti = (std::type_info *)dlsym( m_hApp, symName.getStr() );
 
         if (rtti)
         {
+            SAL_INFO( "bridges.ios", "getRTTI: dlsym() found type_info for " 
<< unoName );
             std::pair< t_rtti_map::iterator, bool > insertion(
                 m_rttis.insert( t_rtti_map::value_type( unoName, rtti ) ) );
             SAL_WARN_IF( !insertion.second,
commit 792c20bf589101e2e1a684d6afb002a4f1970a05
Author: Tor Lillqvist <t...@collabora.com>
Date:   Mon Dec 23 02:05:57 2013 +0200

    Let's try to use basically the same except.cxx for iOS as for OS X
    
    Change-Id: Ic4cdf6b91f2a71fc556c8d9c2ba3808f0d953754

diff --git a/bridges/source/cpp_uno/gcc3_ios_arm/except.cxx 
b/bridges/source/cpp_uno/gcc3_ios_arm/except.cxx
index e21dce7..c398631 100644
--- a/bridges/source/cpp_uno/gcc3_ios_arm/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_ios_arm/except.cxx
@@ -17,8 +17,14 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <typeinfo>
+
 #include <dlfcn.h>
+#if defined(MACOSX) && MACOSX_SDK_VERSION < 1070
 #include <cxxabi.h>
+#endif
+
+#include <boost/static_assert.hpp>
 #include <boost/unordered_map.hpp>
 
 #include <rtl/strbuf.hxx>
@@ -34,26 +40,91 @@
 
 #include "share.hxx"
 
-using namespace ::std;
 using namespace ::osl;
-using namespace ::rtl;
 using namespace ::com::sun::star::uno;
-using namespace ::__cxxabiv1;
 
-namespace CPPU_CURRENT_NAMESPACE
+namespace CPPU_CURRENT_NAMESPACE {
+
+namespace {
+
+struct Fake_type_info {
+    virtual ~Fake_type_info() {}
+    char const * name;
+};
+
+struct Fake_class_type_info: Fake_type_info {};
+
+#if defined(MACOSX) && MACOSX_SDK_VERSION < 1070
+BOOST_STATIC_ASSERT(
+    sizeof (Fake_class_type_info) == sizeof (__cxxabiv1::__class_type_info));
+#endif
+
+struct Fake_si_class_type_info: Fake_class_type_info {
+    void const * base;
+};
+
+#if defined(MACOSX) && MACOSX_SDK_VERSION < 1070
+BOOST_STATIC_ASSERT(
+    sizeof (Fake_si_class_type_info)
+    == sizeof (__cxxabiv1::__si_class_type_info));
+#endif
+
+struct Base {};
+struct Derived: Base {};
+
+std::type_info * createFake_class_type_info(char const * name) {
+    char * buf = new char[sizeof (Fake_class_type_info)];
+#if defined(MACOSX) && MACOSX_SDK_VERSION < 1070
+    assert(
+        dynamic_cast<__cxxabiv1::__class_type_info const *>(&typeid(Base))
+        != 0);
+#endif
+    *reinterpret_cast<void **>(buf) = *reinterpret_cast<void * const *>(
+        &typeid(Base));
+        // copy __cxxabiv1::__class_type_info vtable into place
+    Fake_class_type_info * fake = reinterpret_cast<Fake_class_type_info 
*>(buf);
+    fake->name = name;
+#ifdef _LIBCPP_NONUNIQUE_RTTI_BIT
+    *(uintptr_t*)(&fake->name) |= _LIBCPP_NONUNIQUE_RTTI_BIT;
+#endif
+    return reinterpret_cast<std::type_info *>(
+        static_cast<Fake_type_info *>(fake));
+}
+
+std::type_info * createFake_si_class_type_info(
+    char const * name, std::type_info const * base)
 {
+    char * buf = new char[sizeof (Fake_si_class_type_info)];
+#if defined(MACOSX) && MACOSX_SDK_VERSION < 1070
+    assert(
+        dynamic_cast<__cxxabiv1::__si_class_type_info const 
*>(&typeid(Derived))
+        != 0);
+#endif
+    *reinterpret_cast<void **>(buf) = *reinterpret_cast<void * const *>(
+        &typeid(Derived));
+        // copy __cxxabiv1::__si_class_type_info vtable into place
+    Fake_si_class_type_info * fake
+        = reinterpret_cast<Fake_si_class_type_info *>(buf);
+    fake->name = name;
+    fake->base = base;
+    return reinterpret_cast<std::type_info *>(
+        static_cast<Fake_type_info *>(fake));
+}
+
+}
 
 void dummy_can_throw_anything( char const * )
 {
 }
 
-//==================================================================================================
 static OUString toUNOname( char const * p ) SAL_THROW(())
 {
+    char const * start = p;
+
     // example: N3com3sun4star4lang24IllegalArgumentExceptionE
 
     OUStringBuffer buf( 64 );
-    OSL_ASSERT( 'N' == *p );
+    assert( 'N' == *p );
     ++p; // skip N
 
     while ('E' != *p)
@@ -73,13 +144,14 @@ static OUString toUNOname( char const * p ) SAL_THROW(())
 
     OUString result( buf.makeStringAndClear() );
 
+    SAL_INFO( "bridges.ios", "toUNOname(" << start << "): " << result );
+
     return result;
 }
 
-//==================================================================================================
 class RTTI
 {
-    typedef boost::unordered_map< OUString, const type_info *, OUStringHash > 
t_rtti_map;
+    typedef boost::unordered_map< OUString, std::type_info *, OUStringHash > 
t_rtti_map;
 
     Mutex m_mutex;
     t_rtti_map m_rttis;
@@ -91,27 +163,28 @@ public:
     RTTI() SAL_THROW(());
     ~RTTI() SAL_THROW(());
 
-    const type_info * getRTTI( typelib_CompoundTypeDescription * ) 
SAL_THROW(());
+    std::type_info * getRTTI( typelib_CompoundTypeDescription * ) 
SAL_THROW(());
 };
-//__________________________________________________________________________________________________
+
 RTTI::RTTI() SAL_THROW(())
     : m_hApp( dlopen( 0, RTLD_LAZY ) )
 {
+#if 0
     // Insert commonly needed type_infos to avoid dlsym() calls
     // Ideally we should insert all needed ones
     m_rttis.insert( t_rtti_map::value_type( 
"com.sun.star.ucb.InteractiveAugmentedIOException",
                                             &typeid( 
com::sun::star::ucb::InteractiveAugmentedIOException ) ) );
+#endif
 }
-//__________________________________________________________________________________________________
+
 RTTI::~RTTI() SAL_THROW(())
 {
     dlclose( m_hApp );
 }
 
-//__________________________________________________________________________________________________
-const type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) 
SAL_THROW(())
+std::type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) 
SAL_THROW(())
 {
-    const type_info * rtti;
+    std::type_info * rtti;
 
     OUString const & unoName = *(OUString const *)&pTypeDescr->aBase.pTypeName;
 
@@ -135,11 +208,11 @@ const type_info * RTTI::getRTTI( 
typelib_CompoundTypeDescription *pTypeDescr ) S
 
         OString symName( buf.makeStringAndClear() );
         SAL_INFO( "bridges.ios", "getRTTI: calling dlsym() for type_info for " 
<< unoName );
-        rtti = (type_info *)dlsym( m_hApp, symName.getStr() );
+        rtti = (std::type_info *)dlsym( m_hApp, symName.getStr() );
 
         if (rtti)
         {
-            pair< t_rtti_map::iterator, bool > insertion(
+            std::pair< t_rtti_map::iterator, bool > insertion(
                 m_rttis.insert( t_rtti_map::value_type( unoName, rtti ) ) );
             SAL_WARN_IF( !insertion.second,
                          "bridges",
@@ -154,25 +227,26 @@ const type_info * RTTI::getRTTI( 
typelib_CompoundTypeDescription *pTypeDescr ) S
                 // we must generate it !
                 // symbol and rtti-name is nearly identical,
                 // the symbol is prefixed with _ZTI
-                char const * rttiName = symName.getStr() +4;
+                char * rttiName = strdup(symName.getStr() + 4);
+                if (rttiName == 0) {
+                    throw std::bad_alloc();
+                }
 
                 SAL_INFO( "bridges.ios", "getRTTI: generating typeinfo " << 
rttiName );
 
                 if (pTypeDescr->pBaseTypeDescription)
                 {
                     // ensure availability of base
-                    const type_info * base_rtti = getRTTI(
+                    std::type_info * base_rtti = getRTTI(
                         (typelib_CompoundTypeDescription 
*)pTypeDescr->pBaseTypeDescription );
-                    rtti = new __si_class_type_info(
-                        strdup( rttiName ), (__class_type_info *)base_rtti );
+                    rtti = createFake_si_class_type_info(rttiName, base_rtti);
                 }
                 else
                 {
-                    // this class has no base class
-                    rtti = new __class_type_info( strdup( rttiName ) );
+                    rtti = createFake_class_type_info(rttiName);
                 }
 
-                pair< t_rtti_map::iterator, bool > insertion(
+                std::pair< t_rtti_map::iterator, bool > insertion(
                     m_generatedRttis.insert( t_rtti_map::value_type( unoName, 
rtti ) ) );
                 SAL_WARN_IF( !insertion.second,
                              "bridges",
@@ -192,7 +266,6 @@ const type_info * RTTI::getRTTI( 
typelib_CompoundTypeDescription *pTypeDescr ) S
     return rtti;
 }
 
-//--------------------------------------------------------------------------------------------------
 static void deleteException( void * pExc )
 {
     __cxa_exception const * header = ((__cxa_exception const *)pExc - 1);
@@ -207,13 +280,12 @@ static void deleteException( void * pExc )
     }
 }
 
-//==================================================================================================
 void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
 {
     SAL_INFO( "bridges.ios", "raiseException: " << *reinterpret_cast< OUString 
const * >( &pUnoExc->pType->pTypeName ) );
 
     void * pCppExc;
-    const type_info * rtti;
+    std::type_info * rtti;
 
     {
     // construct cpp exception object
@@ -249,9 +321,8 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * 
pUno2Cpp )
         }
     }
     rtti = s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
-
     TYPELIB_DANGER_RELEASE( pTypeDescr );
-    OSL_ENSURE( rtti, "### no rtti for throwing exception!" );
+    assert( rtti );
     if (! rtti)
     {
         throw RuntimeException(
@@ -261,10 +332,9 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * 
pUno2Cpp )
     }
     }
 
-    __cxa_throw( pCppExc, (type_info *) rtti, deleteException );
+    __cxa_throw( pCppExc, rtti, deleteException );
 }
 
-//==================================================================================================
 void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, 
uno_Mapping * pCpp2Uno )
 {
     if (! header)
@@ -294,7 +364,6 @@ void fillUnoException( __cxa_exception * header, uno_Any * 
pUnoExc, uno_Mapping
             Reference< XInterface >() );
         Type const & rType = ::getCppuType( &aRE );
         uno_type_any_constructAndConvert( pUnoExc, &aRE, 
rType.getTypeLibType(), pCpp2Uno );
-
 #if OSL_DEBUG_LEVEL > 0
         OString cstr( OUStringToOString( aRE.Message, 
RTL_TEXTENCODING_ASCII_US ) );
         OSL_FAIL( cstr.getStr() );
commit 1d3b6ce74a70d1f8e53e8430c46f7f6cc7cf6ec1
Author: Tor Lillqvist <t...@collabora.com>
Date:   Mon Dec 23 02:02:11 2013 +0200

    Avoid Perl warnings
    
    Change-Id: I62ade513bd98e5410c1df14e890e8cc964f1eb25

diff --git a/bridges/source/cpp_uno/gcc3_ios_arm/generate-snippets.pl 
b/bridges/source/cpp_uno/gcc3_ios_arm/generate-snippets.pl
index 5150686..a854883 100755
--- a/bridges/source/cpp_uno/gcc3_ios_arm/generate-snippets.pl
+++ b/bridges/source/cpp_uno/gcc3_ios_arm/generate-snippets.pl
@@ -47,8 +47,8 @@ printf ("#if defined(__arm) || defined(__arm64)\n");
 printf ("\n");
 printf ("// Each codeSnippetX function stores into ip (arm64: x15) an address 
and branches to _privateSnippetExecutor\n");
 printf ("// The address is that following the branch instruction, containing 
two 32-bit ints:\n");
-printf ("// - the function index (for 32-bit can have the 0x80000000 bit 
set\n");
-printf ("//   to indicate that a hidden parameter is used for returning large 
values)\n");
+printf ("// - the function index, which for 32-bit can have the 0x80000000 bit 
set\n");
+printf ("//   to indicate that a hidden parameter is used for returning large 
values\n");
 printf ("// - the vtable offset\n");
 printf ("\n");
 
commit 5355fcc367822c4c0bb6cd4b121f5f8a5efbf4dc
Author: Tor Lillqvist <t...@collabora.com>
Date:   Sun Dec 22 22:01:05 2013 +0200

    Describe the apps
    
    Change-Id: If07fe2ddc99bf2d2a9a4bc242be22fe615a5b1f9

diff --git a/ios/README b/ios/README
index 76a1299..e13c8c3 100644
--- a/ios/README
+++ b/ios/README
@@ -1 +1,29 @@
-iOS specific code and tests
+experimental iOS apps that use LibreOffice code.
+
+experimental/LibreOffice - Uses the "normal" desktop-style main loop
+and output mechanism to display the document, and also accepts input
+and selections. Broken since the tiled rendering changes. As tiled
+rendering seems to be what will/should be used, this app is of limited
+usefulness now. (Don't get excited by the name of this app, it was
+never intended to become a "complete" LibreOffice in any sense. In
+retrospect it was silly to call it just "LibreOffice.)
+
+Note that this app is built using gbuild: The executable as a normal
+executable from gbuild's perspective, and the app bundle then using a
+CustomTarget that constructs it. Its Xcode project has no normal
+"Compile Sources" or "Link Binary" build phases but instead a "Run
+Script" one that runs make.
+
+experimental/TiledLibreOffice - Uses tiled rendering and CATiledLayer.
+No input handling, but scrolling around and zooming around works
+nicely. Displays the number of tiles rendered per second. Also the
+name of this app is a bit too grandiose. Built by an Xcode project.
+(When built from the shell, running xcodebuild).
+
+MobileLibreOffice - Uses the code in "shared" subdirectory. Can be
+built in two configurations: 1) the "normal" configurations (Debug and
+Release) that matches experimental/LibreOffice in functionality, more
+or less. (But the coded is entirely differently structred.) But also
+this is currently broken, 2) the Debug_tile_tester configuration,
+where one can tweak tiling parameters and see a tile rendered. Also
+built by an Xcode project.
commit ee7689d052c229b9f254c8fd37ffaeb85e604a17
Author: Tor Lillqvist <t...@collabora.com>
Date:   Sun Dec 22 21:56:43 2013 +0200

    We seem to need lo.xcconfig here, too
    
    Change-Id: I7db16b3736a83b9372aba11ac9ff302bc087e008

diff --git a/ios/experimental/LibreOffice/LibreOffice.xcodeproj/project.pbxproj 
b/ios/experimental/LibreOffice/LibreOffice.xcodeproj/project.pbxproj
index c538555..9c4aa9e 100644
--- a/ios/experimental/LibreOffice/LibreOffice.xcodeproj/project.pbxproj
+++ b/ios/experimental/LibreOffice/LibreOffice.xcodeproj/project.pbxproj
@@ -21,6 +21,7 @@
                BE02DE57175F2E2A00ED4032 /* guess.cxx */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
name = guess.cxx; path = ../../../../sw/source/core/text/guess.cxx; sourceTree 
= "<group>"; };
                BE08805B16FDB784000CED5C /* View.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
View.h; sourceTree = "<group>"; };
                BE08805C16FDB784000CED5C /* View.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path 
= View.m; sourceTree = "<group>"; };
+               BE1AB205186775FE008FFBF2 /* lo.xcconfig */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = 
lo.xcconfig; path = ../../../lo.xcconfig; sourceTree = "<group>"; };
                BE2CB9601808247600953CB4 /* winproc.cxx */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = winproc.cxx; 
path = ../../../../vcl/source/window/winproc.cxx; sourceTree = "<group>"; };
                BE2CB9611808297500953CB4 /* select.cxx */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
name = select.cxx; path = ../../../../sw/source/ui/wrtsh/select.cxx; sourceTree 
= "<group>"; };
                BE2CB962180829DD00953CB4 /* txtcrsr.cxx */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
name = txtcrsr.cxx; path = ../../../../sw/source/ui/shells/txtcrsr.cxx; 
sourceTree = "<group>"; };
@@ -247,6 +248,7 @@
                BE5A22601664F87600CF01C9 /* Supporting Files */ = {
                        isa = PBXGroup;
                        children = (
+                               BE1AB205186775FE008FFBF2 /* lo.xcconfig */,
                                BE5A22611664F87600CF01C9 /* 
LibreOffice-Info.plist */,
                                BE5A22621664F87600CF01C9 /* InfoPlist.strings 
*/,
                                BE5A22651664F87600CF01C9 /* main.m */,
@@ -424,6 +426,7 @@
 /* Begin XCBuildConfiguration section */
                BE5A22861664F87600CF01C9 /* Debug */ = {
                        isa = XCBuildConfiguration;
+                       baseConfigurationReference = BE1AB205186775FE008FFBF2 
/* lo.xcconfig */;
                        buildSettings = {
                                CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
                                "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone 
Developer";
@@ -447,6 +450,7 @@
                };
                BE5A22871664F87600CF01C9 /* Release */ = {
                        isa = XCBuildConfiguration;
+                       baseConfigurationReference = BE1AB205186775FE008FFBF2 
/* lo.xcconfig */;
                        buildSettings = {
                                CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
                                "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone 
Developer";
commit 4a86b0f30156683012bb5d66fdfdc78e72befa1d
Author: Tor Lillqvist <t...@collabora.com>
Date:   Sun Dec 22 21:28:22 2013 +0200

    Add arm64 to VALID_ARCHS
    
    Change-Id: Ibf1ed5ee1d7ab8319b393475c49655708e9a6d61

diff --git a/ios/MobileLibreOffice/MobileLibreOffice.xcodeproj/project.pbxproj 
b/ios/MobileLibreOffice/MobileLibreOffice.xcodeproj/project.pbxproj
index e0dcfc9..d9aefb1 100644
--- a/ios/MobileLibreOffice/MobileLibreOffice.xcodeproj/project.pbxproj
+++ b/ios/MobileLibreOffice/MobileLibreOffice.xcodeproj/project.pbxproj
@@ -950,7 +950,7 @@
                                SDKROOT = iphoneos;
                                STRIP_INSTALLED_PRODUCT = NO;
                                TARGETED_DEVICE_FAMILY = "1,2";
-                               VALID_ARCHS = armv7;
+                               VALID_ARCHS = "armv7 arm64";
                        };
                        name = Debug;
                };
@@ -995,7 +995,7 @@
                                STRIP_INSTALLED_PRODUCT = NO;
                                TARGETED_DEVICE_FAMILY = "1,2";
                                VALIDATE_PRODUCT = YES;
-                               VALID_ARCHS = armv7;
+                               VALID_ARCHS = "armv7 arm64";
                        };
                        name = Release;
                };
@@ -1076,7 +1076,7 @@
                                SDKROOT = iphoneos;
                                STRIP_INSTALLED_PRODUCT = NO;
                                TARGETED_DEVICE_FAMILY = "1,2";
-                               VALID_ARCHS = armv7;
+                               VALID_ARCHS = "armv7 arm64";
                        };
                        name = Debug_tile_tester;
                };
diff --git a/ios/experimental/LibreOffice/LibreOffice.xcodeproj/project.pbxproj 
b/ios/experimental/LibreOffice/LibreOffice.xcodeproj/project.pbxproj
index 26b1df6..c538555 100644
--- a/ios/experimental/LibreOffice/LibreOffice.xcodeproj/project.pbxproj
+++ b/ios/experimental/LibreOffice/LibreOffice.xcodeproj/project.pbxproj
@@ -441,7 +441,7 @@
                                OTHER_LDFLAGS = "-v";
                                SDKROOT = iphoneos;
                                TARGETED_DEVICE_FAMILY = 2;
-                               VALID_ARCHS = armv7;
+                               VALID_ARCHS = "armv7 arm64";
                        };
                        name = Debug;
                };
@@ -460,7 +460,7 @@
                                OTHER_LDFLAGS = "-v";
                                SDKROOT = iphoneos;
                                TARGETED_DEVICE_FAMILY = 2;
-                               VALID_ARCHS = armv7;
+                               VALID_ARCHS = "armv7 arm64";
                        };
                        name = Release;
                };
diff --git a/ios/shared/ios_sharedlo.xcodeproj/project.pbxproj 
b/ios/shared/ios_sharedlo.xcodeproj/project.pbxproj
index 2c92795..ce0e346 100644
--- a/ios/shared/ios_sharedlo.xcodeproj/project.pbxproj
+++ b/ios/shared/ios_sharedlo.xcodeproj/project.pbxproj
@@ -617,7 +617,7 @@
                                OTHER_LDFLAGS = "-ObjC";
                                PRODUCT_NAME = "$(TARGET_NAME)";
                                SKIP_INSTALL = YES;
-                               VALID_ARCHS = armv7;
+                               VALID_ARCHS = "armv7 arm64";
                        };
                        name = Debug;
                };
@@ -635,7 +635,7 @@
                                OTHER_LDFLAGS = "-ObjC";
                                PRODUCT_NAME = "$(TARGET_NAME)";
                                SKIP_INSTALL = YES;
-                               VALID_ARCHS = armv7;
+                               VALID_ARCHS = "armv7 arm64";
                        };
                        name = Release;
                };
@@ -695,7 +695,7 @@
                                OTHER_LDFLAGS = "-ObjC";
                                PRODUCT_NAME = "$(TARGET_NAME)";
                                SKIP_INSTALL = YES;
-                               VALID_ARCHS = armv7;
+                               VALID_ARCHS = "armv7 arm64";
                        };
                        name = Debug_tile_tester;
                };
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to