Adjust the formatting of table cells

MS-Interoperability

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

Abstract

Change the formatting of table cells controlled by a compatibility option to meet the requirements of the interoperability to MS Word. The change consists of adding the set paragraph spacing below of the last paragraph inside a table cell to the height of the table cell.

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 (FT)	2004-01-12
Development	Oliver Specht (OS)	2004-01-06
Quality Assurance	Michael Ruess (MRU)	2004-01-07
Documentation	Uwe Fischer (UFI)	2004-01-06
String Review	Elizabeth Matthis (EM)	2004-02-12

Document Change History

Rev. Level	Change	Initials	Date
1.0	Initial version	OD	2003-12-11
1.1	Changes due to UFI's and OS's remarks: adjust usage of term 'bottom'; extend illustration; adjust name of API property; minor text adjustments	OD	2003-12-12
1.2	Minor changes for consistent used terms Add approvals of UFI and OS	OD	2004-01-06
1.3	Add approval of MRU	OD	2004-01-07
1.4	Minor adjustments due to FT's comments Add approval of FT	OD	2004-01-12
1.5	Add approval of EM	OD	2004-02-13

Contents

Glossary	1

1	Motivation	1

2	User Scenarios	1

3	Goals	1

4	Requirements and Dependencies	1

4.1	Requirements	1

4.2	Technical Dependencies	1

5	Competitive Analyses	1

6	Detailed Specification	2

6.1	Adjusted table cell formatting	2

6.2	Compatibility option	2

6.3	Impact on the user interface	2

6.4	Impact on the file format and the API	3

6.5	Impact on the MS Word filter	3

6.6	G11n	3

6.7	Error Conditions	4

7	Future Tasks	4

8	Notes	4

9	References	4

Glossary

Term	Description
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 of table cells in documents. To enhance interoperability 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 table cells addresses this difference.

User Scenarios

A user gets an MS Word document and opens it within Writer. The person who designed the MS Word document made heavy use of tables.

Thus the layout of the MS Word document relies heavily on the height of the table cells.

If the to-be-imported document contains paragraphs in table cells with a set paragraph spacing below, the layout of the Writer doesn't reflect this.

Once this specification is implemented the user will have less layout loss in this case when importing and of course exporting the document into/from Writer.

Goals

Goal of this specification is to enhance the interoperability with MS Word.

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 table cells in Writer will be adjusted. A compatibility option will be introduced to control, if the changed table cell formatting is applied or not.

Adjusted table cell formatting

In Writer the paragraph spacing below of the last paragraph in a table cell isn't considered in the calculation of the cell height. In contrast MS Word adds this paragraph spacing below to the cell height. Thus, the height of the cell consists of the height of the contents including the paragraph spacing below of the last paragraph and the top and the bottom spacing to contents of the cell.

Thus, the formatting of table cells will be changed appropriately. See the following illustration to get an impression of this change.

normal text before table		
top spacing to contents	bottom spacing to contents paragraph with 1cm paragraph spacing below	
normal text after table top spacing to contents normal text before table		
	bottom spacing to contents paragraph with 1cm paragraph spacing below	
normal text after table Illustration 1 Comparison of the former formatting (left) and the new formatting (right) of table cells

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 table cells doesn't change and that for imported MS Word documents the layout of table cells in Writer equals the layout in MS Word.

The proposed name of the option will be “Add paragraph and table spacing at bottom of table cells“.

If the new option is ON, the changed formatting of table cells will be applied. If the new option is OFF, the former formatting of table cells will be applied.

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

Impact on the user interface

The 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 checkbox. See following string list for the changed string of the checkbox.

Add paragraph and table spacing at bottom of table cells Figure 1 Extended tab page 'Compatibility' Note that the options dialog and this tab page is subject to changes – see specifications 'Option dialog' (found at http://specs.openoffice.org/appwide/separate_modules/OptionsDialog.sxw) and 'Writer Compatibility Page' (found at http://specs.openoffice.org/writer/compatibility/compatibility.sxw)

String list

Item	English	German	Comments
Checkbox	Add paragraph and table spacing at bottom of table cells	Absatz- und Tabellen­abstände am Ende von Tabellenzellen hinzufügen	New checkbox on tab page 'Compatibility', found under menu 'Tools - Options – Text Document - Compatibility'

Impact on the file format and the API

The value of the new document compatibility option “Add paragraph and table spacing at bottom of table cells” will be saved in the file format as a <config:config-item> tag with the attributes config:name=”AddParaSpacingToTableCells” 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 OFF.

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 AddParaSpacingToTableCells.

Impact on the MS Word filter

On importing MS Word documents the value of the compatibility option “Add paragraph and table spacing at bottom of table cells“ will be set to ON.

On exporting a Writer document to the MS Word file format the paragraph spacing below of the last paragraphs in table cells will be set 0, if the compatibility option “Add paragraph and table spacing at bottom of table cells“ is OFF. This paragraph property change will assure, that the layout of table cells in Writer and MS Word are the same.

G11n

Nothing.

Error Conditions

Not known.

Future Tasks

Due to the fact, that tables can not directly be inserted into tables, the lower spacing of a table inside another table could not be considered by the implementation of this feature. The feature of allowing tables in tables is planned for OpenOffice.org 2.0, its specification is found at http://specs.openoffice.org/writer/tables/table_in_table.sxw. After the implementation of tables in tables is finished, the lower spacing of a table inside a table will be considered. Submitted IssueZilla issue 26250 will take care of this.

Notes

References

Adjust formatting of table cells

Page 4

/home/od138299/publishSpecs/specs/www/writer/compatibility/formatting-table-cells.sxw

Oliver-Rainer Düsterhöft

2003-12-08T15:46:45