diff options
author | Tor Lillqvist <tlillqvist@suse.com> | 2011-11-20 18:07:32 +0200 |
---|---|---|
committer | Tor Lillqvist <tlillqvist@suse.com> | 2011-11-20 18:12:36 +0200 |
commit | 8ec713573073baa3bb90e6a4051938d700480c03 (patch) | |
tree | d698da797219fa0c605d79e976eed528201a992c /sal | |
parent | 5d01d4e37c9e0aa5f1139eed3ea159fa5217e031 (diff) |
Use proper command line parsing for the lo-main-cmdline extra string
Diffstat (limited to 'sal')
-rw-r--r-- | sal/osl/android/src/org/libreoffice/android/Bootstrap.java | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sal/osl/android/src/org/libreoffice/android/Bootstrap.java b/sal/osl/android/src/org/libreoffice/android/Bootstrap.java index 505b72e692e4..5df072d43669 100644 --- a/sal/osl/android/src/org/libreoffice/android/Bootstrap.java +++ b/sal/osl/android/src/org/libreoffice/android/Bootstrap.java @@ -34,6 +34,8 @@ import android.content.pm.PackageManager; import android.os.Bundle; import android.util.Log; +import fi.iki.tml.CommandLine; + // We override NativeActivity so that we can get at the intent of the // activity and its extra parameters, that we use to tell us what // actual LibreOffice "program" to run. I.e. something that on desktop @@ -111,13 +113,7 @@ public class Bootstrap extends NativeActivity Log.i(TAG, String.format("cmdLine=%s", cmdLine)); - String[] argv = cmdLine.split(" "); - - // As we don't do any shell style quote handling, to enable - // having spaces in argv elements, they need to be entered as - // '~' characters which we here change into spaces... - for (int i = 0; i < argv.length; i++) - argv[i] = argv[i].replace('~', ' '); + String[] argv = CommandLine.split(cmdLine); // Load the LO "program" here and look up lo_main int loLib = dlopen(mainLibrary); |