Text/table selection enhancement

OpenOffice.org 2.0

Document - ID	Specification Owner	Last Change	Status
	Falko Tesch	16.08.2004	Final
Conforms to	http://www.openoffice.org/issues/show_bug.cgi?id=20126
Applies to	Writer
Task ID(s)	20126
Category	Feature

Abstract

Writer currently supports only three different types of text selection: A single word (double-click), a complete line (triple-click) and multiple text selection (like single word/complete line but with CTRL kept pressed). While multi-selection and single word selection are sensible actions the 'complete line' action is very seldom used.

i-Team Members (The specification Owner is part of the i-Team)

	Name	E-mail Address
User Experience	Falko Tesch, FT	Ft@openoffice.org
Development	Andreas Martens	Ama@openoffice.org
Quality Assurance	Stefan Baltzer	Sba@openoffice.org
Documentation	Uwe Fischer	Ufi@openoffice.org

Approved for Implementation

	Approved by	Date
User Experience	Falko Tesch	27.04.2004
Development	Andreas Martens	27.04.2004
Quality Assurance	Stefan Blatzer	27.04.2004
Documentation	Uwe Fischer	27.04.2004
String Review	Falko Tesch	16.08.2004

Document Change History

Rev. Level	Change	Initials	Date
1.0	Initial draft	FT	25.03.2004
1.1	Added more detailed text	FT	31.03.2004
1.2	Got legal approval (verbally only)	FT	05.04.2004
1.3	Added special case section #1	FT	07.04.2004
1.4	Added special case section #1 (and renamed old #1 to #2)	FT	26.04.2004
1.5	Added special case section #3	FT	27.04.2004
2.0	Added tool tips	FT	16.08.2004
2.1	Rewrote the SEPARATOR character list	FT	08.10.2004
2.2	Put SEPARATOR list to "Future task" section, added enhanced table selection (see point 6.9)	FT	14.10.2004
2.3	Minor update on multiple table row/column slection model	FT	16.11.2004

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	3

6.1	Text Selection in General	3

6.2	Definition of Text Selections	3

6.3	Text Selection in Detail	6

6.4	“Rotation” Mode	6

6.5	Table selection in General	6

6.6	Table Selection - All	7

6.7	Table Selection – Rows	7

6.8	Table selection – Columns	8

6.9	Expanding selection – Rows and Columns	9

6.10	Special Cases #1	9

6.11	Special Cases #2	10

6.12	Special Cases #3	10

6.13	New Cursors	10

6.14	Tool Tips	10

6.15	Error Conditions	11

7	Future Tasks	11

8	Notes	12

9	References	12

Glossary

Term	Description
R2L, L2R	Describes the text direction, the text is written in – Right-to-left (R2L); Left-to-right (L2R)
SEPARATOR (special used term)	A space, an em-space, an en-space, a ¼ em-space, a dash, an em-dash and an en-dash but not a protected space or dash (created with CTRL+SPACE) as well as any characters from this list: ° ! “ § $ % & / ( ) = ? ` ' ^ ² ³ { [ ] } \ * + ~ # < > | ; , : . _

Motivation

Writer currently supports only three different types of text selection: A single word (double-click), a complete line (triple-click) and multiple text selection (like single word/complete line but with CTRL kept pressed). While multi-selection and single word selection are sensible actions the 'complete line' action is very seldom used.

Instead new selection actions should be addressed:

Single word (already implemented)

Complete paragraph (could replace complete line selection -> triple click)

Full sentence (double-click with modifier -> CTRL).

Furthermore selection of tables in Writer needs some enhancement. While the current selection operation should not change they can be enhanced by

easier full table selection

easier selection from 'outside' the table

User Scenarios

User from other Word processor are used to selected e.g. A complete sentence by double-clicking into it. This (sensible) habit makes it easy for the them to accelerate their work with text in general.

Also the selection of whole table rows is often done by just clicking left of the table row. Again this is a useful habit to accelerate daily's work.

If those users migrate to OO.o they will find these behaviours altered (double-click in text selects a line) or even not implemented (clicking left of a table row doesn't do anything in Writer)

Goals

Add/alter mouse selection for tables and text in Writer to sensible and common sense settings.

Requirements and Dependencies

Requirements

N/a

Technical Dependencies

N/a

Competitive Analyses

MS Word XP:

Selection behaviour within text

Single click	Positions cursor in text
Single click + CTRL pressed	Selects a complete sentence (from the first letter behind a '.' to the first '.' plus a single SEPARATOR* behind)
Double-click	Selects a single word (from the first letter to the last consecutive letter including the SEPARATOR* behind it, unless there is a '.')
Triple-click	Selects a complete paragraph (from line-break to line-break plus adding a single SEPARATOR* at the end)

If the CTRL-key is pressed with double- or triple-clicks than the selection get added (aka multi-selection) to existing one.

*MS Word considers the following characters as SEPARATORS: Spaces and dashes such as protected spaces, em-spaces/dashes, en-spaces/dashes, ° ! “ § $ % & / ( ) = ? ` ' ^ ² ³ { [ ] } \ * + ~ # < > | ; , : . _

Note: Only words and whole paragraphs can be added via CTRL-key modifier to a multi-selection. There is no way to add a sentence to an existing selection!

Selection behaviour in tables

Click in front of a table	Selects the whole row the cursor stands in front of
Click above a table	Selects the whole column the cursor stands above
Click in the “selection cross” of a table	Selects the whole table

WordPerfect 11

Selection behaviour within text

Single click	Positions cursor in text
Double-click	Selects a single word (from the first letter to the last consecutive letter including the SEPARATOR** behind it, unless there is a '.')
Triple-click	Selects a complete sentence (from the first letter behind a '.' to the first '.' plus a single SEPARATOR** behind)
Quadruple-click	Selects a complete paragraph (from line-break to line-break plus adding a single SEPARATOR** at the end)

**WordPerfect considers the following characters as SEPARATORS: Simple spaces and dashes “ ( ) ` ' ² ³

Note: There are no modifiers involved

No easy selection of tables (row, column, all) available.

KWord 1.2

Selection behaviour within text

Single click	Positions cursor in text
Double-click	Selects a single word (from the first letter to the last consecutive letter)
Triple-click	Selects a complete paragraph (from line-break to line-break)

Due to very inconsistent behaviour (text gets sometimes selected at different location than the the current cursor position) SEPARATORS in KWord cannot be unambiguously defined.

Note: There are no modifiers involved

Selection behaviour in tables

Click in front of a table	Selects the whole row the cursor stands in front of
Click above a table	Selects the whole column the cursor stands above

The selection of rows or columns is “sticky”. Selecting another row/columns does not remove previous selections.

OpenOffice.org Writer 1.1.x

Selection behaviour within text

Single click	Positions cursor in text
Double-click	Selects a single word (from the first letter to the last consecutive letter)
Triple-click	Selects a complete row of text (from row beginning to row end)

OpenOffice.org Writer considers the following xharacters as SEPARATORS (delimiters): Simple spaces and dashes ° ! “ § $ % & / ( ) = ? ` ' ^ ² ³ { [ ] } \ * + ~ # < > | ; , : . _

Holding down CTRL-key while clicking multi-selects text.

No easy selection of tables (row, column, all) available.

Detailed Specification

Text Selection in General

Writer will add the selection of whole sentences. It will also apply the multi-selection modifier key (CTRL-key) to this new selection. This selection will apply to text in all objects, such as frames, tables etc.

Also rotation through the three states (word, sentence, paragraph) will be added.

Definition of Text Selections

SEPARATOR

A SEPARATOR (as used in all definition from now on) is a space, an em-space, an en-space, a ¼ em-space, a dash, an em-dash and an en-dash but not a protected space or dash (created with CTRL+SPACE) as well as any characters from this list:

Character	Unicode indentifier
!	U+0021
"	U+0022
#	U+0023
$	U+0024
%	U+0025
&	U+0026
'	U+0027
(	U+0028
)	U+0029
*	U+002A
+	U+002B
,	U+002C
-	U+002D
.	U+002E
/	U+002F
:	U+003A
;	U+003B
<	U+003C
=	U+003D
>	U+003E
?	U+003F
[	U+005B
\	U+005C
]	U+005D
^	U+005E
_	U+005F
`	U+0060
{	U+007B
|	U+007C
}	U+007D
~	U+007E
¢	U+00A2
£	U+00A3
¥	U+00A5
§	U+00A7
¦	U+00A6
¨	U+00A8
ª	U+00AA
«	U+00AB
°	U+00B0
²	U+00B2
³	U+00B3
´	U+00B4
·	U+00B7
º	U+00BA
»	U+00BB
¿	U+00BF

Note: See Future Tasks section for additional Unicode characters

Word

A single “Word” is defined by consecutive line of strings that have a SEPARATOR as a delimiter.

Sentence

A single “Sentence” is defined by a string a of letters/words that have '.' as a delimiter.

Paragraph

A “Paragraph” is defined by a string of letters/words/sentences that have a line break (¶) as a delimiter.

Text Selection in Detail

Word

A single “Word” is selected by double-clicking it. The cursor therefore must be located within or in front of one of the word's letters. If the cursor is located behind the last letter the next word gets selected. If there is no next word the previous one gets selected.

When holding down the CTRL-key when double-clicking the selection gets added to an already existing text selection. If there is no existing text selection than the modifier has no effect.

Sentence

A single “Sentence” is selected by triple-clicking it. The cursor therefore must be located within or in front of one of the sentence's letters/words. If the cursor is located behind the last letter the next sentence gets selected. If there is no next sentence the previous one gets selected.

When holding down the CTRL-key when triple-clicking the selection gets added to an already existing text selection. If there is no existing text selection than the modifier has no effect.

Paragraph

A single “Paragraph” is selected by quadruple-clicking it. The cursor therefore must be located within or in front of one of the paragraph's letters/words/sentences. If the cursor is located behind the last letter the next paragraph gets selected. If there is no next paragraph the previous one gets selected.

When holding down the CTRL-key when quadruple-clicking the selection gets added to an already existing text selection. If there is no existing text selection than the modifier has no effect.

“Rotation” Mode

With OO.o 2.0 a new “Rotation” mode will be introduced:

If the users misses a double-, triple- or quadruple-click by clicking too fast the fifth click will become a new single-click and the counting starts all over. Due to this “rotating” (hence the term “Rotation” mode) the user get a second (third, fourth etc.) chance to achieve the wanted selection.

So the fifth click becomes a (new) single-click, the sixth consecutive click becomes a (new) double-click and so forth.

Table selection in General

Writer will add the feature of simple selection of complete rows, columns or all cells of Writer-tables by needing only a single mouse-click.

If a table already inhibits a selection this selection will be automatically replaced by a complete row/column selection. This way a user does not need to first click outside the selection and then invoking the simple selection of complete rows/columns.

Therefore hot-spots for clickable area around the writer table will be introduced. To visualize these hot-spots to the user the cursor look will change.

The maximum expansion for all selection areas (blue rectangles/squares) is 8 pixel in X- and/or 10 pixel in Y-direction. The selection area will never clip the to-be-selected table by 2 pixels (red rectangles).

In case there are objects or text that cut into the maximum expansion selection area the selection area will always shrink until it does not interfere with these objects/text anymore. See Special Cases section for more details.

Note: For tables in a vertical environment the selection methods have to applied analogous to their horizontal layout tables. So a selection of a row in an R2L table equals to column selection in vertical tables and the selection of a column in a horizontal tables equals to the selection of row in a vertical table.

Table Selection - All

The hot-spot area for selecting a whole table is always on the upper left corner for LTR-tables, the upper right corner for horizontal and vertical RTL-tables .

The maximum expansion for this area (blue square) is 8 pixel in X- and 10 pixel in Y-direction. The selection area will not clip the table's corner by 2 pixels (for details, see Figure 1 on page 7 and the “Vertical Table adjustment w/ Mouse” specification [link]).

Max caption area 8 x 10 px Figure 1 Magnified visualization of full table selection area

Table Selection – Rows

The hot-spot area for selecting a complete row is in the area in front of the to-be-selected row. In LTR-tables this is on the left side, in RTL-tables this is on the right side.

The maximum expansion for this area (blue rectangle) is 8 pixel in X-direction and the complete row's height in Y-direction. The selection area will not clip with the selection handle area of 2 pixels (for details, see Figure 2 on page 8 and the “Vertical Table adjustment w/ Mouse” specification [link]).

Figure 2 Magnified visualization of horizontal selection area

Table selection – Columns

The hot-spot area for selecting a complete column is in the area on top of the to-be-selected column. There are special positions for LTR- and RTL-tables.

The maximum expansion for this area (blue rectangle) is 10 pixel in Y-direction and the complete column's width X-direction. (for details, see Figure 3 on page 9 and the “Vertical Table adjustment w/ Mouse” specification [link]).

This is dummy text above a simple table. This is dummy text above a simple table. This is dummy text above a simple table. This is dummy text above a simple table.

Caption area max 10 px. high Figure 3 Magnified visualization of vertical selection area

Expanding selection – Rows and Columns

In case the user continues to hold down the mouse button after do row or column selection the selection range will start to span over the area of the movement.

Selection area spans to the complete Y-axis while distance in X-axis to table is of no matter.

Example: The user selects a single row and continues to move the mouse vertically downwards the table's rows. In this case these rows will be added to the already made selection, allowing the user to multi-select rows.

The same in horizontal movement works for columns. Selection area here spans to the complete X-axis while distance in Y-axis to table is of no matter.

Special Cases #1

In case of complex table layouts with merged and/or split cells the selection must be defined. See table example below:

In case of column selection OO.o 2.0 will use the already implement advanced algorithm to select columns in merged/split cells in tables. If you click above the table you'll select the same cells you would select if you click into the first cell below your mouse position and then call context menu column/select.

In case of row selection there are no defined selection methods available, yet.
In case a row is selected all cells with the same first number like the cell just right the mouse position are part of this selection. In the below example one could either select all cells with number x1.n.n (A1.1.2, B1.1.1, B1.2.2 etc.) or all cells with number x2 (like B2, D2, E2 etc.):

A1.1.1 A1.1.2 A1.1.3	B1.1.1 B1.2.1 B1.1.2 B1.2.2
A2	B2	C2	D2	E2

Special Cases #2

In case the surrounding objects/text will cut into the defined selection areas the selections area will shrink until they are 2 pixel wide.

Any further shrinking will result in adding the caption area for table size adjustment to the caption area for selection (see the “Vertical Table adjustment w/ Mouse” specification [link]). This way re-sizing the table with the mouse is disabled but can till be achieved by using the “Format Table” dialogue.

Visually spoken this means that the red (Caption for size adjustment) areas in Figure 1 on page 7, Figure 2 on page 8 and Figure 3 on page 9 will turn into blue (Caption) areas.

Example: The text above a table is very close to the tables first row. The space in between the first row and the paragraph above is only 2 pixels in height. Thus the former defined caption area for column selection is completely vanished. Moving the cursor now over the upper border line of the first row will not allow mouse height adjustment anymore but will become the new column selection area for this table. The row height can still be adjusted via (context) menu.

Special Cases #3

Since with OO.o 2.0 tables in tables feature will be implemented the behaviour for this also has to be defined:

There will no option to select complete row and/or columns for tables that are nested in tables. Only the parent/most superordinate table will have this feature.

In case the table-in-table is located within a cells that is selected as part of a row, column or table selection the whole table-in-table will be selected.

For further information on this feature please refer to “Table in tables” specification at http://specs.openoffice.org/writer/tables/table_in_table.sxw

New Cursors

Five new cursors have to be introduced:

	A horizontal, left-to-right arrow for selecting rows of L2R tables
	A horizontal right-to-left arrow for selecting rows in horizontal R2L tables and columns in vertical tables
	A vertical top-to-bottom arrow for selecting columns in horizontal tables and rows in vertical tables
	A diagonal, top-left-to-low-right arrow for selecting whole L2R tables
	A diagonal, top-right-to-low-left arrow for selecting whole R2L tables (horizontal and vertical)

Note: These cursors must be designed by Stella Schulze. Please create a task.

Tool Tips

When hovering with the mouse over a selection area a tool tip will be displayed.

For column selection area:	Select table column

For row selection area:	Select table row

For whole table selection area:	Select whole table

String List

Item	English	German	Comments
Tool tip	Select table column	Tabellenspalte auswählen	
Tool tip	Select table row	Tabellenzeile auswählen	
Tool tip	Select whole table	Ganze Tabelle auswählen	

Error Conditions

N/a

Future Tasks

The below characters are all Unicode one and need to be added to the list of SEPARATOR characters.

Character	Unicode indentifier
˝	U+02DD
;	U+037E
΄	U+0384
·	U+0387
–	U+2013
—	U+2014
―	U+2015
‗	U+2017
‘	U+2018
’	U+2019
‚	U+202A
‛	U+202B
“	U+202C
”	U+202D
„	U+202E
•	U+2022
…	U+2026
‰	U+2030
′	U+2632
″	U+2633
‹	U+2639
›	U+263A
‼	U+263C
‾	U+263E
⁄	U+2644
₣	U+26A3
₤	U+26A4
₧	U+26A7
€	U+26AC
℅	U+2105

Notes

References

none

Text/table selection enhancement

Page 12

Http://specs.openoffice.org/writer/selection_enhancement/Text-table_selection_enhancement.sxw

Text/table selection enhancement

Falko Tesch

2004-03-12T14:16:39