2007年6月29日星期五

UOF Import Filter for OpenOffice.Org

The UOF - Uniform Office Format is an emerging standard, which is being developed by the Chinese Office Software Work Group (COSWG), led by the China Electronics Standard Institute (CESI), the Ministry of Information Industry (MII), major suppliers of Chinese office software suites, and other academic institutions.

This week is a hackfest week at Novell. I am hacking a UOF( Chinese Office File Format) import filter for OpenOffice.org. This filter is an external component based on ODF-UOF Converter.

An extension is developed so that OpenOffice.Org is able to open UOF text document. Here is some screenshots.






Although some features such as paragraph style, table are supported yet, there are a lot of work need to do. I will continue to work on them when I get time.

2007年5月28日星期一

UOF–OpenXML Translator

I was surprised the news that Microsoft announced UOF-OpenXML translator project with China. The goal of UOF–OpenXML translator :

"As part of Microsoft’s continued commitment to interoperability, Microsoft decided to work with CHINA Electronics Standardization Institute, Beijing Information Technology Institute, one of the co-creators of the UOF Chinese standard , Beihang University of Beijing and with other partners to create a Translator between UOF and Open XML and provide interoperability between the two formats in both directions. Microsoft is funding and providing technical architectural guidance for the development of the translator that will benefit millions of people who live in China."

In one sense, China is so important for Microsoft's further strategies.
It is time to do something about UOF plug-in for OpenOffice.org, isn't it?

The UOF-OpenXML project is available at http://uof-translator.sourceforge.net
.
The UOF-ODF project is available at http://odf-to-uof.sourceforge.net.


2007年4月24日星期二

Issues wrt. text grid in Issuezilla

The prototype of text grid enhancement is available and the patch is under review now. Anybody who is interested in it could check out the patch from the cws cjksp1.

Today, I happen to find that there are quite many text grid issues open in Issuezilla. I will look at them one by one and try to fix them. :)

Some issues wrt. text grid in issuezilla:

i53425:more flexibility in the grid layout
i73011:Chinese layout incorrectly with text grid
i40768:CJK:Register-true not activated for frames when importing; Grid layout
i53464:Word table reformatted shorter on import due to Grid layout
i15251:"Snap to Grid" doesn't work correctly
i29543:WW8: paragraph with "snap to grid" invisible in table
i15424:baseline in grid
i55461:snap to grid doesn't work correctly inside frame
i54864:WW8: Different treatment of tables in page due to active CJK Grid
i72657:A single line on Word got converted to two lines on Writer due to Text Grid
i68204:option "Print grid" becomes inactive when reopening Page dialog
i35684:[Text Grid] Vertical alignment for different font sizes differ from MS Word
i49214:CJK: Line spacing interpretation is different between Word and Writer due to text grid
i24195:WW Import: Cell height is too big when opened in OOo 1.1.1a (due to CJK-Grid)
i56820:Ruby in vertical text in grid wrongly moves original text sideways

Please let me know if anybody has question about text grid layout. :)

2007年3月22日星期四

User scenarios of text grid

The following user scenarios of text grid are under investigation.

1. When user creates a text document, the default paper mode of text grid is read from user preference settings. User can switch the default paper mode of text grid in text document options tab page. (Tools --> Options --> Text Document --> General) by clicking the check box "Use squared paper mode for text grid".

2. When import a Ms Word 97/2000 file (.doc), the default paper mode is treated as "standard paper mode".

3. When import a text document of the previous version of OO.org (.odt, .sxw), the default paper mode is treated as "squared paper mode"

4. When user is editing a text document with text grid.
if he switchs the paper mode from "squared" to "standard", the following behavior is used:
* line height = Max base text size + Max ruby text size
* lines per page = type area height / line height
* Max ruby text size = 0

if he switch the paper mode from "standard" to "squared", the following behavior is used:
* line height = type area height / lines per page
* Max base text size = line height * 2 / 3
* Max ruby text size = line height / 3

2007年3月20日星期二

Two kinds of text grid layout

As mensioned before, there are two kinds of text grid layout which are used in CJK users. One is "squared page mode", the other is "standard (rectangle) page mode".

Per the text grid prososal approved by ODF TC, the style:layout-grid-standard-mode property is added to specified which kind of text grid is used for the document.

In order to ensure that either “sqaured mode” or “standard mode “is used for the whole document, the style:layout-grid-standard-mode property can only be set for the default style of the “page-layout”. When the style:layout-grid-standard-mode attribute appears inside a style:page-layout definition, then the attribute MUST be ignored.

Global setting entry for selection of which kind of text grid layout is used for the whole document. (Tools-->Options-->OpenOffice.Org Writer-->General)


When the "Use squared page mode for text grid" is checked, the original tab page of text grid is used.


When the "Use squared page mode for text grid" is unchecked, the following tab page of text grid is used.

2007年3月13日星期二

Text grid in Ms Word 97 binary file format

In Ms Word 97 binary file format, there are three SPRMs to deal with grid. They are:

Name

sprm

Property

size

Description

sprmSDxtCharSpace

0x7030

Sep.dxtCharSpace

long

Specifies the grid width

sprmSDyaLinePitch

0x9031

Sep.dyaLinePitch

long

Specifies the grid height

sprmSClm

0x5032

Sep.clm

long

Specifies the grid type


sprmSClm has four values, which corresponds to four types of grid.

Name

value

Grid type

sprmSClm

0

No grid

1

Specify line and character grid

2

Specify line grid only

3

Text snaps to character grid


2007年3月12日星期一

Text grid enhancement in MS Office 2007

Today, I downloaded and installed a Chinese trial version of MS Office 2007. I was surprised that “Square page mode” is also supported in MS word 2007, which is not supported in previous version.

Below illustrates the menu entry for “square mode” setting. ( Maybe this function is disabled in none_CJK version in default).

Setting tab page:

Squared page (20 ×20):

If the “square page mode” is enabled, the page setting menu is disabled. “standard page mode” setting is not allowed, which avoids mixed page mode in a document.