4. 依瑪貓╱楊士青
Apache OpenOffice Project
Management Committee
OOo4Kids Development Team
LibreOffice Traditional Chinese Team
Past:
OpenOffice.org Traditional Chinese
Translation Lead
OpenOffice.org application developer
Oracle/Sun freelance lecturer
5. OpenOffice History
2010
The Document Foundation
LibreOffice
1984 1999 2009 2011
StarDivision Sun Microsystems Oracle Apache Software Foundation
StarOffice OpenOffice.org OpenOffice.org Apache OpenOffice
11. LibreOffice on Android/iOS
The Document Foundation Blog,
October 14, 2011
“LibreOffice port project to Android and iOS,
based on the voluntary work of Tor Lillqvist, a
SUSE finnish developer know for having ported
GIMP to Windows. The LibreOffice Android and
iOS port has the objective of bringing the office
suite to iPads and Android tablets, and
eventually smaller devices. The user interface
work has yet to start in earnest but the bulk of
the code is compiling.”
18. 前兩年 (2010-2011) ,
我曾試著用 Web 行動應用,
把 OpenOffice 帶到行動裝置上。
In the past two years (2010-2011),
I tried demonstrating OpenOffice
onto mobile using mobile-web
applications.
19. Bringing OpenOffice onto
Mobile Devices
用 Impress 做簡報
遙控器…
For Impress, a
remote
presentation
controller…
(2010 COSCUP)
20. Bringing OpenOffice onto
Mobile Devices
用 Writer 實作簡單
的文件處理流程…
For Writer, a
simple
document
processing
system…
21. Bringing OpenOffice onto
Mobile Devices
用 Calc 做圖表報告
產生器…
For Calc, a remote
chart report
generator…
34. OpenOffice UNO API
OpenOffice Language Binding
UNO C++
API
Java
Writer Python VB.NET
Perl C#
Calc
…
OLE
Impress
CLI
COM
…
35. OpenOffice UNO API
OpenOffice Language Binding
UNO C++
API
Java
Writer Python VB.NET
Perl C#
Calc
…
OLE
Impress
CLI Almost
COM Everything!
…
36. OpenOffice UNO API
OpenOffice Language Binding
UNO Network C++
API Socket
Java
Writer Python VB.NET
Perl C#
Calc
…
OLE
Impress
CLI Almost
COM Everything!
…
37. 利用網路的 UNO API ,輕輕鬆鬆就可以
建立 Office 雲端應用…
We can easily construct cloud client
applications upon the networked
UNO API…
38. OpenOffice UNO
Client Application A
C++
OpenOffice
UNO
API
Writer
Calc
Impress
…
39. OpenOffice UNO
Client Application A
C++
OpenOffice
UNO
API
Writer Client Application B
Java
Calc
Impress
…
40. OpenOffice UNO
Client Application A
C++
OpenOffice
UNO
API
Writer Client Application B
Java
Calc
Impress
…
Client Application C
VB.NET
41. OpenOffice UNO
Client A
Server Client Application A
C++
OpenOffice
UNO
API TCP/IP
Client B
Writer Network Client Application B
Java
Calc
Impress
…
Client C
Client Application C
VB.NET
43. Mobile Web Office
Application
Server
Mobile Device
Mobile
Web Browser
Application TCP/IP
UNO Network Mobile Device
API
Browser
Writer
Calc
Impress
Mobile Device
… Browser
OpenOffice
47. 要玩 iOS ,要先有…
With iOS, you need…
A Mac ($$$)
Developer annual
license fee ($$)
Objective-C
Picture source: Tarcy O
http://www.flickr.com/photos/tracy_olson/61056391
/
49. Android is Free
每個人都可以自由開發 Android 應用。
想開發自己的程式應用,不用先付權利金。
Android is a system that everyone can
freely develop her/his own toys on it.
You don't have to pay a fee for your own
device.
50. Android is Accessible
Android is
available on
Linux/Windows/
Mac
Where I can work
on my free daily
Debian Linux
desktop PC.
51. Android is Java
OpenOffice SDK 中
正好就有官方的
Java UNO 函式庫
。
OpenOffice has
official Java UNO
libraries shipped
with OpenOffice
SDK.
52. Android is Java
其實只需要下列四個 .jar 檔。
Actually, you only need these four
OpenOffice UNO .jar libraries.
juh.jar
jurt.jar
ridl.jar
unoil.jar
57. Dalvik 無法轉換 UNO Java .jar 檔!?
Dalvik class file converter failed to
convert the UNO Java libraries!?
58. 我到處 Google 。
但是很少人做 Android UNO 應用程式,
網路上也沒有什麼討論。
I Googled everywhere.
Since few people tried to build
OpenOffice UNO application on
Android, nobody has ever discussed
this before.
60. 還好, Java .jar 檔只是 zip 壓縮檔。
Luckily, we know that Java .jar files
are simply zipped files.
61. % for f in *.jar; do /opt/android-sdk-linux/platform-tools/dx --dex $f
|| echo "failed in $f"; done; unset f
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dx.util.ExceptionWithContext: bogus byte value: 128
…
... 14 more
...while processing ACTION_DEFAULT B
...while processing com/sun/star/datatransfer/dnd/DNDConstants.class
1 error; aborting
failed in unoil.jar
%
62. 幹得好!
所以只有 unoil.jar 有問題。
Good try!
We know the problem lies within
unoil.jar now.
63. % mkdir unoil
% cd unoil
% unzip ../unoil.jar
…
% for f in `find * -name "*.class"`; do /opt/android-sdk-linux/platform-
tools/dx --dex $f || echo "failed at $f"; done; unset f
… (This takes a long time.)
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dx.util.ExceptionWithContext: bogus byte value: 128
…
Caused by: java.lang.IllegalArgumentException: bogus byte value: 128
…
... 13 more
...while processing ACTION_DEFAULT B
...while processing com/sun/star/datatransfer/dnd/DNDConstants.class
1 error; aborting
failed at com/sun/star/datatransfer/dnd/DNDConstants.class
%
64. 所以問題是在
com/sun/star/datatransfer/dnd/DNDConstants.class
屬於
com.sun.star.datatransfer.dnd.DNDConstants
So the problem lies within
com/sun/star/datatransfer/dnd/DNDConstants.class,
which belongs to
com.sun.star.datatransfer.dnd.DNDConstants.
71. Working Model
執行模型
Projecto Open
r Office
UNO
on
Androi
d
Prese
ntation
Dais PC
OpenOffic
e
in TCP/IP Mobile
Server Wireless Device
Mode
72. OpenOffice UNO
Client A
Server Client Application A
C++
OpenOffice
UNO
API TCP/IP
Client B
Writer Network Client Application B
Java
Calc
Impress
…
Client C
Client Application C
VB.NET
73. 下載程式碼
Download the Source
https://github.com/imacat/mpresent-android