Added: websites/staging/ooo-site/trunk/content/xml/xmerge/plugins/pexcel_formulas.html ============================================================================== --- websites/staging/ooo-site/trunk/content/xml/xmerge/plugins/pexcel_formulas.html (added) +++ websites/staging/ooo-site/trunk/content/xml/xmerge/plugins/pexcel_formulas.html Tue Nov 29 21:39:12 2011 @@ -0,0 +1,374 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<link href="/css/ooo.css" rel="stylesheet" type="text/css"> + + + + <meta http-equiv="CONTENT-TYPE" + content="text/html; charset=iso-8859-1"> + <title></title> + + <meta name="GENERATOR" content="StarOffice 6.0 (Solaris Sparc)"> + + <meta name="CREATED" content="20020912;17575800"> + + <meta name="CHANGEDBY" content="Martin Maher"> + + <meta name="CHANGED" content="20020917;12581300"> + + <style> + <!-- + @page { size: 21.59cm 27.94cm; margin-left: 3.18cm; margin-right: 3.18cm; margin-top: 2.54cm; margin-bottom: 2.54cm } + --> + </style> + + +</head> + +<body> + <div id="banner"> + <div id="bannerleft"><a alt="Apache OpenOffice.org (incubating)" href="/"> + <img id="ooo-logo alt="Apache OpenOffice.org (Incubating)" src="/images/ooo-logo.png"/></a></div> + <div id="bannerright"><a alt="Apache Incubator" href="http://incubator.apache.org"> + <img id="asf-logo" alt="Apache Incubator" src="/images/apache-incubator-logo.png"/></a></div> + <div id="bannercenter"><br/>(incubating) | The Free and Open Productivity Suite</div> + </div> + <div id="clear"></div> + + <div id="content"> + + + +<p style="margin-bottom: 0cm; text-decoration: none;"><font size="4" + style="font-size: 16pt;"><b>Supporting Formula in Pocket Excel plugin for +xMerge</b></font></p> +<p style="margin-bottom: 0cm;"><br> +</p> +<p style="margin-bottom: 0cm;"><font size="4"><b>Overview</b></font></p> +<p style="margin-bottom: 0cm;">The difficulty in supporting formula conversion +from xml in StarOffice to binary equivalents in Excel comes from the fact +that there are very basic differences between the two formats. Pocket Excel +uses obviously binary records to store formula, StarOffice uses a String. +In the case of Pocket Excel, postfix (Reverse Polish) notation is used and +in StarOffice the formula is stored infix notation. This means that we must +identify the operators and operands (as well as functions) in the formula +in order to convert from one notation to another. This process we call parsing +and in many ways is similar to what a compiler does when interpreting source +code. The next step is to convert to and from postfix notation. This can +be done in three ways using either stacks, binary trees or combinations +of both. Once this has been done all that remains is token substitution where +a String is converted to or from a series of bytes.</p> +<p style="margin-bottom: 0cm;"><br> +</p> +<p style="margin-bottom: 0cm;"><font size="4"><b>The Issues</b></font></p> +<p style="margin-bottom: 0cm;"><br> +</p> +<p style="margin-bottom: 0cm;"><b>Parsing</b></p> +<p style="margin-bottom: 0cm;">Parsing is the first operation to be performed +on any formula encountered in either Pocket Excel or StarOffice. Parsing +is the single most important aspect of formula conversion because all tokens +must be correctly identified in order for the following two steps to be successful. +The parser must be able to correctly identify operators, operands. Operands +in there simplest terms consist of either a numeric value or a cell reference. +Operators include binary operators (+,-,*,/) or unary operators(-). These +are the simplest as</p> +<p style="margin-bottom: 0cm;">the operands are easily identified. A more +complicated type of operator however is the function. These are more difficult +as they can contain any number of parameters. The parameters can be of almost +any type, numeric, cell references, cell ranges, or other functions. Consider +the following formula :-</p> +<p style="margin-bottom: 0cm;"><br> +</p> +<p style="margin-bottom: 0cm;">=SUM(AA11:AA22, 1000, C3+4, AVERAGE(D44:D55))</p> +<p style="margin-bottom: 0cm;"><br> +</p> +<p style="margin-bottom: 0cm;">This is a valid formula and the parser needs +to be able to identify each token</p> +<p style="margin-bottom: 0cm;">in order for the RPN conversion to be correctly +completed.</p> +<p style="margin-bottom: 0cm;"><br> +</p> +<p style="margin-bottom: 0cm;"><i>Pocket Excel Formula Parsing</i></p> +<p style="margin-bottom: 0cm;">In the case of pocket excel the formula must +be parsed from a series of bytes in postfix (Reverse Polish) notation to +a string in infix notation. This is not really a parser as we simply convert +the bytes to their equivalent string representations. Tokens in this way +can easily be identified and no lexical scanning is required. Postfix notation +does not have to concern itself with operator precedence or parenthesis hence +this must be taken care of during paring. For example consider the following +postfix statement </p> +<p style="margin-bottom: 0cm;"><br> +</p> +<p style="margin-bottom: 0cm;">=AB+C*</p> +<p style="margin-bottom: 0cm;"><br> +</p> +<p style="margin-bottom: 0cm;">This would be translated to infix notation +</p> +<p style="margin-bottom: 0cm;"><br> +</p> +<p style="margin-bottom: 0cm;">=A+B*C</p> +<p style="margin-bottom: 0cm;"><br> +</p> +<p style="margin-bottom: 0cm;">However because of operator precedence it +is required the we used parenthesis</p> +<p style="margin-bottom: 0cm;">to ensure that it is calculated in the right +order.</p> +<p style="margin-bottom: 0cm;"><br> +</p> +<p style="margin-bottom: 0cm;">=(A+B)*C</p> +<p style="margin-bottom: 0cm;"><br> +</p> +<p style="margin-bottom: 0cm;"><i>StarCalc Formula Parsing</i></p> +<p style="margin-bottom: 0cm;">In the case of StarOffice formula Parsing +the formula must be parsed from a String to a series of bytes. Again operators +precedence is important along with the use of parenthesis. Also the parser +must have the ability to parse nested functions and complex arguments (eg. +=A1*3-(SUM(C1:A1, D1+40, AVERAGE(D2:D5))) ).</p> +<p style="margin-bottom: 0cm;"><br> +</p> +<p style="margin-bottom: 0cm;"><br> +</p> +<p style="margin-bottom: 0cm;"><b>RPN Conversion</b></p> +<p style="margin-bottom: 0cm;">Consider the formula </p> +<p style="margin-bottom: 0cm;"><br> +</p> +<p style="margin-bottom: 0cm;">SUM(A1, A2, 3+4*SUM(B3:B9),D1)</p> +<p style="margin-bottom: 0cm;"><br> +</p> +<p style="margin-bottom: 0cm;">this notation is called infix and is the one +that is used in StarCalc. However in Pocket Excel this formula would appear +in postfix notation (also called Reverse Polish)</p> +<p style="margin-bottom: 0cm;"><br> +</p> +<p style="margin-bottom: 0cm;">A1 A2 3 4 B3:B9 SUM * + D1 SUM</p> +<p style="margin-bottom: 0cm;"><br> +</p> +<p style="margin-bottom: 0cm;">There are two ways in which postfix can be +converted from/to infix. One is to use a Binary tree and read the tree from +right to left to get postfix and from left to right to get infix. The problem +with this method is it doesn't take into account functions which can have +more than two parameters. </p> +<p style="margin-bottom: 0cm;">The other way of implementing conversion is +to use Stacks. This solves the problem of function parameters but the code +is more complex. For example in order to take into account that natural operator +precedence might be overruled by parenthesis the Stack method will need to +take into account parenthesis (possibly nested). </p> +<p style="margin-bottom: 0cm;"><br> +</p> +<p style="margin-bottom: 0cm;"><br> +</p> +<p style="margin-bottom: 0cm;"><b>Token substitution</b></p> +<p style="margin-bottom: 0cm;">Token substitution must take account of the +different ways in which data is stored in each format. For example in StarOffice +cell references are stored as Strings in the same way as they appear in the +spreadsheet (e.g. A12, C23, B4:B12). However in Pocket Excel Cell references +are stored as 0 based indexes so A1 is represented in binary as</p> +<p style="margin-bottom: 0cm;"><br> +</p> +<p style="margin-bottom: 0cm;">44 + 00 C0 + 00</p> +<p style="margin-bottom: 0cm;">Cell Ref. Row +Column (bits 0-7)</p> +<p style="margin-bottom: 0cm;"><br> +</p> +<p style="margin-bottom: 0cm;">This is just a substitution for a simple cell +reference. There are other types of cell references, cell ranges and functions. +This needs to well designed code as it will need to be expanded as additional +features are supported. Also due to the large amount of objects it is not +practical to have an object for each operator and operand. Obviously token +substitution needs to be supported in both directions.</p> +<p style="margin-bottom: 0cm;"><br> +</p> +<p style="margin-bottom: 0cm;"><br> +</p> +<p style="margin-bottom: 0cm;"><font size="4"><b>Proposed Solution</b></font></p> +<p style="margin-bottom: 0cm;"><br> +</p> +<p style="margin-bottom: 0cm;"><b>Parsing</b></p> +<p style="margin-bottom: 0cm;">We have written a top-down parser that will +be able to handle infix to postfix parsing with one addition. This addition +is handling parameters within functions. This is not a trivial addition +as there can be any number of parameters and the parameters themselves can +be any combination of cell references, cell ranges, functions or other formula. +The BNF notation for this parser is</p> +<p style="margin-bottom: 0cm;"><br> +</p> +<p style="margin-bottom: 0cm;"><i><expression> ::= <unary op> +<term> [<addop> <term>]</i></p> +<p style="margin-bottom: 0cm;"><i><term> ::= <factor> [<mulop> +factor]</i></p> +<p style="margin-bottom: 0cm;"><i><factor> ::= <integer> | +<variable> | <expression> | <function></i></p> +<p style="margin-bottom: 0cm;"><i><function> ::= <ident> [ <expression> +]</i></p> +<p style="margin-bottom: 0cm;"><br> +</p> +<p style="margin-bottom: 0cm;">Parsing from postfix to infix is made simpler +by the fact that we will be reading in a series of bytes which will give +the exact content of each token. In this case what is required is a converter +as opposed to a parser. This will generate a series of objects (see token +substitution) which are passed to the RPN converter.</p> +<p style="margin-bottom: 0cm;"><br> +</p> +<p style="margin-bottom: 0cm;"><b>RPN Conversion</b></p> +<p style="margin-bottom: 0cm;">In order to overcome the problem with Binary +trees and function parameters we have decided to write a Stack implementation. +This means the code to implement this is more complicated but is flexible +enough to handle most formula.</p> +<p style="margin-bottom: 0cm;"><br> +</p> +<p style="margin-bottom: 0cm;"><i>From Infix to Postfix</i></p> +<p style="margin-bottom: 0cm;">In this case we push operators on to a Stack. +When we come across an operator we check for precedence with the next operand +and if it is greater we also push this onto the stack.</p> +<p style="margin-bottom: 0cm;"><br> +</p> +<p style="margin-bottom: 0cm;">=A1+SUM(3*B1+4, C1)</p> +<p style="margin-bottom: 0cm;"><br> +</p> +<ul> + <li> + <p style="margin-bottom: 0cm;">First token is A1 which we put into our +output string</p> + </li> + <li> + <p style="margin-bottom: 0cm;">the next token is + which we push on +the stack</p> + </li> + <li> + <p style="margin-bottom: 0cm;">The next token is the function SUM with +two arguments which again is an operator which we put on the stack</p> + </li> + <li> + <p style="margin-bottom: 0cm;">Next is 3 which as an operand we put +in the output string </p> + </li> + <li> + <p style="margin-bottom: 0cm;">Next is * which goes on the stack</p> + </li> + <li> + <p style="margin-bottom: 0cm;">B1 is an operand we put in the output +string </p> + </li> + <li> + <p style="margin-bottom: 0cm;">+ but this has less precedence so we +pop * off the stack into the output string and + goes on the stack</p> + </li> + <li> + <p style="margin-bottom: 0cm;">4 operand in the output strings</p> + </li> +</ul> +<p style="margin-bottom: 0cm;"><br> +</p> +<p style="margin-bottom: 0cm;"><i>From Postfix to Infix</i></p> +<p style="margin-bottom: 0cm;">From postfix to infix we again use stack. +In this case however we use it as a temporary storage space for operands. +We push operands onto the stack and when we come across a operator we pop +the operands off the stack and use them as operands for that operator. If +the completed statement is a parameter to a function it needs to be pushed +back onto the stack and the remainder of the function parsed.</p> +<p style="margin-bottom: 0cm;"><br> +</p> +<p style="margin-bottom: 0cm;">=A1 A2 3 4 B3:B9 SUM * + D1 SUM 3 +</p> +<p style="margin-bottom: 0cm;"><br> +</p> +<ul> + <li> + <p style="margin-bottom: 0cm;">First token A1 is an operand it goes +on the stack</p> + </li> + <li> + <p style="margin-bottom: 0cm;">next is A2 again on the stack</p> + </li> + <li> + <p style="margin-bottom: 0cm;">next is 3 again on the stack</p> + </li> + <li> + <p style="margin-bottom: 0cm;">next is 4 again on the stack</p> + </li> + <li> + <p style="margin-bottom: 0cm;">next is B3:B9 again on the stack</p> + </li> + <li> + <p style="margin-bottom: 0cm;">next is SUM with 1 argument so pop one +operand off the stack B3:B9 and insert it into the SUM function</p> + </li> + <li> + <p style="margin-bottom: 0cm;">The next is a * operator so we prepend +that to the SUM statement and pop another operand 4 off the stack</p> + </li> + <li> + <p style="margin-bottom: 0cm;">The next is a + operator so we prepend +that to the SUM statement and pop another operand 3 off the stack</p> + </li> + <li> + <p style="margin-bottom: 0cm;">The next is another operand so know that +parameter is finished so we push it onto the stack and then push D1 onto +the stack as well.</p> + </li> + <li> + <p style="margin-bottom: 0cm;">The next is SUM with 3 arguments so we +pop 3 arguments of the stack</p> + </li> + <li> + <p style="margin-bottom: 0cm;">The next is an operand so we know to +push the statement completed in the last step needs to be pushed onto the +stack and then we push on 3 as well</p> + </li> + <li> + <p style="margin-bottom: 0cm;">the last token is a plus so we end up +with</p> + </li> +</ul> +<p style="margin-bottom: 0cm;"><br> +</p> +<p style="margin-bottom: 0cm;">=SUM(A1, A2, 3+4*SUM(BS:B9), D1)+3</p> +<p style="margin-bottom: 0cm;"> </p> +<p style="margin-bottom: 0cm;"><br> +</p> +<p style="margin-bottom: 0cm;"><b>Token Substitution</b></p> +<p style="margin-bottom: 0cm;">The best solution is to use generic objects +for tokens. We will have two basic object classes. One called OperatorToken +and one called OperandToken. Each of these will have a value variable as +well as type. The type will describe forms of an operator or operand e.g. ++ , A1, SUM(). The parser will parse a string or a series of bytes into a +Vector of these objects which will be used by the RPN converter to convert +to or from postfix notation. These classes will be derived from a Token interface +to facilitate this. </p> +<p style="margin-bottom: 0cm;">We will also have to describe a Constants +interface to describe the various hex codes that exist for each object. One +area we have not decided what to do yet is converting to or from bytes. Obviously +we need a separate one for each operator but it is not practical to have +one object for each operator.</p> +<p style="margin-bottom: 0cm;"><br> +</p> +<br> + + + </div> + + <div id="footera"> + <div id="poweredbya"> + <p><img src="/images/feather-small.gif"/><br/>Powered by the Apache CMS.</p> + </div> + <div id="copyrighta"> + <p> + Apache "OpenOffice.org" is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. + Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and + decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is + not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has + yet to be fully endorsed by the ASF.</p> + <p> + <a href="/contact.html">Contact Us</a> | + <a href="/terms.html">Terms of Use</a> + <br />Apache and the Apache feather logos are trademarks of The Apache Software Foundation. + <br />OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. + <br />Other names appearing on the site may be trademarks of their respective owners. + </p> + </div> + </div> + +</body> +</html>
Added: websites/staging/ooo-site/trunk/content/xml/xmerge/plugins/pocketexcel.html ============================================================================== --- websites/staging/ooo-site/trunk/content/xml/xmerge/plugins/pocketexcel.html (added) +++ websites/staging/ooo-site/trunk/content/xml/xmerge/plugins/pocketexcel.html Tue Nov 29 21:39:12 2011 @@ -0,0 +1,248 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<link href="/css/ooo.css" rel="stylesheet" type="text/css"> + + + <title>XMerge Pocket Word Plugin</title> + <meta http-equiv="content-type" + content="text/html; charset=ISO-8859-1"> + + +</head> + +<body> + <div id="banner"> + <div id="bannerleft"><a alt="Apache OpenOffice.org (incubating)" href="/"> + <img id="ooo-logo alt="Apache OpenOffice.org (Incubating)" src="/images/ooo-logo.png"/></a></div> + <div id="bannerright"><a alt="Apache Incubator" href="http://incubator.apache.org"> + <img id="asf-logo" alt="Apache Incubator" src="/images/apache-incubator-logo.png"/></a></div> + <div id="bannercenter"><br/>(incubating) | The Free and Open Productivity Suite</div> + </div> + <div id="clear"></div> + + <div id="content"> + + + +<h1>XMerge Pocket Excel Plugin</h1> +<br> +<h2>Overview</h2> +The Pocket Excel plugin converts between OpenOffice StarCalc XML format +and Pocket Excel's binary file format. It currently supports +reading and writing of files in Pocket Excel format 2.0. A <a + href="http://xml.openoffice.org/xmerge/xmerge_src.zip">zipfile</a> +containing the complete source is available. If you just want to browse +the source online it is available <a + href="http://xml.openoffice.org/source/browse/xml/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/"> +here.</a><br> +<br> +<h2>Using the Pocket Excel plugin</h2> +<br> +The Pocket Excel 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 <code>converter.xml</code> file included in the<code> +pexcel.jar</code> file. Currently, this is set to <code>application/x-pocket-excel</code> +.<br> +<br> +For example, to use the Pocket Excel plugin in conjunction with the +test driver supplied with the XMerge framework:<br> +<br> +<blockquote> + <pre>% java org.openoffice.xmerge.test.Driver -from staroffice/sxc -to x-application/x-pocket-excel Test.sxc<br><br>% java.org.openoffice.xmerge.test.Driver -from application/x-pocket-excel -to staroffice/sxc Test.pxl<br></pre> +</blockquote> +<div align="left"><br> +<h2>Features</h2> +In addition to basic text and number conversion there are two main +categories of features supported in this converter. Below is a simple +table outlining the two categories and the features they support.<br> +<br> +<pre style="font-style: italic;">Summary of Supported Features</pre> +<span style="font-style: italic;"></span> +<table cellpadding="4" cellspacing="1" bgcolor="#f0f0f0" width="50%"> + <tbody> + <tr align="center"> + <th bgcolor="#00315a"><font color="#ffffff" + face="Arial, Helvetica" size="2"><b>Category</b></font></th> + <th bgcolor="#00315a"><font color="#ffffff" + face="Arial, Helvetica" size="2"><b>Features Supported<br> + </b></font></th> + </tr> + <tr> + <td valign="top" bgcolor="#99ccff" align="center"><font + color="#00315a" face="Arial, Helvetica" size="2"><b>Formula</b></font> </td> + <td valign="top" bgcolor="#99ccff"><br> + </td> + </tr> + <tr> + <td valign="top"><br> + </td> + <td valign="top"><font face="Arial, Helvetica" size="2">Cell +References<br> + </font> </td> + </tr> + <tr> + <td valign="top"><br> + </td> + <td valign="top"><font face="Arial, Helvetica" size="2">Add/Sub/Multiply/Divide<br> + </font> </td> + </tr> + <tr> + <td valign="top"><br> + </td> + <td valign="top"><font face="Arial, Helvetica" size="2">Integers ++ Floating Points<br> + </font> </td> + </tr> + <tr> + <td valign="top"><br> + </td> + <td valign="top"><font face="Arial, Helvetica" size="2">Functions<br> + </font> </td> + </tr> + <tr> + <td valign="top"><br> + </td> + <td valign="top"><font face="Arial, Helvetica" size="2">Name +Definitions<br> + </font></td> + </tr> + <tr> + <td valign="top" bgcolor="#99ccff" align="center"><font + color="#00315a" face="Arial, Helvetica" size="2"><b>Formatting</b></font> </td> + <td valign="top" bgcolor="#99ccff"><br> + </td> + </tr> + <tr> + <td valign="top"><br> + </td> + <td valign="top"><font face="Arial, Helvetica" size="2">Font<br> + </font> </td> + </tr> + <tr> + <td valign="top"><br> + </td> + <td valign="top"><font face="Arial, Helvetica" size="2">Bold, +Italic, Underline</font></td> + </tr> + <tr> + <td valign="top"><br> + </td> + <td valign="top"><font face="Arial, Helvetica" size="2">Colour<br> + </font> </td> + </tr> + <tr> + <td valign="top"><br> + </td> + <td valign="top"><font face="Arial, Helvetica" size="2">Alignment +(Horizontal & Vertical)<br> + </font> </td> + </tr> + </tbody> +</table> +<div style="text-align: left;"> +<pre><span style="font-style: italic;"></span></pre> +</div> +The first is formula features. In Pocket Excel like most other +spreadsheet applications any cell that starts with an "=" is considered +to be a formula. This formula is made up of operands and operators. In +addition to simple operators (such as addition, +subtraction,multiplication and division) this converter also supports +the 140 function operators available in pocket excel. StarCalc has of +course many more functions than this but in the case where a sxc +document has functions not supported in pocket excel the cell containing +them is converted to an error cell in the pocket excel document. +Operand support includes numbers, cell references (absolute, relative, +3D and cell ranges) and name definitions.<br> +<br> +The second set of features supported in this converter relate to cell +formatting. All the basic formatting is supported in this converter. The +following is a list of these features<br> +<ul> + <li>Bold, Italic and Underline,</li> + <li>Colour (background and foreground)</li> + <li>Alignment (Horizontal & Vertical)</li> + <li>Font</li> + <li>Row and Column Width</li> + <li>Borders</li> + <li>Windows freezes and Splits</li> +</ul> +<br> +<h2>ScreenShots</h2> +Below are some screenshots to highlight the conversion capability of +this filter. <br> +<br> +<pre style="font-style: italic;">StarCalc view of a spreadsheet</pre> +<img style="width: 861px; height: 442px;" alt="" title="" + src="images/formula_sxc.jpg"><br> +<br> +<br> +<pre style="font-style: italic;">Pocket Excel view of the converted file</pre> +<div align="center"> +<div align="left"> <img src="images/formula_pxl.jpg" title="" alt="" + style="width: 352px; height: 496px;"><br> +</div> +<div align="left"> +<h2><a name="To_Do"></a>To Do</h2> +I would divide this ToDo list into two categories. The first would be +features which are already support but could be done better. These I +think should include.<br> +<br> +<ul> + <li> Handling of unsupported functions</li> +</ul> +<br> +The second area are features that are not yet implemented<br> +<br> +<ul> + <li> Number Formatting</li> + <li>Merge cells<br> + </li> +</ul> +<ul> +</ul> +<h2>Building the plugin</h2> +The Pocket Excel plugin is built as part of the XMerge framework. + Its classes are stored in <code>pexcel.jar</code>. See <a + href="../index.html#build"> Building XMerge</a> for more instructions.<br> +</div> +</div> +</div> +<!-- end footer --> <br> +<br> +<br> +<br> +<br> +<br> +<br> +<br> +<br> + + + </div> + + <div id="footera"> + <div id="poweredbya"> + <p><img src="/images/feather-small.gif"/><br/>Powered by the Apache CMS.</p> + </div> + <div id="copyrighta"> + <p> + Apache "OpenOffice.org" is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. + Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and + decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is + not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has + yet to be fully endorsed by the ASF.</p> + <p> + <a href="/contact.html">Contact Us</a> | + <a href="/terms.html">Terms of Use</a> + <br />Apache and the Apache feather logos are trademarks of The Apache Software Foundation. + <br />OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. + <br />Other names appearing on the site may be trademarks of their respective owners. + </p> + </div> + </div> + +</body> +</html> Added: websites/staging/ooo-site/trunk/content/xml/xmerge/plugins/pocketword.html ============================================================================== --- websites/staging/ooo-site/trunk/content/xml/xmerge/plugins/pocketword.html (added) +++ websites/staging/ooo-site/trunk/content/xml/xmerge/plugins/pocketword.html Tue Nov 29 21:39:12 2011 @@ -0,0 +1,417 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<link href="/css/ooo.css" rel="stylesheet" type="text/css"> + + + <title>XMerge Pocket Word Plugin</title> + + <meta http-equiv="content-type" + content="text/html; charset=ISO-8859-1"> + + +</head> + +<body> + <div id="banner"> + <div id="bannerleft"><a alt="Apache OpenOffice.org (incubating)" href="/"> + <img id="ooo-logo alt="Apache OpenOffice.org (Incubating)" src="/images/ooo-logo.png"/></a></div> + <div id="bannerright"><a alt="Apache Incubator" href="http://incubator.apache.org"> + <img id="asf-logo" alt="Apache Incubator" src="/images/apache-incubator-logo.png"/></a></div> + <div id="bannercenter"><br/>(incubating) | The Free and Open Productivity Suite</div> + </div> + <div id="clear"></div> + + <div id="content"> + + + + +<h1>XMerge Pocket Word Plugin</h1> + <br> + +<h2>Overview</h2> + <br> + 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.<br> + <br> +The following table outlines the supported features of the Pocket Word plugin:<br> +<br> +<table cellpadding="4" cellspacing="1" bgcolor="#f0f0f0" width="50%"> + <tbody> + <tr align="center"> + <th bgcolor="#00315a"><font color="#ffffff" + face="Arial, Helvetica" size="2"><b>Category</b></font></th> + <th bgcolor="#00315a"><font color="#ffffff" + face="Arial, Helvetica" size="2"><b>Feature</b></font></th> + <th bgcolor="#00315a" width="20%"><font color="#ffffff" + face="Arial, Helvetica" size="2"><b>Supported</b></font></th> + </tr> + <tr> + <td valign="top" bgcolor="#99ccff" align="center"> <font + color="#00315a" face="Arial, Helvetica" size="2"><b>Document Elements</b></font><br> + </td> + <td valign="top" bgcolor="#99ccff"><br> + </td> + <td width="20%" valign="top" bgcolor="#99ccff"><br> + </td> + </tr> + <tr> + <td valign="top"><br> + </td> + <td valign="top"><font face="Arial, Helvetica" size="2">Paragraphs<br> + </font> </td> + <td width="20%" valign="top"><font face="Arial, Helvetica" + size="2">yes<br> + </font> </td> + </tr> + <tr> + <td valign="top"><br> + </td> + <td valign="top"><font face="Arial, Helvetica" size="2">Styles<br> + </font> </td> + <td width="20%" valign="top"><font face="Arial, Helvetica" + size="2">no<br> + </font> </td> + </tr> + <tr> + <td valign="top"><br> + </td> + <td valign="top"><font face="Arial, Helvetica" size="2">Tables<br> + </font> </td> + <td width="20%" valign="top"><font face="Arial, Helvetica" + size="2">no<br> + </font> </td> + </tr> + <tr> + <td valign="top"><br> + </td> + <td valign="top"><font face="Arial, Helvetica" size="2">Lists<br> + </font> </td> + <td width="20%" valign="top"><font face="Arial, Helvetica" + size="2">yes<br> + </font> </td> + </tr> + <tr> + <td valign="top"><br> + </td> + <td valign="top"><font face="Arial, Helvetica" size="2">Images</font><br> + </td> + <td valign="top"><font face="Arial, Helvetica" size="2">no</font><br> + </td> + </tr> + <tr> + <td valign="top" bgcolor="#99ccff" align="center"><font + color="#00315a" face="Arial, Helvetica" size="2"><b>Formatting</b></font> + </td> + <td valign="top" bgcolor="#99ccff"><br> + </td> + <td width="20%" valign="top" bgcolor="#99ccff"><br> + </td> + </tr> + <tr> + <td valign="top"><br> + </td> + <td valign="top"><font face="Arial, Helvetica" size="2">Font<br> + </font> </td> + <td width="20%" valign="top"><font face="Arial, Helvetica" + size="2">no<br> + </font> </td> + </tr> + <tr> + <td valign="top"><br> + </td> + <td valign="top"><font face="Arial, Helvetica" size="2">Bold, Italic, +Underline</font></td> + <td width="20%" valign="top"><font face="Arial, Helvetica" + size="2">yes<br> + </font> </td> + </tr> + <tr> + <td valign="top"><br> + </td> + <td valign="top"><font face="Arial, Helvetica" size="2">Strikethrough, +Highlight</font><br> + </td> + <td valign="top"><font face="Arial, Helvetica" size="2">yes</font><br> + </td> + </tr> + <tr> + <td valign="top"><br> + </td> + <td valign="top"><font face="Arial, Helvetica" size="2">Colour<br> + </font> </td> + <td width="20%" valign="top"><font face="Arial, Helvetica" + size="2">yes<br> + </font> </td> + </tr> + <tr> + <td valign="top"><br> + </td> + <td valign="top"><font face="Arial, Helvetica" size="2">Alignment<br> + </font> </td> + <td width="20%" valign="top"><font face="Arial, Helvetica" + size="2">yes</font></td> + </tr> + <tr> + <td valign="top"><br> + </td> + <td valign="top"><font face="Arial, Helvetica" size="2">Indentation</font><br> + </td> + <td valign="top"><font face="Arial, Helvetica" size="2">no</font><br> + </td> + </tr> + </tbody> +</table> +<br> +<br> + +<h2>Using the Pocket Word plugin</h2> + <br> + 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 <code>converter.xml</code> file included in the <code>pocketword.jar</code> + file. Currently, this is set to <code>application/x-pocket-word</code> + .<br> + <br> + For example, to use the Pocket Word plugin in conjunction with the + test driver supplied with the XMerge framework:<br> + <br> + +<blockquote> + <pre>% java org.openoffice.xmerge.test.Driver -from staroffice/sxw -to application/x-pocket-word Test.sxw<br><br>% java.org.openoffice.xmerge.test.Driver -from application/x-pocket-word -to staroffice/sxw Test.psw<br></pre> + </blockquote> + +<div align="left"><br> + +<h2>Features</h2> + 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:<br> + <br> + +<table cellpadding="2" cellspacing="2" border="0" width="95%" + align="right"> + <tbody> + <tr> + <td valign="top"> + + <ul> + <li>Bold<br> + </li> + + </ul> + </td> + <td valign="top"> + + <ul> + <li>Highlight<br> + </li> + + </ul> + </td> + </tr> + <tr> + <td valign="top"> + + <ul> + <li>Italic<br> + </li> + + </ul> + </td> + <td valign="top"> + + <ul> + <li>Alignments<br> + </li> + + </ul> + </td> + </tr> + <tr> + <td valign="top"> + + <ul> + <li>Underline<br> + </li> + + </ul> + </td> + <td valign="top"> + + <ul> + <li>Bulleting <br> + </li> + + </ul> + </td> + </tr> + <tr> + <td valign="top"> + + <ul> + <li>Strikethrough<br> + </li> + + </ul> + </td> + <td valign="top"> + + <ul> + <li>Colour<br> + </li> + + </ul> + </td> + </tr> + + </tbody> +</table> + +<blockquote><br> + </blockquote> + <br> + <br> + <br> + <br> + <br> + <br> + <br> + <br> + <br> + The following screenshots show some Writer files converted into Pocket + Word documents:<br> + <br> + <br> + <br> + +<div align="center"><img src="images/conversion-sxw.jpg" + alt="Image showing formatted StarWriter file." width="801" height="426" + border="1"> + <br> + <br> + <br> + +<div align="left"><br> + <br> + +<table cellpadding="2" cellspacing="2" border="0" width="100%"> + <tbody> + <tr> + <td valign="top" align="center"><img + src="images/conversion-ppc2k.jpg" alt="Pocket PC 2000 Screenshot" + width="240" height="320" border="1"> + <br> + </td> + <td valign="top" align="center"><img + src="images/conversion-ppc2002.jpg" alt="Pocket PC 2002 Screenshot" + width="240" height="320" border="1"> + <br> + </td> + </tr> + <tr> + <td valign="top" align="center"><i>Pocket PC 2000</i><br> + </td> + <td valign="top" align="center"><i>Pocket PC 2002</i><br> + </td> + </tr> + + </tbody> +</table> + <br> + <br> + <br> + </div> + +<div align="left"> +<h2>To Do</h2> + 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.<br> + <br> + +<h3>Fonts<br> + </h3> + <br> + 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. <br> + <br> + Initial attempts to make use of the <code>java.awt.FontMetrics</code> + class were unsuccessful as the values returned do not correspond to values + returned with similar calls on a Pocket PC device. <br> + <br> + 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.<br> + <br> + 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 <code>style.xml</code> file within a Writer document to substitute + similar fonts, e.g. <i>Courier New</i> for monospace fonts, <i>Arial/Helvetica</i> + for sans serif fonts and <i>Times New Roman</i> for serif fonts. By + making use of the TrueType fonts distributed with the Java environment, +cross-platform availability is assured.<br> + <br> + +<h3>Other Features</h3> + Support for a number of other features could be added. These +include:<br> + <br> + +<ul> + <li>Tables</li> + <li>Images</li> + <li>Page margins</li> + +</ul> + <br> + +<h2>Building the plugin</h2> + The Pocket Word plugin is built as part of the XMerge framework. Its + classes are stored in <code>pocketword.jar</code>. See <a + href="../index.html#build">Building XMerge</a> for more instructions.<br> + </div> + +<div align="left"><br> + </div> + </div> + </div> + <br> + + + </div> + + <div id="footera"> + <div id="poweredbya"> + <p><img src="/images/feather-small.gif"/><br/>Powered by the Apache CMS.</p> + </div> + <div id="copyrighta"> + <p> + Apache "OpenOffice.org" is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. + Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and + decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is + not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has + yet to be fully endorsed by the ASF.</p> + <p> + <a href="/contact.html">Contact Us</a> | + <a href="/terms.html">Terms of Use</a> + <br />Apache and the Apache feather logos are trademarks of The Apache Software Foundation. + <br />OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. + <br />Other names appearing on the site may be trademarks of their respective owners. + </p> + </div> + </div> + +</body> +</html> Added: websites/staging/ooo-site/trunk/content/xml/xmerge/smalldeviceWin.zip ============================================================================== Binary file - no diff available. Propchange: websites/staging/ooo-site/trunk/content/xml/xmerge/smalldeviceWin.zip ------------------------------------------------------------------------------ svn:executable = * Propchange: websites/staging/ooo-site/trunk/content/xml/xmerge/smalldeviceWin.zip ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: websites/staging/ooo-site/trunk/content/xml/xmerge/starlite.html ============================================================================== --- websites/staging/ooo-site/trunk/content/xml/xmerge/starlite.html (added) +++ websites/staging/ooo-site/trunk/content/xml/xmerge/starlite.html Tue Nov 29 21:39:12 2011 @@ -0,0 +1,292 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<link href="/css/ooo.css" rel="stylesheet" type="text/css"> + + + <link rel="stylesheet" type="text/css" href="xmloff.css" + media="screen"> + +<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8"> + + +</head> + +<body> + <div id="banner"> + <div id="bannerleft"><a alt="Apache OpenOffice.org (incubating)" href="/"> + <img id="ooo-logo alt="Apache OpenOffice.org (Incubating)" src="/images/ooo-logo.png"/></a></div> + <div id="bannerright"><a alt="Apache Incubator" href="http://incubator.apache.org"> + <img id="asf-logo" alt="Apache Incubator" src="/images/apache-incubator-logo.png"/></a></div> + <div id="bannercenter"><br/>(incubating) | The Free and Open Productivity Suite</div> + </div> + <div id="clear"></div> + + <div id="content"> + + + +<h1>Background of XMerge<br> +</h1> +<!-- no current top news! +<h2><strong>Top News</str +ong>: <a href="xml_specification_draft.pdf">XML File Format Specification Updated</a></h2> +--> +<p>Xmerge came out of project Starlite. The goal of Starlite was to +provide mobility to StarOffice documents. The Starlite +team developed +spreadsheet and document viewer applications with limited editing +capabilities for PalmOS. These applications were designed to +synchronize with the StarWriter and StarCalc applications on the +desktop. <br> +</p> +<p>Project ZenSync was the second phase of project Starlite to expand +the +synchronization capabilities to work with an expanded set of +small-device applications. </p> +<table cellpadding="4" cellspacing="1" + style="background-color: rgb(255, 255, 255); width: 400px;"> + <tbody> + <tr> + <td colspan="2" + style="background-color: rgb(0, 49, 90); text-align: center; width: 150px;"><font + color="#ffffff" face="arial, helvetica" size="2"><b>StarLite Team<br> + </b></font></td> + </tr> + <tr> + <th bgcolor="#99ccff" align="center" style="width: 150px;"><font + color="#00315a" face="arial, helvetica" size="2"><b> Name</b></font><br> + </th> + <th bgcolor="#99ccff" align="center"><font color="#00315a" + face="arial, helvetica" size="2"><b>Function</b></font></th> + </tr> + <tr> + <td valign="top" + style="width: 150px; background-color: rgb(240, 240, 240);">Akhil Arora</td> + <td valign="top" style="background-color: rgb(240, 240, 240);">Tech +Lead<br> + </td> + </tr> + <tr> + <td + style="vertical-align: top; width: 150px; background-color: rgb(240, 240, 240);">Eileen +Bugee</td> + <td + style="vertical-align: top; background-color: rgb(240, 240, 240);">Visual +designer</td> + </tr> + <tr> + <td valign="top" + style="width: 150px; background-color: rgb(240, 240, 240);">Eric +Bergman</td> + <td valign="top" style="background-color: rgb(240, 240, 240);">Human +factors design</td> + </tr> + <tr> + <td valign="top" + style="width: 150px; background-color: rgb(240, 240, 240);">David +Proulx</td> + <td valign="top" style="background-color: rgb(240, 240, 240);">StarWriter +for PalmOS</td> + </tr> + <tr> + <td + style="vertical-align: top; width: 150px; background-color: rgb(240, 240, 240);">Herbie +Ong</td> + <td + style="vertical-align: top; background-color: rgb(240, 240, 240);">Converters +for StarWriter</td> + </tr> + <tr> + <td + style="vertical-align: top; width: 150px; background-color: rgb(240, 240, 240);">Paul +Rank<br> + </td> + <td + style="vertical-align: top; background-color: rgb(240, 240, 240);">StarCalc +for PalmOS</td> + </tr> + <tr> + <td + style="vertical-align: top; width: 150px; background-color: rgb(240, 240, 240);">Raju +Pallath<br> + </td> + <td + style="vertical-align: top; background-color: rgb(240, 240, 240);">Quality</td> + </tr> + <tr> + <td + style="vertical-align: top; width: 150px; background-color: rgb(240, 240, 240);">Stephen +Mak<br> + </td> + <td + style="vertical-align: top; background-color: rgb(240, 240, 240);">Converters +for StarCalc</td> + </tr> + <tr> + <td + style="vertical-align: top; width: 150px; background-color: rgb(240, 240, 240);">Denis +Sharypov<br> + </td> + <td + style="vertical-align: top; background-color: rgb(240, 240, 240);">StarCalc +for PalmOS<br> + </td> + </tr> + <tr> + <td + style="vertical-align: top; width: 150px; background-color: rgb(240, 240, 240);">Maline +Minasandram<br> + </td> + <td + style="vertical-align: top; background-color: rgb(240, 240, 240);">Manager<br> + </td> + </tr> +<!-- +<tr> +<td bgcolor="#f0f0f0" valign="top"><a href="...">...</a></td> +<td bgcolor="#f0f0f0" valign="top">...</td> +<td bgcolor="#f0f0f0" valign="top">...</td> +</tr> +--> + </tbody> +</table> +<br> +At this point the project was transfered to Dublin, Ireland. The first +step was to refactor the code so that filters could be written not just +for palm devices but any device. This included writing a registry for +xmerge so that it could keep track of which filters were included and +what formats they could convert to/from. Next, filters for Pocket Excel +and Pocket Word were written. Once this was completed an Active Sync +conduit was written so that XMerge could be used to convert Pocket PC +files on a handheld to StarOffice files on a PC automatically through +ActiveSync. The decision was then taken to open source the project and +make it available on OpenOffice. This involved hosting the code on +OpenOffice CVS, adding the web pages and writing the documentation for +filter writers. Once hosted on the website a FlatXML and DocBook filter +were added. The final step in the project was to include XMerge in +StarOffice. <br> +<br> +<table cellpadding="4" cellspacing="1" + style="background-color: rgb(255, 255, 255); width: 550px;"> + <tbody> + <tr> + <td colspan="2" bgcolor="#00315a" align="center" + style="width: 150px;"><font color="#ffffff" face="arial, helvetica" + size="2"><b>XMerge Team<br> + </b></font></td> + </tr> + <tr> + <th bgcolor="#99ccff" align="center" style="width: 150px;"><font + color="#00315a" face="arial, helvetica" size="2"><b> Name</b></font><br> + </th> + <th bgcolor="#99ccff" align="center"><font color="#00315a" + face="arial, helvetica" size="2"><b>Function</b></font></th> + </tr> + <tr> + <td valign="top" + style="width: 150px; background-color: rgb(240, 240, 240);">Brian +Cameron<br> + </td> + <td valign="top" style="background-color: rgb(240, 240, 240);">Tech +Lead<br> + </td> + </tr> + <tr> + <td + style="vertical-align: top; width: 150px; background-color: rgb(240, 240, 240);">Aidan +Butler<br> + </td> + <td + style="vertical-align: top; background-color: rgb(240, 240, 240);">FlatXML +& Docbook filter, Integration into StarOffice</td> + </tr> + <tr> + <td valign="top" + style="width: 150px; background-color: rgb(240, 240, 240);">Mike Hayes<br> + </td> + <td valign="top" style="background-color: rgb(240, 240, 240);">Code +design work, Code refactoring, Pocket Excel filter</td> + </tr> + <tr> + <td valign="top" + style="width: 150px; background-color: rgb(240, 240, 240);">Darren +Kenny<br> + </td> + <td valign="top" style="background-color: rgb(240, 240, 240);">Code +design work, OpenOffice web hosting</td> + </tr> + <tr> + <td + style="vertical-align: top; width: 150px; background-color: rgb(240, 240, 240);">Martin +Maher<br> + </td> + <td + style="vertical-align: top; background-color: rgb(240, 240, 240);">Pocket +Excel filter, Code refactoring</td> + </tr> + <tr> + <td + style="vertical-align: top; width: 150px; background-color: rgb(240, 240, 240);">Mark +Murnane<br> + </td> + <td + style="vertical-align: top; background-color: rgb(240, 240, 240);">Pocket +Word filter, ActiveSync, Integration into StarOffice</td> + </tr> + <tr> + <td + style="vertical-align: top; width: 150px; background-color: rgb(240, 240, 240);">James +Cleere<br> + </td> + <td + style="vertical-align: top; background-color: rgb(240, 240, 240);">Manager<br> + </td> + </tr> +<!-- +<tr> +<td bgcolor="#f0f0f0" valign="top"><a href="...">...</a></td> +<td bgcolor="#f0f0f0" valign="top">...</td> +<td bgcolor="#f0f0f0" valign="top">...</td> +</tr> +--> + </tbody> +</table> +<!-- + older optimization ideas ... currently not relevant + <tr> + <td><a href="optimization.html">Optimization Ideas</a></td> + <td>This page contains a list of oppurtunities for speed optimizations for + the XML filters. Additionally, the current status of our optimization + efforts is listed <a href="current_optimization_status.html"> + here</a>. </td> + <td>HTML, ca. 15KB</td> + </tr> +--> + + + </div> + + <div id="footera"> + <div id="poweredbya"> + <p><img src="/images/feather-small.gif"/><br/>Powered by the Apache CMS.</p> + </div> + <div id="copyrighta"> + <p> + Apache "OpenOffice.org" is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. + Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and + decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is + not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has + yet to be fully endorsed by the ASF.</p> + <p> + <a href="/contact.html">Contact Us</a> | + <a href="/terms.html">Terms of Use</a> + <br />Apache and the Apache feather logos are trademarks of The Apache Software Foundation. + <br />OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. + <br />Other names appearing on the site may be trademarks of their respective owners. + </p> + </div> + </div> + +</body> +</html> Added: websites/staging/ooo-site/trunk/content/xml/xmerge/xmerge_src.zip ============================================================================== Binary file - no diff available. Propchange: websites/staging/ooo-site/trunk/content/xml/xmerge/xmerge_src.zip ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream
