External Leading in Writer

OpenOffice.org 2.0 and StarOffice 8 Writer

Task ID(s)

110641

Category	Specification Affects

Abstract

The “Q” MS-Interoperability PRD identifies a font metric related issue that limits the interoperability between MS Word and OpenOffice.org (OOo). This limitation affects the conversion of Word documents into Writer documents. Furthermore our virtual device, used for printer independent text formatting, differs from the one used by Microsoft, resulting in different line heights. This specification addresses these two issue.

Feature Team

Specification Owner	Andreas Martens Frank Meies	ama@openoffice.org fme@openoffice.org
Marketing Contact		
User Experience Contact	Frank Loehmann	fl@openoffice.org
Development Contact	Frank Meies	
Quality Assurance Contact	Michael Ruess	mru@openoffice.org
Documentation Contact		

Document History

Version	Author	Comment
Draft 07/08/03	Frank Meies	Initial collection of issues
07/21/03	Frank Meies	Added new requirement for the virtual device
10/06/03	Frank Loehmann	Review
10/07/03	Frank Meies	Review
Specification Review 10/06/03	Frank Loehmann	
UI String Review 10/02/03	Elizabeth Matthis	I reviewed the two strings and inserted the mockup. Please see my comments in the string table.
Final <Date>		

Contents

Glossary	1

References	1

1	Motivation	1

2	Goals	1

2.1	How does this feature meet the requirements	1

2.2	How does this feature improve the program architecture	1

3	Dependancies	1

3.1	Technical Dependancies/Requirements	1

4	Detailed Specification	1

4.1	Writer (normal and online view)	1

4.1.1	External Leading	1

4.1.2	Virtual Device	2

4.2	Edit Engine – Drawing objects	2

4.2.1	External Leading	2

4.2.2	Virtual Device	2

4.3	Other Applications	2

4.3.1	External Leading	2

4.3.2	Virtual Device	2

4.4	String list	3

4.5	Error Conditions	3

5	Future Tasks	3

6	Legal Issues	3

7	Notes	3

Glossary

Term	Description
External Leading	A value defined in the font metric that has to be added to the line height
Virtual Device	Device used for text formatting if this feature has been enabled.

References

This feature relates to PCD particle “MS Interoperability” MS-32 (External Leading)

Motivation

Microsoft (MS)Word has an optional setting, which controls if the font metric attribute “External Leading” will be added to the line height. OOo used to ignore this value, thus the number of lines per page can differ between MS Word and Writer. Furthermore, the virtual device used for printer independent text formatting has to be adjusted to resemble to virtual device used in Word.

Goals

The goal is to have the same line heights in Writer like in Word, without changing existing Writer documents. For this, two compatibility flags have to be added to the Writer documents:

The first flag controls whether the external leading specified in the font metric will be considered during text formatting.

The second flag has to be introduced to control whether the new high resolution virtual device will be used for printer independent text formatting.

How does this feature meet the requirements

Meeting the goals given above.

How does this feature improve the program architecture

This feature will lead to improved MS layout compatibility.

Dependancies

Technical Dependancies/Requirements

The EditEngine has to be enhanced to let the client application control if the EditEngine evaluates the external leading attribute. The EditEngine uses the same virtual device like the embedding application.

Detailed Specification

Writer (normal and online view)

External Leading

The default setting for new Writer documents is “use external leading”.

GUI setting in Tools-Options-Text Document.-Compatibility

The default setting for importing Writer documents which do not contain this setting is “do not use external leading”. This guarantees that old documents do not change their layout.

Since Word also uses a flag for this feature, Word documents will keep their setting for the external leading.

In online layout, the “use external leading” flag does not have any effect.

Writer documents embedded as OLE objects will keep their own setting.

The external leading is added on top of the line.

Loading of this flag cannot be disabled by “Tool – Option – Load/Save – General – Load user-specific settings with the document”

Virtual Device

The default setting for new Writer documents is “use high resolution virtual device for printer independent layout”

Using a resolution of 9600 DPI instead of 600 DPI

No GUI representation for this setting

The default setting for importing Writer documents which do not contain this setting is “use low resolution virtual device for printer independent layout”. This guarantees that old documents do not change their layout.

During the import of Word documents, the “use high resolution virtual device” flag will be set.

Writer documents embedded as OLE objects will keep their own setting.

Turning on and off “printer dependent layout” in Tools-Option-Text Document-General also activates the new high resolution device.

Loading of this flag cannot be disabled by “Tool – Option – Load/Save – General – Load user-specific settings with the document”

Edit Engine – Drawing objects

External Leading

The EditEngine has been enhanced to evaluate an “use external leading” flag like Writer does. Writer sets this flag at the EditEngine according to its own document setting.

Virtual Device

The EditEngine will use the same virtual device like the embedding application.

Other Applications

External Leading

Math and Chart do not evaluate this flag.

Virtual Device

Math and Chart will use the same virtual device like the embedding application.

String list

Figure 1 Tools-Options-Compatibility

Mock up taken from http://specs.openoffice.org/writer/compatibility/compatibility.sxw. It needs to be updated here AND there once the specs are final.

Item	English	German	Comments
Checkbox	Do not add leading (extra space) between lines of text	Keinen zusätzlichen Leerraum zwischen Textzeilen hinzufügen	

Error Conditions

There are no new error conditions introduced.

Future Tasks

The UI has to be enhanced to offer functionality to set the compatibility flags.

Legal Issues

none

Notes

According to CMC, the rtf filter currently does not implement the various MS word compatibility flags.

The line spacing of the Edit engine embedded in Impress/Calc is not subject to this specification.

<Required – This paragraphs gives the audience idea of what to aspect from this document. It should be described shortly what problem will be solved.>

Recommended - Please list of technical terms or specialized field of knowledge here.

Required - Give references to related documentation, such as engineering designs, technical specs, and other sources for related units. Also include links to documents that other sections in this spec need to refer to, such as user opinions usability test reports.

<Required - What is the reason for pursuing this project?>

<Required - The goals section must be short but also provide a clear statement of the goals, to achieve with this feature, project or task. A clear statement in this section gives the Development, Quality Assurance and Documentation guidance.>

<Recommended - Describe how this feature will meet expected requirements>

<Recommended - Descripe how this feature will improve the program architecture.>

<Recommended - Are there any requirements or dependencies for this feature? Does the implementation of this feature create any requirements/dependencies to other program parts?>

<Required - First of all the concept section should give the audience an overview of how the new feature will work. When this is done this section has to cover the necessary things to finish this feature. This is the crucial part of the specification. If images are used in the concept, it is very important that these images provide a caption. The caption should be short and has to describe shortly the image. UI Mockups has to provide a caption too, if possible the mockups shouldn't be scaled and our standard user interface font, Andale Sans UI has to be used for strings on dialogs.>

<Required - Dialogs providing strings which have to be translated, have to be accompanied by a table containing the strings used in the image (English or German or both) Strings have to include mnemonics and the item for which the string is used. Mnemonics have to be visualized by a ~ - symbol in front of the letter which has to be displayed mnemonic.>

<Required - List all error conditions, and the action the system takes about them. If an alert box comes up, which kind is it? Include exact text of messages, or say what points need to be covered. Error Messages need a string list>

<Recommended - If there are features which couldn't be implemented but have to be implemented in the future. State these in here with a description why the feature couldn't be implemented right now.>

<Recommended - If there are any legal issues to deal with the should be described here. Legal issues could be for example we have to redistribute third party technology. This section can also contain links the Legal Review Tool.If the Specification will be published on OpenOffice.org this section has to be removed.>

<Recommended - Questions will arise during the writing of the specification. State these in here.>

External Leading in Writer

Page 3

http://specs.openoffice.org/writer/compatibility/ExternalLeading.sxw

External Leading in Writer

Michael Brauer

2003-04-09T20:08:48

Frank Meies