Vertical alignment 'Line of text'

for to character anchored Writer fly frames

MS-Interoperability

Document - ID	Specification Owner	Last Change	Status
	Oliver-Rainer Düsterhöft	01/05/2004	Final
Conforms to	
Applies to	OpenOffice Writer
Task ID(s)	IssueZilla task 22341
Category	Feature

Abstract

Introduce vertical alignment at line for Writer fly frames, which are anchored to character.

i-Team Members

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

Approved for Implementation

	Approved by	Date
User Experience	Falko Tesch	11/10/2003
Development	Michael Brauer	11/18/2003
Quality Assurance	Michael Rüß	11/12/2003
Documentation	Uwe Fischer	11/10/2003
String Review	Elizabeth Matthis	12/15/2003

Document Change History

Rev. Level	Change	Initials	Date
1.0	Initial version	OD	10/27/2003
1.1	Add i-Team member for documentation; Add FT's comments	OD	11/10/2003
1.2	Due to MRU's comment position of top of line is clarified by the new subchapter 'Definition top of line' in chapter 'Detailed Specification'	OD	11/11/2003
1.3	Add MIB's approval	OD	11/19/2003
1.4	Add links to related documents	OD	11/20/2003
1.5	Review string and adjust it. Thus, specification status set to final.	EM OD	12/15/2003 01/05/2004

Contents

Glossary	1

1	Motivation	1

2	User Scenarios	1

3	Goals	2

4	Requirements and Dependencies	2

4.1	Requirements	2

4.2	Technical Dependencies	2

5	Competitive Analyses	2

6	Detailed Specification	2

6.1	Error Conditions	5

7	Future Tasks	5

8	Legal Issues	5

9	Notes	5

10	References	5

Glossary

Term	Description
floating screen object	This term denotes the objects 'Writer fly frame' and 'drawing object' in Writer and the objects 'text box', 'graphic', 'frame', 'picture' etc. in MS Word.
Writer fly frame	Floating screen object containing normal Writer content (text, tables, sections, columns, etc.), graphics, or OLE content.
drawing object	Floating screen object known for the draw application – e.g. rectangles, circles, lines, arrows, etc.
anchor [of a floating screen object]	Content the floating screen object is connected to. In Writer this could be a paragraph, a character, a page, or a Writer fly frame. In MS Word this is always a character.
layout environment [given by an anchor]	Surrounding environment the anchor is in. If the anchor is a paragraph or a character this could be the document body, a table cell, a footnote/endnote, the page header/footer, or a Writer fly frame. If the anchor is a page or a Writer fly frame, its the page respectively the Writer fly frame.
OASIS	Organization of the Advancement of Structured Information Standards, http://www.oasis-open.org

Motivation

MS Word and Writer have different approaches on anchoring and positioning objects 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 Word and integrate them into Writer. Introducing vertical alignment 'Line of text' addresses one of these differences.

User Scenarios

Scenario 1

A user receives a complex Word document from a business contact and opens it in Writer. Her business contact made extensive use of objects in his Word document, such as frames, graphics and the like.

Since such objects heavily affect the document layout a proper positioning of these objects while import is mandatory for an acceptable results.

With the feature covered by this specification the user will receive in most cases a 1:1 copy of the imported document.

Scenario 2

A user migrating from MS Word to Writer will expect to position frames, objects etc. the same way in Writer as he is used it from Word.

This specification will partly cover this issue and allow the user to ease the migration learning curve by giving him the same and/or similar features like in Word at hand.

Goals

Provide the possibility to vertical align Writer fly frames, which are anchored to character, at the top of the line, in which the anchor character is.

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 need to be implemented a competitive analyses is not needed.

Detailed Specification

The vertical alignment 'Line of text' with the positions 'From bottom X cm', 'Top', 'Center' and 'Bottom' has to been introduced in the format dialog on pane 'Type' for the positioning of a Writer fly frame that is anchored to character. The selection list, including the vertical alignments, in the format dialog for Writer fly frames on pane 'Type' will be extended by the entry 'Line of text' – see String list. 'Line of text' denotes the top of the character line the anchor character is in.

Definitions of the new positions

The new positions are already supported for the vertical alignment 'Base line' for Writer fly frames, that are anchored as character. Thus, its definitions are accordingly.

'From bottom by ±X cm to Line of text':
The Writer fly frame will be vertical positioned, that it holds X cm distance to the top of the line. If X is positive, the top of the Writer fly frame will be above the top of the line. If X is negative, the top of the Writer fly frame will be below the top of the line.

'Top':
The Writer fly frame will be vertical positioned, that it's on top of the top of the line.

'Center':
The Writer fly frame will be vertical positioned, that its center equals the top of the line.

'Bottom':
The Writer fly frame will be vertical positioned, that it's on bottom of the top of the line.

See following illustration to get a visible impression of the possible positions:

text text text text text text line of anchor character text text text text text Top of text line From bottom +X cm From bottom -X cm Top Center Bottom Illustration 1 Positions for vertical alignment 'Line of text'

The determination of the top of the line, in which the anchor character is, considers the complete line with all its characters, that are probably in different font sizes, and the applied line spacing. Thus, the top of the line is, where the complete line starts.

Each line consists of the characters and an applied line spacing. The height of a line is the sum of the highest character and the applied line spacing. In the current implementation for the line spacing each line holds its line spacing above the characters. Thus a line starts with the line spacing followed by the characters. An exception is the first line. The first line of a paragraph always starts with the characters – no line spacing is hold above the characters.

It is planned to provide a second implementation for the line spacing. This new implementation will be activated by a new document option. If the new implementation of the line spacing is activated, each line will hold its line spacing below the characters without exception. Then each line will start with the characters.

Impact on the user interface

In format dialog for Writer fly frames on pane 'Type' in area 'Position' the selection list for the vertical alignments will be extended by the entry 'Line of text' for Writer fly frames, that are anchored to character. The possible positions already exists.

Line of text Illustration 2 Adjusted dialog

The allowed input values for the new position 'From bottom by ±X cm to Line of text' will be restricted to sensible values, as it is done for the other positions.

Impact on the File format

The vertical alignment 'Line of text' will be saved as style:vertical-rel=”line” as a attribute of the <style:properties> tag. The value “line” for this attribute is already saved for the vertical alignment 'Row' for Writer fly frames, that are anchored as character.

Note: Vertical alignment 'Row' denotes the character line the Writer fly frame is anchored in. This is a different interpretation as it is for the new vertical alignment 'Line of text' for to character anchored Writer fly frames. This difference has to be discussed in the OASIS file format technical committee.

Impact on the MS Word filter

MS Word's vertical alignment 'Line' has different positions and/or different definitions for the positions. The following tables provides the matching for MS Word filter import and export:

position in Writer	matching position in MS Word
From bottom by +X cm to Line of text	absolute position -X cm below line
From bottom by -X cm to Line of text	absolute position +X cm below line
Top to Line of text	alignment bottom relative to line
Center to Line of text	alignment centered relative to line
Bottom to Line of text	alignment top relative to line

This matching will be implemented in the MS Word filter for import and export.

String list

Item	English	German	Comments
Selection list entry	Line of text	Textzeile	String of new entry in the selection list for vertical alignments in the dialog of Writer fly frames, pane 'Type' at the end of the area, which is named by 'Position'; found under Insert – Frame – Type tab page.

Tab Order

There is no change in tab order

Key Board Shortcuts

No new keyboard shortcuts are needed.

Error Conditions

Not known.

Future Tasks

See corresponding chapters in specification 'Follow text flow vs. leaving layout environment for Writer fly frames' (found here) and in specification 'Vertical alignments at page areas for Writer fly frames' (found here).

Legal Issues

None.

Notes

References

Related PCD document chapter can be found here.

Related specification for new option 'Follow text flow' can be found here.

Related specification for vertical alignments at page areas can be found here.

Vertical alignment 'Line of text' for to character anchored Writer fly frames

Page 5

/home/od138299/so-doc-objpos/specifications-not-published-yet/spec-VertAlignToLine-v1.5.sxw

Oliver-Rainer Düsterhöft

2003-10-16T16:35:26

Falko Tesch