diff options
author | Tor Lillqvist <tml@iki.fi> | 2013-03-20 09:07:52 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2013-03-21 13:28:32 +0200 |
commit | 63dcca42cebd3cb6f020ec75c0d225e1d7232e1c (patch) | |
tree | f1b1442af9d7f6f4736ca9621389f6fcc78179e8 /desktop | |
parent | 27388c9483b5e00b593ac126092c5bbb131492b0 (diff) |
Re-work the vcl aspects of the iOS port
Don't try to use similar code as for OS X to manage windows, events
etc. I.e. don't use UIKit in vcl to do that. Instead, just do as in
the Android port, use the "headless" vcl backend. Do keep using
CoreText, though, not FreeType & fontconfig.
Start changing the iOS "Viewer" app to correspond to the Android
"desktop" app (so it should be renamed).
Work in progress since a long time, several crucial details still
missing, but committing for now.
Change-Id: Iac5fbf8def415e4d0d21e5200450a373420ad7ee
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/app/sofficemain.cxx | 12 | ||||
-rw-r--r-- | desktop/source/app/userinstall.cxx | 12 |
2 files changed, 14 insertions, 10 deletions
diff --git a/desktop/source/app/sofficemain.cxx b/desktop/source/app/sofficemain.cxx index 6bd67fb4c3e5..f1ca8027233a 100644 --- a/desktop/source/app/sofficemain.cxx +++ b/desktop/source/app/sofficemain.cxx @@ -89,16 +89,24 @@ extern "C" int DESKTOP_DLLPUBLIC soffice_main() #endif } -#ifdef ANDROID +#if defined(ANDROID) || defined(IOS) +#ifdef ANDROID extern "C" SAL_JNI_EXPORT void JNICALL Java_org_libreoffice_experimental_desktop_Desktop_runMain(JNIEnv* /* env */, jobject /* clazz */) +#else +extern "C" +void +lo_runMain() +#endif { int nRet; do { nRet = soffice_main(); - LOGI("soffice_main returned %d", nRet ); +#ifdef ANDROID + LOGI("soffice_main returned %d", nRet); +#endif } while (nRet == EXITHELPER_NORMAL_RESTART || nRet == EXITHELPER_CRASH_WITH_RESTART); // pretend to re-start. diff --git a/desktop/source/app/userinstall.cxx b/desktop/source/app/userinstall.cxx index 612a804945d6..1ae05ceaad09 100644 --- a/desktop/source/app/userinstall.cxx +++ b/desktop/source/app/userinstall.cxx @@ -116,6 +116,7 @@ namespace desktop { } } +#if !defined(ANDROID) && !defined(IOS) static osl::FileBase::RC copy_recursive( const rtl::OUString& srcUnqPath, const rtl::OUString& dstUnqPath) { FileBase::RC err; @@ -166,14 +167,9 @@ namespace desktop { err = File::copy( srcUnqPath,dstUnqPath ); } -#ifdef ANDROID - fprintf (stderr, "copy_recursive '%s' to '%s' returns (%d)0x%x\n", - rtl::OUStringToOString(srcUnqPath, RTL_TEXTENCODING_UTF8).getStr(), - rtl::OUStringToOString(dstUnqPath, RTL_TEXTENCODING_UTF8).getStr(), - (int)err, (int)err); -#endif return err; } +#endif static UserInstall::UserInstallStatus create_user_install(OUString& aUserPath) { @@ -185,12 +181,12 @@ namespace desktop { FileBase::RC rc = Directory::createPath(aUserPath); if ((rc != FileBase::E_None) && (rc != FileBase::E_EXIST)) return UserInstall::E_Creation; -#ifdef UNIX +#if defined(UNIX) && !defined(ANDROID) && !defined(IOS) // Set safer permissions for the user directory by default: File::setAttributes(aUserPath, osl_File_Attribute_OwnWrite| osl_File_Attribute_OwnRead| osl_File_Attribute_OwnExe); #endif -#ifndef ANDROID +#if !defined(ANDROID) && !defined(IOS) // as of now osl_copyFile does not work on Android => don't do this. // Copy data from shared data directory of base installation: |