Handling of Spaces at the End of a Line in Writer

applies to StarOffice 6.1 Beta
status: draft, last modified: 25. Sep. 2003

Version History

Wed, Aug 28, 02	FL	Frank Loehmann	first draft

Abstract

StarOffice/OpenOffice Writer can show non printing characters like spaces. Currently spaces at the end of a line will not be shown. This often makes the user insecure, because he isn't sure if a space was already inserted when he reads thru the text. As a result of this often more than one space will be inserted just to be sure and could result in unwanted breaches in a sentence after the line breaks have been changed due to format or text changes.

Contents

1 Current Behavior of StarOffice/OpenOffice	2

2 Competitors	3

2.1 Microsoft Word XP	3

2.2 AbiWord	4

2.3 Papyrus	4

2.4 Softmaker Textmaker 2000	5

3 Proposed Solution	6

3.1 Test Implementation	7

4 String List	8

Current Behavior of StarOffice/OpenOffice

StarOffice/OpenOffice Writer displays non printing spaces on the screen as shown on the screen shots below. This display setting is not defaulted and can be activated if “Nonprinting characters on/off” is chosen or “Spaces” in the Options-Text Document-Formatting Aids option tab page is chosen.

Currently spaces are only displayed if they are at the end of the paragraph and not at the end of a line inside a paragraph. (Please see “Illustration 2 Space at end of line is currently hidden, at the end of paragraph it is shown.“).

Due to this many users enter a space at the end of the line, to be sure that there will be a space. Furthermore already existing spaces at the end of a line could not be recognized when reading the text in this mode.

Please note: Spaces will be hidden at the end of a paragraph if there are so many spaces, that the line would break to the next line. They are something like “eaten up” and no space will be displayed

Illustration 1 Non printable spaces in SO/OO Illustration 2 Space at end of line is currently hidden, at the end of paragraph it is shown.

This issue seems to be important and was reported many times even on OpenOffice.org: http://so-web1.germany.sun.com/bis/servlet/intray.ControlPanel?system=2&id=2197& showframeset2=true).

Competitors

The competition handles this problem in many different ways.

Microsoft Word XP

In Word spaces at the end of a line do not break the line and will be shown. They are displayed in the non printing area and are cropped by the page border. Furthermore the cursor can be traveled outside the visible area and can be placed inside the spaces using the mouse.

Illustration 3 Word XP - justified Illustration 4 Word XP - left aligned

AbiWord

Displays like word, but has many formatting problems if paragraph alignment will be changed.

Illustration 5 AbiWord 1.0.1 – Tables are not supported by this version

Papyrus

Papyrus breaks the line if spaces extend the line.

Illustration 6 Spaces at end of line break to next line

Illustration 7 Papyrus - justified

In justified text the space at the end is not visible.

Softmaker Textmaker 2000

Like Word, but cursor does not leave page boundaries.

Illustration 8 Softmaker Textmaker 2000 – left aligned

Illustration 9 Softmaker Textmaker 2000 – justified

Detailed Specification

Spaces at the end of a line will be shown regardless if there is text after it or not, but the cursor could not be placed within these spaces.

Offene Punkte:

Eaten up spaces at paragraph end

Illustration 10StarOffice/OpenOffice Writer - left aligned Test Implementation

Frank Meies already did a test implementation for this new behavior to get a better idea of the needed effort and risks.

Problems:

Painting outside the page boarder causes paint problems

Placing the cursor outside the page borders seems to be risky and was not included in this demo

Tables would have the same behavior as normal line ends

In centered paragraphs spaces would be “eaten” up as soon as the spaces at the end of the line fill up the complete line. (please see this text)

String List

<not needed for this spec>

String	German translation	comment

Handling of Spaces at the End of a Line in Writer	7

7	Handling of Spaces at the End of a Line in Writer

Sun Proprietary/Confidential: Internal Use Only

Handling of Spaces at the End of a Line in Writer

Frank Loehmann

2002-08-27T14:57:56