Adjustment of the formatting of text lines

with proportional line spacing

MS-Interoperability

Document - ID	Specification Owner	Last Change	Status
	Oliver-Rainer Düsterhöft	2004-02-06	Final
Conforms to	
Applies to	OpenOffice.org Writer
Task ID(s)	IssueZilla issue 11859
Category	Feature

Abstract

Change the formatting of text lines with a given proportional line spacing to meet the requirements of the interoperability to MS Word.

i-Team Members (The specification Owner is part of the i-Team)

	Name	E-mail Address
User Experience	Falko Tesch (FT)	falko.tesch@sun.com
Development	Oliver-Rainer Düsterhöft (OD)	oliver-rainer.duesterhoeft@sun.com
Quality Assurance	Michael Ruess (MRU)	michael.ruess@sun.com
Documentation	Uwe Fischer (UFI)	uwe.fischer@sun.com

Approved for Implementation

	Approved by	Date
User Experience	Falko Tesch	2003-12-08
Development	Oliver Specht	2003-12-11
Quality Assurance	Michael Ruess	2004-01-07
Documentation	Uwe Fischer	2003-12-05
String Review	Elizabeth Matthis	2004-02-05

Document Change History

Rev. Level	Change	Initials	Date
1.0	Initial version	OD	2003-11-28
1.1	FT's work included	OD	2003-12-04
1.2	Add adjustment made for sum up or maximise line spacing and paragraph spacing.	OD	2003-12-05
1.3	Clarify term 'proportional line spacing' and adjust string for the new option due to UFI's comments. Add approval of UFI.	OD	2003-12-08
1.4	Add mockup for extended tab page 'Compatibility' and correction due to FT's comments. Add approval of FT and of Oliver Specht	OD	2003-12-11
1.5	EM's approval for the strings	OD	2004-02-06

Contents

Glossary	1

1	Motivation	1

2	User Scenarios	1

3	Goals	1

4	Requirements and Dependencies	2

4.1	Requirements	2

4.2	Technical Dependencies	2

5	Competitive Analyses	2

6	Detailed Specification	2

6.1	Adjusted formatting of text lines with proportional line spacing	2

6.2	Compatibility option	3

6.3	Impact on user interface	3

6.4	Impact on the file format and the API	4

6.5	Impact on MS Word filter	4

6.6	Error Conditions	5

7	Future Tasks	5

8	Notes	5

9	References	5

Glossary

Term	Description
line height	Height of a text line determined by the applied font and font effects of the characters in the text line. It's made of the extra-leading, the ascent and the descent (extra-leading is only included, if it's activated).
line spacing	Denotes the space between the baselines of two text lines. It's a property of a paragraph and is applied to all text lines of the paragraph.
proportional line spacing	Line spacing given as proportional value to the line height. In Writer these are the line spacing options '1,5 lines', 'double' and 'proportional'. In MS Word these are the line spacing options '1,5 lines', 'double' and 'multiple'.
paragraph spacing above/below	Explicit set spacing at a paragraph, which will be hold above respectively below the paragraph.

Motivation

MS Word and Writer have different approaches on the formatting a paragraph with a proportional line spacing ('1,5 lines', 'double', percentage values or multiples of the line height) in documents. To enhance interoperability in between these products as well as to lower the threshold for users to migrate to Writer it is mandatory to adapt certain behaviour from MS Word and integrate them into Writer. Changing the formatting of text lines with proportional line spacing addresses this difference.

User Scenarios

A user that has used other than standard line spacing in MS Word will experience a massive layout change when opening the file in Writer.

Also if the user migrates from MS Word to Writer he will be used to (hard) format his text by choosing different line spacing. When working in Writer this behaviour will result in a different behaviour which makes it hard to understand and will make the user reluctant to use Writer.

Goals

Goal of this specification is to enhance the interoperability with MS Word as well as to ease the migration from MS Word to Writer.

Requirements and Dependencies

Requirements

None.

Technical Dependencies

Not known.

Competitive Analyses

The competitive analyses will consider MS Word only since this specification is about MS interoperability. Since the Detailed Specification is based on a direct comparison that needs to be implemented, a competitive analyses is not needed.

Detailed Specification

The formatting of text lines with proportional line spacing will be adjusted. A compatibility option will be introduced to control, if the changed formatting of text lines with proportional line spacing is applied or not.

Adjusted formatting of text lines with proportional line spacing

In Writer a proportional line spacing is applied above and below the text lines in a paragraph. In the current implementation each text line is extended above by the extra spacing and additionally the last line of the paragraph is also extended below. In contrast MS Word applies a proportional line spacing only below the text lines in a paragraph.

The extra amount of spacing at the top and the bottom of the paragraph resulting from a given proportional line spacing is reckoned up in Writer with the paragraph spacing above respectively below, if document option “Tools – Options – Text Document – General – Compatibility - Add spacing between paragraphs and tables (in current document)” is OFF.
E.g.: If the paragraph consists of characters of a 10pt font and a double proportional line spacing is set, the extra amount of spacing at the top and the bottom of the paragraph resulting from the line spacing is 10pt. If this paragraph has set a paragraph spacing above/below of 20pt, the resulting overall spacing at the top/bottom of the paragraph is 20pt. If the same paragraph has set a paragraph spacing above/below of 5pt, the resulting overall spacing at the top/bottom of the paragraph is 10pt.
In contrast MS Word always adds up the extra amount of the proportional line spacing and the paragraph spacing above respectively below.

Thus, the formatting of text lines with proportional line spacing will be changed appropriately. See the following illustration to get an impression of this change.

Line 4 Line 3 Line 2 Line 1 previous paragraphs previous paragraphs paragraph in a 10pt font with double line spacing and 5pt paragraph spacing above and 30pt paragraph spacing below following paragraphs following paragraphs previous paragraphs previous paragraphs paragraph in a 10pt font with double line spacing and 30pt paragraph spacing above and 5pt paragraph spacing below following paragraphs following paragraphs 30pt – 10pt additionally paragraph spacing 30pt paragraph spacing 5pt paragraph spacing Illustration 1 comparison of the former formatting (left) and the new formatting (right) of text lines with proportional line spacing

The change of the proportional line spacing formatting influences the beginning of the following paragraphs and the position of objects, which align its vertical position to a baseline.

Compatibility option

A new document compatibility option will be introduced. By the value of this new compatibility option it's assured that for former created Writer documents the layout of text lines with proportional line spacing doesn't change and that for imported MS Word document the layout in Writer of text lines with proportional line spacing equals the layout in MS Word.

The proposed name of the option will be “Use OpenOffice.org 1.1/StarOffice 6.0/7 line spacing“.

If the new option is OFF, the changed formatting of text lines with proportional line spacing will be applied. If the new option is ON, the former formatting of text lines with proportional line spacing will be applied.

The default value of the option for new documents will be OFF. For former created Writer documents the value is set to ON.

Impact on user interface

The new compatibility option – introduced in previous chapter – will be accessible by the user in the 'Compatibility' tab page, found under menu Tools – Option – Text document – Compatibility via a new checkbox. See following string lists for the string of the checkbox in OpenOffice.org and StarOffice.

Use OpenOffice.org 1.1 line spacing Figure 1 Extended tab page 'Compatibility'

String list for OpenOffice.org 2.0:

Item	English	German	Comments
Checkbox	Use %PRODUCTNAME 1.1 line spacing	OpenOffice.org 1.1 Zeilenabstand verwenden	New checkbox on tab page 'Compatibility', found under menu 'Tools - Options – Text Document – Compatibility'; %PRODUCTNAME will be replaced by “OpenOffice.org”, but the version number must be hard formatted because it will not change.

String list for StarOffice 8

Item	English	German	Comments
Checkbox	Use %PRODUCTNAME 6.0/7 line spacing	StarOffice 6.0/7 Zeilenabstand verwenden	New checkbox on tab page 'Compatibility', found under menu 'Tools - Options – Text Document - Compatibility'; %PRODUCTNAME will be replaced by “StarOffice” or “StarSuite, but the version number must be hard formatted because it will not change.

Impact on the file format and the API

The value of the new document compatibility option “Use OpenOffice.org 1.1 respectively StarOffice 6.0/7 formatting for text lines” will be saved in the file format as a <config:config-item> tag with the attributes config:name=”UseFormerLineSpacing” and config:type=”boolean” in the <config:config-item-set config-name=”configuration-settings”> tag. The tag can provide the values true or false.

If no value for the new document compatibility option is provided in the file format – as it is for former created Writer documents –, it's value is set to ON.

The access to the value of the new document compatibility option via API will be provided by the service com::sun::star::text::DocumentSettings via the new optional property UseFormerLineSpacing.

Impact on MS Word filter

On importing MS Word documents the value of the new compatibility option “Use OpenOffice.org 1.1 respectively StarOffice 6.0/7 formatting for text lines” will be set to OFF.

Error Conditions

Not known.

Future Tasks

None.

Notes

References

Adjustment of formatting of text lines with proportional line spacing

Page 5

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

Oliver-Rainer Düsterhöft

2003-11-27T14:59:40