[Libreoffice-commits] .: 6 commits - android/Bootstrap android/qa fpicker/Module_fpicker.mk postprocess/packcomponents vcl/android
Michael Meeks
michael at kemper.freedesktop.org
Mon May 28 06:54:28 PDT 2012
android/Bootstrap/src/org/libreoffice/android/Bootstrap.java | 2
android/qa/desktop/Makefile | 40 ++++---
android/qa/desktop/fonts.conf | 1
fpicker/Module_fpicker.mk | 4
postprocess/packcomponents/makefile.mk | 4
vcl/android/androidinst.cxx | 56 ++++++++---
6 files changed, 72 insertions(+), 35 deletions(-)
New commits:
commit a59f76154afeb1610f5962da7df3de0b587da38a
Author: Michael Meeks <michael.meeks at suse.com>
Date: Mon May 28 14:47:14 2012 +0100
android: add possibility to add application specific fonts to fontconfig
diff --git a/android/qa/desktop/fonts.conf b/android/qa/desktop/fonts.conf
index 64d714c..866df8a 100644
--- a/android/qa/desktop/fonts.conf
+++ b/android/qa/desktop/fonts.conf
@@ -6,6 +6,7 @@
<!-- Font directory list -->
<dir>/system/fonts</dir>
+ <dir>/data/data/org.libreoffice.android.libo/fonts</dir>
<alias>
<family>serif</family>
commit af285be40f6d6c8c8e57d4468e86dec4c47a1524
Author: Michael Meeks <michael.meeks at suse.com>
Date: Mon May 28 14:46:22 2012 +0100
android: fix mouse click positioning, add more keymappings, fix focus.
diff --git a/vcl/android/androidinst.cxx b/vcl/android/androidinst.cxx
index 53d197c..7c0968c 100644
--- a/vcl/android/androidinst.cxx
+++ b/vcl/android/androidinst.cxx
@@ -116,6 +116,9 @@ static sal_uInt16 KeyToCode(AInputEvent *event)
MAP(DEL, DELETE);
MAP(PERIOD, POINT);
+ MAP(DPAD_UP, UP); MAP(DPAD_DOWN, DOWN);
+ MAP(DPAD_LEFT, LEFT); MAP(DPAD_RIGHT, RIGHT);
+
case AKEYCODE_BACK: // escape ?
case AKEYCODE_UNKNOWN:
case AKEYCODE_SOFT_LEFT:
@@ -124,13 +127,9 @@ static sal_uInt16 KeyToCode(AInputEvent *event)
case AKEYCODE_ENDCALL:
case AKEYCODE_STAR:
case AKEYCODE_POUND:
- case AKEYCODE_DPAD_UP:
- case AKEYCODE_DPAD_DOWN:
- case AKEYCODE_DPAD_LEFT:
- case AKEYCODE_DPAD_RIGHT:
- case AKEYCODE_DPAD_CENTER:
case AKEYCODE_VOLUME_UP:
case AKEYCODE_VOLUME_DOWN:
+ case AKEYCODE_DPAD_CENTER:
case AKEYCODE_POWER:
case AKEYCODE_CAMERA:
case AKEYCODE_CLEAR:
@@ -435,6 +434,29 @@ void AndroidSalInstance::onAppCmd (struct android_app* app, int32_t cmd)
}
}
+/*
+ * Try too hard to get a frame, in the absence of anything better to do
+ */
+SalFrame *AndroidSalInstance::getFocusFrame() const
+{
+ SalFrame *pFocus = SvpSalFrame::GetFocusFrame();
+ if (!pFocus) {
+ fprintf (stderr, "no focus frame, re-focusing first visible frame\n");
+ const std::list< SalFrame* >& rFrames( getFrames() );
+ for( std::list< SalFrame* >::const_iterator it = rFrames.begin(); it != rFrames.end(); ++it )
+ {
+ SvpSalFrame *pFrame = const_cast<SvpSalFrame*>(static_cast<const SvpSalFrame*>(*it));
+ if( pFrame->IsVisible() )
+ {
+ pFrame->GetFocus();
+ pFocus = pFrame;
+ break;
+ }
+ }
+ }
+ return pFocus;
+}
+
int32_t AndroidSalInstance::onInputEvent (struct android_app* app, AInputEvent* event)
{
bool bHandled = false;
@@ -449,11 +471,13 @@ int32_t AndroidSalInstance::onInputEvent (struct android_app* app, AInputEvent*
case AINPUT_EVENT_TYPE_KEY:
{
int32_t nAction = AKeyEvent_getAction(event);
- fprintf (stderr, "key event keycode %d '%s' %s\n",
+ fprintf (stderr, "key event keycode %d '%s' %s flags (0x%x) 0x%x\n",
AKeyEvent_getKeyCode(event),
nAction == AKEY_EVENT_ACTION_DOWN ? "down" :
nAction == AKEY_EVENT_ACTION_UP ? "up" : "multiple",
- KeyMetaStateToString(AKeyEvent_getMetaState(event)).getStr());
+ KeyMetaStateToString(AKeyEvent_getMetaState(event)).getStr(),
+ AKeyEvent_getMetaState (event),
+ AKeyEvent_getFlags (event));
// FIXME: the whole SALEVENT_KEYMODCHANGE stuff is going to be interesting
// can we really emit that ? no input method madness required though.
@@ -483,7 +507,7 @@ int32_t AndroidSalInstance::onInputEvent (struct android_app* app, AInputEvent*
aEvent.mnCode = nMetaState | nCode;
aEvent.mnRepeat = AKeyEvent_getRepeatCount(event);
- SalFrame *pFocus = SvpSalFrame::GetFocusFrame();
+ SalFrame *pFocus = getFocusFrame();
if (pFocus)
bHandled = pFocus->CallCallback( nEvent, &aEvent );
else
@@ -514,13 +538,21 @@ int32_t AndroidSalInstance::onInputEvent (struct android_app* app, AInputEvent*
// FIXME: all this filing the nEvent and aMouseEvent has to be cleaned up
nEvent = AMotionEvent_getAction(event)? SALEVENT_MOUSEBUTTONUP: SALEVENT_MOUSEBUTTONDOWN;
- aMouseEvent.mnX = AMotionEvent_getXOffset(event);
- aMouseEvent.mnY = AMotionEvent_getYOffset(event);
- aMouseEvent.mnTime = 0; // FIXME
+ if (nPoints > 0)
+ {
+ aMouseEvent.mnX = AMotionEvent_getX(event, 0);
+ aMouseEvent.mnY = AMotionEvent_getY(event, 0);
+ } else {
+ aMouseEvent.mnX = AMotionEvent_getXOffset(event);
+ aMouseEvent.mnY = AMotionEvent_getYOffset(event);
+ }
+
+ int64_t nNsTime = AMotionEvent_getEventTime(event);
+ aMouseEvent.mnTime = nNsTime / (1000 * 1000);
aMouseEvent.mnCode = 0; // FIXME
aMouseEvent.mnButton = MOUSE_LEFT; // FIXME
- SalFrame *pFocus = SvpSalFrame::GetFocusFrame();
+ SalFrame *pFocus = getFocusFrame();
if (pFocus)
bHandled = pFocus->CallCallback( nEvent, &aMouseEvent );
else
commit 35382d56f839a9e569dab995933be8fe1a60da27
Author: Michael Meeks <michael.meeks at suse.com>
Date: Mon May 28 14:45:19 2012 +0100
android: build and package the fpicker so we can select files to open
diff --git a/fpicker/Module_fpicker.mk b/fpicker/Module_fpicker.mk
index 1edc7c9..a2c0085 100644
--- a/fpicker/Module_fpicker.mk
+++ b/fpicker/Module_fpicker.mk
@@ -27,8 +27,6 @@
$(eval $(call gb_Module_Module,fpicker))
-ifneq ($(filter DESKTOP,$(BUILD_TYPE)),)
-
$(eval $(call gb_Module_add_targets,fpicker,\
AllLangResTarget_fps_office \
Library_fpicker \
@@ -50,6 +48,4 @@ $(eval $(call gb_Module_add_targets,fpicker,\
))
endif
-endif
-
# vim: set noet sw=4 ts=4:
diff --git a/postprocess/packcomponents/makefile.mk b/postprocess/packcomponents/makefile.mk
index 3ee6612..7cc0bb2 100644
--- a/postprocess/packcomponents/makefile.mk
+++ b/postprocess/packcomponents/makefile.mk
@@ -63,6 +63,8 @@ my_components = \
component/filter/source/xsltdialog/xsltdlg \
component/filter/source/xsltfilter/xsltfilter \
component/formula/util/for \
+ component/fpicker/source/generic/fpicker \
+ component/fpicker/source/office/fps_office \
component/framework/util/fwk \
component/framework/util/fwl \
component/framework/util/fwm \
@@ -169,8 +171,6 @@ my_components += \
component/extensions/source/resource/res \
component/extensions/source/scanner/scn \
component/extensions/source/update/feed/updatefeed \
- component/fpicker/source/generic/fpicker \
- component/fpicker/source/office/fps_office \
syssh \
component/xmlhelp/source/treeview/tvhlp1 \
component/xmlhelp/util/ucpchelp1 \
commit 7748fc7747eb231684770f2ef06d40811c325062
Author: Michael Meeks <michael.meeks at suse.com>
Date: Mon May 28 14:44:13 2012 +0100
android: package much more: calc, chart, embedded objects, writer
diff --git a/android/qa/desktop/Makefile b/android/qa/desktop/Makefile
index a8987e8..2253ed6 100644
--- a/android/qa/desktop/Makefile
+++ b/android/qa/desktop/Makefile
@@ -117,10 +117,13 @@ copy-stuff: buildrcs
comphelpgcc3 \
cppcanvaslo \
drawinglayerlo \
+ embobj \
expwrap.uno \
fileacc \
forlo \
foruilo \
+ fpicker.uno \
+ fps_office.uno \
fsstorage.uno \
gcc3_uno \
hyphenlo \
@@ -147,8 +150,6 @@ copy-stuff: buildrcs
reflection.uno \
reg \
saxlo \
- sclo \
- scfiltlo \
sotlo \
spelllo \
stocservices.uno \
@@ -161,6 +162,7 @@ copy-stuff: buildrcs
uno_cppuhelpergcc3 \
uno_sal \
uno_salhelpergcc3 \
+ unordflo \
unotest \
unoxmllo \
utllo \
@@ -168,17 +170,27 @@ copy-stuff: buildrcs
vcllo \
xml2 \
xmlreader \
+ xmlsecurity \
+ xslt \
xstor \
\
swlo \
swuilo \
swdlo \
+ \
+ sclo \
+ scdlo \
+ scnlo \
+ scuilo \
+ scfiltlo \
+ \
+ chartcontrollerlo \
+ chartviewlo \
+ chartmodello \
+ charttoolslo \
); do \
$(call COPY,$(OUTDIR)/lib/lib$${F}.so); \
done
-# deployment \
-# deploymentmisclo \
-# unoexceptionprotector \
#
# Then the shared GNU C++ library
@@ -211,21 +223,15 @@ copy-stuff: buildrcs
mkdir -p assets/presets/$$D ; \
echo "content" > assets/presets/$$D/stamp; \
done
-# persuade Basic to be happy
- mkdir -p assets/presets/basic/Standard
- cp $(SRC_ROOT)/wizards/source/config/dialog.xlc assets/presets/basic/
- cp $(SRC_ROOT)/wizards/source/config/script.xlc assets/presets/basic/
- cp $(SRC_ROOT)/wizards/source/standard/Module1.xba assets/presets/basic/Standard/
- cp $(SRC_ROOT)/wizards/source/standard/dialog.xlb assets/presets/basic/Standard/
- cp $(SRC_ROOT)/wizards/source/standard/script.xlb assets/presets/basic/Standard/
# shell / splash images
cp -r $(SRC_ROOT)/icon-themes/galaxy/brand/* assets/program
# Then assets that are unpacked at run-time into the app's data directory.
mkdir -p assets/unpack/etc/fonts
cp fonts.conf assets/unpack/etc/fonts
# A sample file for fun ...
- mkdir -p assets/demo
- if test -f /opt/libreoffice/tmp/writer.odt; then cp /opt/libreoffice/tmp/writer.odt assets/demo; fi
+ mkdir -p assets/unpack/files
+ if test -f /opt/libreoffice/tmp/writer.odt; then cp /opt/libreoffice/tmp/writer.odt assets/unpack/files; fi
+ if test -f /opt/libreoffice/tmp/writer.odt; then cp /opt/libreoffice/tmp/writer.odt assets/unpack/etc; fi
#
# Then gdbserver and gdb.setup so that we can debug with ndk-gdb.
#
@@ -249,7 +255,7 @@ uninstall:
run:
# echo "file:///assets/demo/writer.odt" > cmdline
# $(ANDROID_SDK_HOME)/platform-tools/adb push cmdline $(APP_DATA_PATH)/cmdline
- $(ANDROID_SDK_HOME)/platform-tools/adb shell am start -n $(APP_PACKAGE)/$(BOOTSTRAP) -e lo-strace yes -e lo-main-indirect-cmdline "$(APP_DATA_PATH)/cmdline"
+ $(ANDROID_SDK_HOME)/platform-tools/adb shell am start -n $(APP_PACKAGE)/$(BOOTSTRAP) -e lo-main-indirect-cmdline "$(APP_DATA_PATH)/cmdline"
# add -e lo-strace yes # if you want that
# If you reinstall an app several times, even if you uninstall it
commit 1a9be1b62e554b5a7ad93c92a2290c67b8d65f3b
Author: Michael Meeks <michael.meeks at suse.com>
Date: Mon May 28 14:42:54 2012 +0100
android: disable document recovery, it doesn't demo so well.
diff --git a/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java b/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java
index 12afc8c..da764ab 100644
--- a/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java
+++ b/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java
@@ -143,6 +143,7 @@ public class Bootstrap extends NativeActivity
catch (java.io.IOException e) {
i = null;
}
+ putenv("OOO_DISABLE_RECOVERY=1");
if (i != null)
putenv("FONTCONFIG_FILE=" + dataDir + "/etc/fonts/fonts.conf");
commit e363e668c7e4ead69aaad168c9f23f3e181db5fc
Author: Michael Meeks <michael.meeks at suse.com>
Date: Wed May 23 15:47:25 2012 +0100
android: make launcher function as expected - starts writer.
Remove now redundant FONTCONFIG cmdline arguments, and add fallbacks
for not having cmdline arguments in the intent when launching.
diff --git a/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java b/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java
index 6f41bf0..12afc8c 100644
--- a/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java
+++ b/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java
@@ -191,7 +191,6 @@ public class Bootstrap extends NativeActivity
while (argv.length > 0 &&
argv[0].matches("[A-Z_]+=.*")) {
putenv(argv[0]);
- argv = Arrays.copyOfRange(argv, 1, argv.length-1);
}
// argv[0] will be replaced by android_main() in lo-bootstrap.c by the
diff --git a/android/qa/desktop/Makefile b/android/qa/desktop/Makefile
index 848c18b..a8987e8 100644
--- a/android/qa/desktop/Makefile
+++ b/android/qa/desktop/Makefile
@@ -247,8 +247,10 @@ uninstall:
$(ANDROID_SDK_HOME)/platform-tools/adb uninstall $(APP_PACKAGE)
run:
- $(ANDROID_SDK_HOME)/platform-tools/adb shell am start -n $(APP_PACKAGE)/$(BOOTSTRAP) -e lo-main-library libmergedlo
-# add -e lo-strace yes # if you want some stracing action
+# echo "file:///assets/demo/writer.odt" > cmdline
+# $(ANDROID_SDK_HOME)/platform-tools/adb push cmdline $(APP_DATA_PATH)/cmdline
+ $(ANDROID_SDK_HOME)/platform-tools/adb shell am start -n $(APP_PACKAGE)/$(BOOTSTRAP) -e lo-strace yes -e lo-main-indirect-cmdline "$(APP_DATA_PATH)/cmdline"
+# add -e lo-strace yes # if you want that
# If you reinstall an app several times, even if you uninstall it
# between, disk space seems to leak that won't get recycled until you
More information about the Libreoffice-commits
mailing list