Tables: Automatic Page And Column Breaks

OpenOffice.org 2.0 and StarOffice 8 Writer

Task ID(s)

i2109

Category	Specification Affects

Abstract

The “Q” MS-Interoperability PRD identifies various table related issues that limit the interoperability between MS Word and StarOffice Writer. This limitations affect the conversion of Word documents into Writer documents, but also the user interface. This specification addresses the ability of Writer tables to break table rows at page or column breaks.

Feature Team

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

Document History

Version	Author	Comment
Draft 04/07/03	Michael Brauer	Initial collection of issues
Draft 04/15/03	Caolán McNamara	Table Border specification change
Draft 04/16/03	Michael Brauer	Added QA requirements
Draft 07/30/03	Andreas Martens	More details for Automatic Breaks
Draft 07/31/03	Andreas Martens	More details for Table in Table
Draft 10/09/03	Frank Meies	Extracted this document from general Table Enhancements document
Draft 11/04/03	Frank Meies	Added detailed description of the split algorithm
Specification Review 11/12/03	Frank Loehmann	Initial Spec. Review
Draft 11/13/03	Frank Meies	Accepted changes
Draft 11/14/03	Frank Loehmann	Change UI behavior
Draft 11/17/03	Frank Loehmann	Change GUI string
Pre Final 11/18/03	Frank Meies	Minor changes to section "GUI Changes"
Pre Final 11/19/03	Andreas Martens	Reviewed, no changes
Pre Final 11/19/03	Frank Meies	Documentation & QA Contact added
UI String Review 12/01/03	Elizabeth Matthis	
Final 12/01/03	Frank Meies	no changes

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	Competitive Analysis	1

3.1	Microsoft Word XP and 97	1

4	Dependancies	2

4.1	Technical Dependancies/Requirements	2

5	Detailed Specification	2

5.1	Automatic Page And Column Breaks	2

5.2	GUI Changes	3

5.2.1	String list	4

5.3	Detailed description of the split algorithm	4

5.4	Known limitations and differences to other product	6

5.4.1	Differences to MS Word due to the underlying table structure	6

5.4.2	Widows and Orphans	8

5.5	TODO List	8

5.6	Error Conditions	8

6	Future Tasks	8

7	Legal Issues	9

8	Notes	9

Glossary

References

This feature relates to PCD particle “MS Interoperability” MS-32 (Table Enhancements)

Motivation

Microsoft (MS) Word has an optional attribute for table rows to allow table cells to break across page or column borders.

Goals

The goal is to improve the document import of MS Word documents containing tables with cells exceeding page or column breaks.

How does this feature meet the requirements

A new attribute option per table line allows or disallows a table row to break at page/column borders.

How does this feature improve the program architecture

This feature will lead to improved MS layout compatibility.

Competitive Analysis

Microsoft Word XP and 97

In MS Word 97 the option to allow page or column breaks in-between a row is placed in the Cell Height and Width dialog. The attribute can be set for each row separately, The user can travel thru the rows and columns of a table without leaving the dialog.

In Word XP this dialog has been integrated into the Table properties dialog.

Illustration 1 Row Tab of Microsoft Word XP Table dialog

Dependancies

Technical Dependancies/Requirements

Detailed Specification

Automatic Page And Column Breaks

If a table row does not fit into the remaining space of a page or column, an automatic page or column break will be inserted into the row's cell. This means that all cells of the row will hold as much content as fits on the page or column, and that the remaining content will be moved into a new cell at the next page or column:

Automatic page and column breaks can be disabled for each table row individually. In this example, the highlighted row is not allowed to be split:

GUI Changes

The table dialog tab for Text Flow will be changed as follows:

Illustration 2 Table dialog with renamed "Do not split table" option and new row option for splitting at page borders

The negative option “Do not split table” has been changed to a positive formulated option “Allow table to split across pages and columns”. Therefore the default has been changed to on. The new option to allow splitting for all rows (respectively for the rows of the current selection) of the current table at page and column breaks has been added. This option depends from the renamed general option to allow breaks within a table at all and is disabled if this general option is unchecked. Three-state will be shown if the setting is not currently set for the whole table.

The Row context menu offers a new checked item “Break at pages and columns”. This allows the user to set the attribute for current row(s) only. If the option “Allow table to split across pages and columns” is deactivated in the Table dialog, the menu entry is disabled. The default status of this menu entry is checked.

String list

Item	English	German	Comments
Checkbox	Allow row to break a~cross pages and columns	Zeilenumb~ruch an Seiten- und Spaltenenden zulassen	under Format – Table – Text Flow
Checkbox	Allow ~table to split across pages and columns	Trennung der Ta~belle an Seiten- und Spaltenenden zulassen	Previously “Do not split table” under Format – Table – Text Flow
Menu entry	Allow Row to Break A~cross Pages and Columns	Zeilenumb~ruch an Seiten- und Spaltenenden zulassen	Context menu of a table row; Same function as Checkbox under Format – Table – Text Flow; it is easier for the use to recognize these two strings when they are the same.

Detailed description of the split algorithm

For a better understanding of the feature, the table structure and the algorithm to determine the breaks will be described in detail. The next illustration shows the structure of a complex table:

The green border denotes the table boundary, blue borders denote table rows,and red borders denote table cells.

Assume, the page break goes through the second row inside the second cell inside the third row of the table. Therefore, B3.1.2 and B3.2.2 have to be split. The split algorithm works as follows:

The outer row which does not fit to the page is determined. In our example, this is the third row.

A FollowTable which should contain the content of the table, that does not fit to the first page, has to be created.

A copy of the third row (called the FollowFlowRow) is inserted into the FollowTable. This copy only contains the outer cells of the third row, the nested rows in the second cell of the third row are not copied to the FollowFlowRow.

The fourth row is moved into the FollowTable behind the FollowFlowRow, because it does not fit to the first page anymore.

The cells in the third row have to be examined. The rows containing B3.1.3 and B3.1.4 can be moved to the second cell of the FollowFlowRow.

A copy of the row containing B3.1.2 and B3.2.2 is inserted into the second cell of the FollowFlowRow.

The content of B3.1.2 and B3.2.2 has to be re-calculated. Now their content may flow into the corresponding cells into the follow flow row.

The structure of the resulting table would look like this:

Known limitations and differences to other product

Differences to MS Word due to the underlying table structure

If B3.1.2 or B3.2.2 from the previous example have no content on page one, this row is moved to the FollowFlowRow. Nevertheless, cell A3 and C3 are still allowed to grow up to the border of page 1. The next picture shows an example that illustrates this situation:

None of the content of cell B3.1.2 fits to the first page. Therefore the cell is moved to the continuation of the table on the second page. In Writer, cell A3 still may grow until the end of page 1. In MS Word, this looks different:

The cell containing A3 cannot grow up to the end of the first page. The reason for this is that MS Word uses a different underlying table structure (e.g., this Writer table consists of 4 rows, with the third row containing four additional rows inside its second cell, whereas the MS Word table consists of 7 individual rows).

By split and merge operations, the structure of a cell can become quite complex. In this case, the complex cell will not be split at page/column breaks:

Widows and Orphans

Like in MS Word 2003, manual page/column breaks and the paragraph attributes 'Widows/Orphans', 'Keep with next paragraph', and 'Do not split' are not evaluated within table cells.

TODO List

Field	To Do
UI	Checkbox “Allow row to break” at Format/Row and Format/Table/Text_flow Not for Writer/Web.
Core	New Boolean Attribute at row (SwTableLine). Default “False”, but
Layout	Split cells at page border if allowed and necessary.
XML Format	Load/Save of this attribute.
Binary Filter	Nothing
Word Filter	Import/Export
HTML Filter	Nothing
Other Filter	If filter supports attribute(RTF?): im/export
API	Property
Accessibility	Nothing
EditEngine	Nothing
Calc/Impress	Nothing
Other	Nothing

Error Conditions

There are no new error conditions introduced.

Future Tasks

none

Legal Issues

none

Notes

none

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

Tables: Automatic Page And Column Breaks

Page 9

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

Tables: Automatic Page And Column Breaks

Michael Brauer

2003-04-09T20:08:48

Frank Loehmann

Elizabeth Matthis