Adjusted positioning of floating screen objects

MS-Interoperability

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

Abstract

Change the positioning of floating screen objects controlled by a compatibility option to meet the requirements of the interoperability to MS Word. The adjustment affects the determination of the paragraph top for the positioning of floating screen objects.

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 Rüß (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-26
Development	Oliver Specht (OS)	2004-01-23
Quality Assurance	Michael Rüß (MRU)	2004-02-13
Documentation	Uwe Fischer (UFI)	2004-02-12
String Review	Elizabeth Matthis (EM)	2004-02-27

Document Change History

Rev. Level	Change	Initials	Date
1.0	Initial version	OD	2004-01-23
1.1	Add approvals of FT and OS Clarify calculations in table about distance between paragraphs Add approval of UFI and MRU	OD	2004-02-13
1.2	Include EM's adjustments and add her approval	OD	2004-03-02

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 positioning of floating screen objects	2

6.2	Compatibility option	3

6.3	Impact on the user interface	3

6.4	Impact on the file format and the API	4

6.5	Impact on the MS Word filter	5

6.6	G11n	5

6.7	Error Conditions	5

7	Future Tasks	5

8	Notes	5

9	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, text boxes etc.
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.
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 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 MS Word and integrate them into Writer. Determine the same paragraph top as MS Word according to the calculated distance between paragraphs addresses one of these differences.

User Scenarios

Interoperability: A user gets a Word document and opens it within Writer. The person who designed the Word document made heavy use of objects of any kind in his text.

Thus the layout of the Word document relies heavily on the precise interpretation of position of the inserted objects.

If the to-be-imported document contains objects which are positioned at the paragraph the layout in the Writer currently doesn't reflect this, if the previous paragraph has a spacing below.

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

Goals

Goal of this specification is to enhance the interoperability with MS Word, while documents from previous OpenOffice.org respectively StarOffice version stay the same.

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 positioning of floating screen objects in Writer will be adjusted. A compatibility option will be introduced to control, if the changed floating screen object positioning is applied or not.

Adjusted positioning of floating screen objects

In Writer the top of a paragraph, determined for the positioning of floating screen objects, is directly below the last line of the previous paragraph. Thus, a paragraph includes in its top the paragraph spacing below and the line spacing of its previous paragraph. This determined paragraph top is used to position floating screen objects, if a corresponding positioning and alignment is applied (e.g. 'vertical from top by X cm to paragraph area' or 'top to paragraph area'). In contrast MS Word doesn't include in the top of a paragraph the paragraph spacing below and the line spacing of its previous paragraph.

The positioning of floating screen objects will be changed appropriately. See the following illustration to get an impression of this change.

previous paragraph with a paragraph spacing below of 1cm. paragraph spacing below of 1cm paragraph spacing above of 2cm paragraph with a paragraph spacing above of 2cm and a Writer fly frame vertical positioned at top of paragraph area previous paragraph with a paragraph spacing below of 1cm. paragraph spacing below of 1cm paragraph spacing above of 2cm paragraph with a paragraph spacing above of 2cm and a Writer fly frame vertical positioned at top of paragraph area Illustration 1 Comparison of the former positioning (left) and the new positioning (right) of floating screen objects

Note that the distance between paragraphs can be calculated in different ways – paragraph spacings and line spacings can be added up or the maximum of the values is taken. The document options “Add spacing between paragraphs and tables” and “Use OpenOffice.org 1.1 respectively StarOffice 6.0/7 line spacing” influence the calculation – see following table:

distance between two paragraphs	Add spacing between paragraphs and tables ON OFF
Use OOo 1.1 resp. SO 6.0/7 line spacing	ON paragraph spacing below + paragraph spacing above, + maximum of the following 2 values line spacing of upper paragraph and line spacing of lower paragraph maximum of the following 4 values paragraph spacing below, paragraph spacing above, line spacing of upper paragraph, and line spacing of lower paragraph OFF paragraph spacing below + paragraph spacing above + line spacing of upper paragraph + line spacing of lower paragraph maximum of the following 2 values paragraph spacing below and paragraph spacing above + line spacing of upper paragraph + line spacing of lower paragraph

For document option “Use OpenOffice.org 1.1 respectively StarOffice 6.0/7 line spacing” see specification “Adjustment of the formatting of text lines with proportional line spacing” found at http://specs.openoffice.org/writer/compatibility/text_lines_and_prop_line_spacing.sxw.

However the distance between two paragraphs is calculated, for the adjusted floating screen object positioning a paragraph top will not include the paragraph spacing below and the line spacing of its previous paragraph.

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

The proposed name of the option will be “Use OpenOffice.org 1.1 respectively StarOffice 6.0/7 object positioning“.

If the new option is OFF, the changed positioning of floating screen objects will be applied. If the new option is ON, the former positioning of floating screen objects 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 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.

Use OpenOffice.org 1.1 object positioning Figure 1 Extended tab page 'Compatibility' Note that the options dialog and this tab page is due 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 for OpenOffice.org 2.0:

Item	English	German	Comments
Checkbox	Use %PRODUCTNAME 1.1 object positioning	%PRODUCTNAME 1.1 Positionierung von Objekten verwenden	New checkbox on tab page 'Compatibility', found under menu 'Tools - Options – Text Document - Compatibility'

String list for StarOffice 8

Item	English	German	Comments
Checkbox	Use %PRODUCTNAME 6.0/7 object positioning	%PRODUCTNAME 6.0/7 Positionierung von Objekten verwenden	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 “Use OpenOffice.org 1.1 respectively StarOffice 6.0/7 object positioning” will be saved in the file format as a <config:config-item> tag with the attributes config:name=”UseFormerObjectPositioning” 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 UseFormerObjectPositioning.

Impact on the 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 object positioning” will be set to OFF.

G11n

Nothing.

Error Conditions

None.

Future Tasks

None.

Notes

References

Adjusted positioning of floating screen objects

Page 5

/home/od138299/publishSpecs/specs/www/writer/compatibility/adjust-object-positioning.sxw

Oliver-Rainer Düsterhöft

2004-01-22T16:07:28