Grid (lines and spacing)
Contents
History
- Last update: March 4, 2008 by tora
Parent project
This project is a part of the parent project jsdp2007.
Sub-projects
This project includes the following sub-projects:
Goals
This project aims at solving one of the Asian specific problems with OpenOffice.org Writer, especially interoperability with Microsoft Word.
When Writer loads a Word file with a choice of 'Specify line and character grid' in the Page Setup dialog, its text layout gets greatly broken.
Facts Expectations ![]()
![]()
The picture of Facts is taken with pure OpenOffice.org 2.3 while the picture of expectations is taken with OpenOffice.org plus accomplishments of this project.
Sample files
Background
Word has four choices for grid layout while Writer has three.
Word Writer ![]()
![]()
The current mapping among choices upon loading a Word file:
Choice of Word Choice of Writer No grid No grid Specify line grid only Grid (lines only) Specify line and character grid Grid (lines and characters) Text snaps to character grid Grid (lines and characters) Writer's Grid (lines and characters) differs from Word's Specify line and character gid, though. The lack of this choice in Writer brings the problem.
Approach
To solve the problem, we have tried to add the fourth choice to Writer. The new choice is preliminarily named 'Grid (lines and character spacing)' or, shortly, 'Grid (lines and spacing).'
New choice in Writer ![]()
With addition of the new choice, an import filter has been enhanced to recognize it as below.
Choice of Word Choice of Writer No grid No grid Specify line grid only Grid (lines only) Specify line and character grid Grid (lines and character spacing) Text snaps to character grid Grid (lines and characters)
How it works
The fourth grid type 'Grid (lines and spacing)' manages the amount of room between side-by-side characters. The amount of room, called Character space, is determined by an equation, subtracting the value of Standard font size from the value of 'Max. base text size.' The Standard font size equals to the size of Asian text font for the Paragraph style 'Default.'
No grid - for reference ![]()
![]()
Grid (lines and character spacing) - ScaledCondensed![]()
![]()
Grid (lines and character spacing) - Expanded ![]()
![]()
File format
This attempt of adding a new type of grid layout will need to propose an enhancement to the OpenDoucment File format.
A new keyword 'spacing' for the new layout "Grid (lines and character spacing)" is experimentally added to the element 'style:layout-grid-mode' defined in the section 15.2.21 Layout Grid of "Open Document Format for Office Applications (OpenDocument) v1.1" [1]
Resources
Three texts have been added to the tab page 'Text Grid'
- Grid (lines and character spacing)
- Standard font size
- Character space
Modules
The following modules have been modified.
Module Modifications sw
- Adding some controls to the tab page 'Text Grid'
- Enhancing a way of formatting text layout
- Adding a new choice to ww8 import and export filters
svx Adding a helper class for a combination of FixedText and NumericFormatter offapi Adding a new choice to com::sun::star::text::TextGridMode xmloff Adding a new token 'spacing'
Online help
No text has been added to the online help.