AAOO
AAOO – Accessibility Add-on of OpenOffice.org
Developer’s Guide
This documentation is distributed under new BSD licenses restricting.
Copyright (c) 2006, Benjamin B King
All rights reserved.
Content
How to connect to a running OpenOffice.org in this
project
How to get all te picture-resources in the odt document
How to get a property of a picture object.
How to modify a property of a picture object.
This manual describes the frameworks of the AAOO project. If you want perfect the function of AAOO, you may find some usefull information in this manual. Or, as a user, there is another manual ‘User’s Guide’ for you.
1.
The framework of this project.
2.
The main function of the project.
1) How to connect to a running OpenOffice.org in this project.
2) How to get all te picture-resources in the odt document.
3) How to get a property of a picture object.
4) How to modify a property of a picture object.
This is the first version of AAOO. It’s very simple and some function is uncompleted.
AAOO User’s Guide
It tells you how to build the environment of AAOO and how to configure the NetBeans. I very suggest you read this manual at first.
OpenOffice.org 2.0 Developer’s Guide
You can get many useful and important knowledge of UNO.
API reference of UNO and OpenOffice.org
There are 3 package in the project. They are:
aaoo.gui
The Graphic User Interface.
aaoo.core
The core level of the project, and also the bridge of aaoo.gui and aaoo.bottom.
aaoo.bottom
The bottom level of the project, it connect to the OpenOffice and operating the document via NUO API.
There are 3 main windows in the project, and there are 3 classes in the package aaoo.gui.
There are 3 main classes in this package, and cImgInfoOffer extends the class cInfoOffer.
There is 1 main class in this package at present, and it does do many many works.
Note. Reference the code aaoo.bottom.bConDoc.java. Note. Reference the book UNO Developer’s Guide. |
First, see the code come form aaoo.bootom.bConDoc.java follow:
try {
locale = new aaoo.core.cI18N(); //
bootstrap UNO and get the remote component context. The context can
// be used to get the service manager
xContext = com.sun.star.comp.helper.Bootstrap.bootstrap();
System.out.println(locale.getString("Connected"));
xMCF = xContext.getServiceManager(); xDesktop = (com.sun.star.frame.XDesktop)
UnoRuntime.queryInterface(com.sun.star.frame.XDesktop.class,
xMCF.createInstanceWithContext("com.sun.star.frame.Desktop",
xContext ) );
xCompLoader
=(com.sun.star.frame.XComponentLoader)UnoRuntime.queryInterface(
com.sun.star.frame.XComponentLoader.class, xDesktop);
xComponent1=
xDesktop.getCurrentComponent(); } catch (
java.lang.Exception e ) {
e.printStackTrace(System.err);
System.exit(1); } |
UNO (pronounced ['ju:nou]) stands for Universal Network Objects and is the base component technology for OpenOffice.org. You can utilize and write components that interact across languages, component technologies, computer platforms, and networks. Currently, UNO is available on Linux, Solaris, Windows, Power PC, FreeBSD and Mac OS X. Other ports are still being developed at OpenOffice.org. The supported programming languages are Java, C++ and OpenOffice.org Basic. As well, UNO is available through the component technology Microsoft COM for many other languages. On OpenOffice.org there is also a language binding for Python available.
With OpenOffice.org 2.0, UNO is also programmable with .NET languages using the new Common Language Infrastructure binding. In addition, the new scripting framework offers the use of the API through several scripting languages, such as Javascript, Beanshell or Jython.
You can connect to a local or remote instance of OpenOffice.org from C++, Java and COM/DCOM. C++ and Java Desktop applications, Java servlets, Java Server Pages, JScript and VBScript, and languages, such as Delphi, Visual Basic and many others can use OpenOffice.org to work with Office documents.
UNO introduces the concept of service managers, which can be considered as “factories” that create services. For now, it is sufficient to see services as UNO objects that can be used to perform specific tasks. Later on we will give a more precise definition for the term service.
The follow Illustration show how to use the desktop, which is the central management instance for the OpenOffice.org application framework. All OpenOffice.org application windows are organized in a hierarchy of frames that contain viewable components. The desktop is the root frame for this hierarchy. From the desktop you can load viewable components, access frames and components, terminate the office, traverse the frame hierarchy and dispatch command requests.
First, see the code come form aaoo.bootom.bConDoc.java follow:
xTGOS1
=(com.sun.star.text.XTextGraphicObjectsSupplier) UnoRuntime.queryInterface(com.sun.star.text.XTextGraphicObjectsSupplier.class, xComponent1);
xNAss1 =
xTGOS1.getGraphicObjects();
ENs =
xNAss1.getElementNames(); |
First, see the code come form aaoo.bootom.bConDoc.java follow:
String AttrText =
null ;
try {
xPS1 = ( com.sun.star.beans.XPropertySet)UnoRuntime.queryInterface(
com.sun.star.beans.XPropertySet.class,xNAss1.getByName(ENs[index]));
AttrText =
xPS1.getPropertyValue("AlternativeText").toString(); }
catch (java.lang.Exception ex) {
ex.printStackTrace(); } |
First, see the code come form aaoo.bootom.bConDoc.java follow:
try {
xPS1 = ( com.sun.star.beans.XPropertySet)UnoRuntime.queryInterface(
com.sun.star.beans.XPropertySet.class,xNAss1.getByName(ENs[index]));
xPS1.setPropertyValue("AlternativeText",AttrText); }
catch (java.lang.Exception ex) {
ex.printStackTrace(); } |