Language:

The Free and Open Productivity Suite
Apache OpenOffice 4.1.4 released

XMerge Pocket Word Plugin


Overview


The Pocket Word plugin converts text data between OpenOffice Writer format and Pocket Word's binary file format.  Specifically, it has been targeted at the version of Pocket Word supplied with Windows CE 3.0 handheld devices.  The plugin has been tested with Pocket PC 2000 and Pocket PC 2002.

The following table outlines the supported features of the Pocket Word plugin:

Category Feature Supported
 Document Elements



Paragraphs
yes

Styles
no

Tables
no

Lists
yes

Images
no
Formatting


Font
no

Bold, Italic, Underline yes

Strikethrough, Highlight
yes

Colour
yes

Alignment
yes

Indentation
no


Using the Pocket Word plugin


The Pocket Word plugin is invoked in the same manner as all other XMerge plugins.   Once the framework has been made aware of the plugin, the only thing needed to use it is to specify its MIME type as a source or destination type for conversion.  The MIME type is specified in the converter.xml file included in the pocketword.jar file.  Currently, this is set to application/x-pocket-word .

For example, to use the Pocket Word plugin in conjunction with the test driver supplied with the XMerge framework:

% java org.openoffice.xmerge.test.Driver -from staroffice/sxw -to application/x-pocket-word Test.sxw

% java.org.openoffice.xmerge.test.Driver -from application/x-pocket-word -to staroffice/sxw Test.psw

Features

The plugin currently supports conversion of most of the document formatting features supported by Pocket Word (i.e. those which a user can create from scratch in Pocket Word).  The list of supported features currently includes:

  • Bold
  • Highlight
  • Italic
  • Alignments
  • Underline
  • Bulleting
  • Strikethrough
  • Colour










The following screenshots show some Writer files converted into Pocket Word documents:



Image showing formatted StarWriter file.




Pocket PC 2000 Screenshot
Pocket PC 2002 Screenshot
Pocket PC 2000
Pocket PC 2002



To Do

There are a few features of Pocket Word which are not handled by the converter.  Some of them relate to features of Pocket Word and some relate to StarOffice features which have no mapping in the Pocket Word application.

Fonts


The most significant missing feature is the use of fonts.   Files generated by Pocket Word store data about each on-screen line in a paragraph.  This data consists of the number of characters and the screen space occupied by those characters.  Calculating this from a Java based environment is no easy task.  

Initial attempts to make use of the java.awt.FontMetrics class were unsuccessful as the values returned do not correspond to values returned with similar calls on a Pocket PC device.  

Tests with the ActiveSync supplied MS Word -> Pocket Word converter show that there is some method of bypassing the requirement for these line descriptors.  That method, however, is not known.

Finally, while Pocket Word supports TrueType/OpenType fonts, it has only 4 default fonts.   As a compensatory measure the plugin could make use of the style.xml file within a Writer document to substitute similar fonts, e.g. Courier New for monospace fonts, Arial/Helvetica for sans serif fonts and Times New Roman for serif fonts.  By making use of the TrueType fonts distributed with the Java environment, cross-platform availability is assured.

Other Features

Support for a number of other features could be added.  These include:

  • Tables
  • Images
  • Page margins

Building the plugin

The Pocket Word plugin is built as part of the XMerge framework.  Its classes are stored in pocketword.jar.  See Building XMerge for more instructions.


Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache and the Apache feather logo are trademarks of The Apache Software Foundation. OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.