[Libreoffice-commits] .: 2 commits - android/qa vcl/android

Michael Meeks michael at kemper.freedesktop.org
Fri Feb 24 08:51:31 PST 2012


 android/qa/desktop/Makefile |    5 +++--
 vcl/android/androidinst.cxx |   22 +++++++++++++++++-----
 2 files changed, 20 insertions(+), 7 deletions(-)

New commits:
commit c45e87d037ca11e6d173ab57fce295c5f01d2ccc
Author: Michael Meeks <michael.meeks at suse.com>
Date:   Fri Feb 24 16:52:44 2012 +0000

    android: more libs corrections

diff --git a/android/qa/desktop/Makefile b/android/qa/desktop/Makefile
index 8c07351..490a7a8 100644
--- a/android/qa/desktop/Makefile
+++ b/android/qa/desktop/Makefile
@@ -121,7 +121,7 @@ copy-stuff: buildrcs
 		  freetype \
 		  fsstorage.uno \
 		  gcc3_uno \
-		  hypenlo \
+		  hyphenlo \
 		  i18nisolang1gcc3 \
 		  i18npaperlo \
 		  i18npool.uno \
@@ -134,7 +134,7 @@ copy-stuff: buildrcs
 		  jvmfwk \
 		  lnglo \
 		  introspection.uno \
-		  lnth \
+		  lnthlo \
 		  localebe1.uno \
 		  localedata_en \
 		  localedata_es \
@@ -170,6 +170,7 @@ copy-stuff: buildrcs
 		  xstor \
 		  \
 		  swlo \
+		  swuilo \
 		  swdlo \
 		  ); do \
 	    $(call COPY,$(OUTDIR)/lib/lib$${F}.so); \
commit b8f41e584cb876327c78e55bdfffb0424facfe41
Author: Michael Meeks <michael.meeks at suse.com>
Date:   Fri Feb 24 16:40:29 2012 +0000

    android: get basic 0-9, a-z keyinput working

diff --git a/vcl/android/androidinst.cxx b/vcl/android/androidinst.cxx
index 16a5125..94d5bbc 100644
--- a/vcl/android/androidinst.cxx
+++ b/vcl/android/androidinst.cxx
@@ -309,8 +309,6 @@ void AndroidSalInstance::RedrawWindows(ANativeWindow *pWindow)
                 pFrame->PostPaint(true);
                 BlitFrameToWindow (&aOutBuffer, pFrame->getDevice());
             }
-            else // Sucky the frame is invisible - why !?
-                fprintf (stderr, "invisible frame\n");
         }
     }
     else
@@ -435,12 +433,26 @@ int32_t AndroidSalInstance::onInputEvent (struct android_app* app, AInputEvent*
         SalKeyEvent aEvent;
         int64_t nNsTime = AKeyEvent_getEventTime(event);
 
+        // FIXME: really we need a Java wrapper app as Mozilla has that does
+        // key event translation for us, and provides -much- cleaner events.
         nEvent = (AKeyEvent_getAction(event) == AKEY_EVENT_ACTION_UP ?
                   SALEVENT_KEYUP : SALEVENT_KEYINPUT);
+        sal_uInt16 nCode = KeyToCode(event);
+        sal_uInt16 nMetaState = KeyMetaStateToCode(event);
+        if (nCode >= KEY_0 && nCode <= KEY_9)
+            aEvent.mnCharCode = '0' + nCode - KEY_0;
+        else if (nCode >= KEY_A && nCode <= KEY_Z)
+            aEvent.mnCharCode = (nMetaState & KEY_SHIFT ? 'A' : 'a') + nCode - KEY_A;
+        else if (nCode == KEY_SPACE)
+            aEvent.mnCharCode = ' ';
+        else if (nCode == KEY_COMMA)
+            aEvent.mnCharCode = ',';
+        else if (nCode == KEY_POINT)
+            aEvent.mnCharCode = '.';
+        else
+            aEvent.mnCharCode = 0;
         aEvent.mnTime = nNsTime / (1000 * 1000);
-        aEvent.mnCode = KeyToCode(event);
-        aEvent.mnCode |= KeyMetaStateToCode(event);
-        aEvent.mnCharCode = 'a'; // the unicode of it all ...
+        aEvent.mnCode = nMetaState | nCode;
         aEvent.mnRepeat = AKeyEvent_getRepeatCount(event);
 
         SalFrame *pFocus = SvpSalFrame::GetFocusFrame();


More information about the Libreoffice-commits mailing list