Right-to-Left Canvas for Calc

OO.o 1.1/2.0

Task ID(s)

none

Category	Specification Affects

<Other>

Abstract

The “RTL market” (Arabic, Hebrew and Urdu) uses right-to-left scripting.

To accomplish this requirement by those markets this has to be taken in account. Consequently not only documents, rulers have to be right aligned also the document canvas must follow this rule.

For spreadsheets, better tables, this results in a mirrored table grid (cell A1 is now top right).

This specification will take a look not only at a mirrored document canvas but on all related and deduct features.

Related iBis task: 106948

Feature Team

Specification Owner	Falko Tesch	falko@sun.com
Marketing Contact	Waleed Hosny	waleed.hosny@sun.com
User Experience Contact	Falko Tesch	
Development Contact	Niklas Nebel	niklas.nebel@sun.com
Quality Assurance Contact	Oliver Crämer	oliver.craemer@sun.com
Documentation Contact	Frank Peters	Frank.Thomas.Peters@Sun.COM

Document History

Version	Author	Comment
Draft May 5th, 2003	Falko Tesch	rewrite of existing spec + additions
Specification Review	Waleed Hosny	
UI String Review <Date>		
Final 19.01.2004	Falko Tesch	

Contents

Glossary	1

References	1

1	Motivation	1

2	Goals	1

3	Dependancies	1

3.1	Technical Dependancies/Requirements	1

4	Detailed Specification	1

4.1	Default behaviour and settings	2

4.1.1	Invocation	2

4.1.2	Default Settings	3

4.1.3	File Format Changes	4

4.2	General UI change	4

4.3	Detailed behaviour and effects	5

4.3.1	Cursor Movements	6

4.3.2	AutoFilter Controls	6

4.3.3	Notes	6

4.3.4	Cell Handles	6

4.3.5	Scenarios	7

4.3.6	Mirroring Framed Cell Areas	7

4.3.7	Spacing To Grid Lines	7

4.3.8	Anchoring	8

4.4	String List	8

4.5	Error Conditions	8

5	Future Tasks	9

6	Legal Issues	9

7	Notes	9

Glossary

Term	Description
RTL	right-to-left
LTR	left-to-right
Document canvas	Area where the document resides on, not to mistaken with UI
OS	operating system

References

This spec is a spin off of Dialogue_Changes_Calc.sxw spec.

Motivation

Without a RTL spreadsheet canvas OpenOffice.org lacks a major competitive feature on the markets affected.

Goals

Opening and editing a Calc spreadsheet in RTL mode must fulfil all specifications from this document. Special attention must be paid to possible illogical object behaviour such as notes' direction, context menus of filters etc.

Special attention must be given to all windows that open in a certain direction. They must not mask any data that would otherwise (in LTR environment) be visible.

Dependancies

Technical Dependancies/Requirements

RTL canvas is only available with CTL support turned on (“Tools - Options - Language Settings - Languages”). Its activation depends the following conditions:

The OS or the OpenOffice.org locale is set to Arabic, Hebrew or Urdu and RTL canvas is enabled (default with these locales)

The RTL canvas is enabled in “Tools - Options - Languages Settings - Complex Text Layout”

A spreadsheet/table formatted with a RTL canvas is opened in OpenOffice.org. This must be independent from CTL support status.

Detailed Specification

Pre-condition
All options/functionality within this spec is only visible if CTL-support is enabled under “Tools - Options - Language Settings - Languages”!

The specification is divided in 4 sections:

Section 4.1: Default behaviour and settings

Section 4.2: General UI change

Section 4.3: Detailed behaviour and effects

Section 4.4: String List

Section 4.5: Error Conditions

Default behaviour and settings

This section describes the first steps of how and where to invoke the RTL canvas as well as its default setting based on the selected/given locale environment and file format descriptions.

Cell Travelling always visual! Not affected by setting1

Invocation

Top invoke the RTL canvas the user has to move into the “Format” menu in Calc. Selecting the new menu-entry called “View Right-To-Left” (see Figure 1 1 1) will toggle the desired view on the selected sheet(s).

NOTE
In the current version of Calc 6.1 there are no entries in case of multiple selected sheets. Since “Hide” makes also sense with multiple sheets it is advised to enable, apart from “View Right-To-Left”, this entry also when multiple sheets are selected (“Rename” though must stay hidden).

Normally this will apply to the current active (visible) sheet of the user's spreadsheet only but in case of multiple sheet selection it will also effect the (hidden) selected ones, too.

As a second option to toggle the view the user can choose this via existing right-click context menu on sheet tabs (see Figure 2).

The functionality is analogue to “Format - Sheet – Right-To-Left”.

Note: Even if CTL support is not enabled in OpenOffice.org this entry will be visible (de-active of course) when under “Tools -Options – OpenOffice.org – View -Inactive menu items” is activated (default setting).

Menu structure:

Format
.....

Sheet --->	Rename
.....	Hide
Right-to-Left

Figure 1 1 View Sheet Selection (RTL) #1

Figure 2 View Sheet Selection #2

Default Settings

The initial view direction of sheets depend on the OpenOffice.org's locale, see matrix below.

Locale	Calc
Operating System	SO/SS	Default Canvas View*
Arabic (all flavours)	Default	RTL
Hebrew	Default	RTL
[various]	Arabic (all flavours)	RTL
[various]	Hebrew	RTL
[irrelevant]	other than Hebrew/Arabic	LTR

* for all sheets of a spreadsheet

NOTE
This matrix applies to every newly created spreadsheet in OpenOffice.org.
Default setting always affects all sheets of a spreadsheet.

File Format Changes

Since the sheets are part of the file format and therefore saved in it it will also effect opening the spreadsheet in OpenOffice.org 6.y or higher as well as in OpenOffice.org 6.0/6.1.

(If a spreadsheet does not contain any view formatting XML tags - like spreadsheets created in Calc 6.0/6.1 - than LTR view is assumed)

Open spreadsheet in 6.y or higher:

All sheets will be displayed the way they were formatted. If no CTL support is enabled in target office the the user will not have the (UI) opportunity to change the sheet's canvas direction.

Saving the spreadsheet in such environment will leave the view statuses unaltered.

Open spreadsheet in 6.0/6.1:

Since 6.0/6.1 whether have the formatting nor the displaying capabilities for a RTL viewed sheets open such spreadsheet in 6.0/6.1 will result in fully LTR viewed spreadsheet.

Due to technical reasons saving such document in Calc 6.0/6.1 will reset all RTL view attributes by simply erasing them from the XML stream.

General UI change

Changing the canvas view from LTR to RTL will lead to a general UI change. This chapter will illustrate these changes (see also Figure 3).

NOTE
The general UI change only affects selected, changed sheets. Therefore it is possible that LTR and RTL views are mixed in a single spreadsheet (w/ multiple sheets)

For detailed changes on formatting within sheets please refer to Detailed behaviour and effect.

Spreadsheet Grid Direction
The spreadsheet grid will mirror, i.e. cell A1 will be positioned from the upper left to the upper right. Alphabetical counting will read from right-to-left [ ... F E D C B A ]
(see also  in Figure 3)

Document Scroll Bar
The document scroll bar will align left
(see also  in Figure 3)

Sheet Tabs & Movement Buttons
Sheet Tabs & Movement Buttons will move from the lower left to the lower right and their order will be mirrored.
(see also  in Figure 3)

Split View Adjustment Handles
The horizontal Split View Adjustment Handle will move form upper right to upper left and the vertical one from
Figure 3 RTL sheet view of canvas

Detailed behaviour and effects

Changing the sheet canvas to right-to-left view has many effects. This chapter will list them and discuss effects and outcomes in detail.

things that change are...

Cursor Movements

AutoFilter Controls

Notes

Cell Handles

Scenarios

Anchoring

DataPilot

Cursor Movements

Part 1:

Cursor Movement (TAB) within Cells will change from right-to-left to left-to-right movement.

Cursor Movement (SHIFT + TAB) within Cells will change from left-to-right to right-to-left movement.

Cursor Movement (POS1) within Cells will change from jump to left to jump to right.

Cursor Movement (END) within Cells will change from jump to right to jump to left.

Part 2:

Since every sheet has its own canvas direction it is possible that switching from one sheet to another that cursor focus will need to “jump”.

Example: User toggles in between a RTL and a LTR canvas sheet. This is done by clicking on the sheets tabs. in RTL mode the tabs are located lower right and in LTR mode tabs are located in lower left.

To avoid unnecessary mouse movements and confusion the cursor focus must stay focus with the activated tab. In other words the cursor will jump from left to right/right to left.

Note: Refer to Excel XP to see this in action.

AutoFilter Controls

AutoFilter controls have to appear left-aligned. Scrollbars also have to be left-aligned and the content of the list box must be right-aligned. (see  in Figure 4)

Notes

Notes' callouts must be left orientated. Their anchor point in cells (the “little red dot”) must be located in the upper left corner of the cell. Notes' drop shadow must not change and sty with a imaginary light source from top left. (see  in Figure 4)

Cell Handles

Cell handles (used to expand cell content over other cells) must be located in the lower left corner of a cell. (see  in Figure 4)
Figure 4 View of AutoFilter in RTL sheet

Scenarios

Like in AutoFilter controls also Scenario controls and list-boxes must be left-aligned in cell. Scrollbar, text alignment etc. must behave like in AutoFilter Controls (see Figure 5).
Figure 5 Scenario in RTL Sheet

Mirroring Framed Cell Areas

When framing (using “Format - Cell - Border”) cell areas that spread over more than one column changing the sheet canvas from RTL to LTR and vice versa must not destroy the frame border around the cell area.

Example: A cell area (co-ordinates: A1, A2, B1 and B2) is bordered with a simple black line on a LTR canvas. This way all four cells have different borders formatted:

	A	B
1		
2		
LTR Sheet Canvas Cell A1 has a border line left and top

Cell A2 has a border line left and bottom

Cell B1 has a border line right and top

Cell B2 has a border line right and bottom

Now the user decides to switch the canvas from LTR to RTL.

To accomplish the initial formatting of having a black border line around this cell area the cell's individual border formatting has to change (changes highlighted in blue):

B	A	
		1
		2
RTL Sheet Canvas Cell A1 has a border line right and top

Cell A2 has a border line right and bottom

Cell B1 has a border line left and top

Cell B2 has a border line left and bottom

Spacing To Grid Lines

Spacing To Grid Lines (“Format - Cell - Alignment”) is defined by distance to the left, right, bottom and top. since those values are all absolute values there will be no change when changing sheet canvas from RTL to LTR and vice versa.

Example: A distance of 5 mm to the right gird line of a cell will still be 5 mm to the right when changing from RTL to LTR canvas.

Anchoring

If an object (graphic, drawing, OLE etc.) is inserted into a RTL canvas sheet (anchored to a cell) the anchor must sit in the upper right corner of the cell. The object itself must align left to the anchor and expand to the left. (of objects etc., see  in Figure 6)
Figure 6 Inserting an object into RTL sheet

String List

Item	English	German	Comments
“Format - Sheet” menu / Calc	R~ight-To-Left	Rechts-nach-links	n/a
Right-click context menu on sheet tabs / Calc	S~heet Right-To-Left	Tabelle Rechts-nach-links	n/a
Undo String	Flip sheet	Tabelle wenden	
Slot String for SCM	Sheet right-to-left	Tabelle rechts-nach-links	

Error Conditions

All existing error conditions can be used. No changes required.

Future Tasks

n/a

Legal Issues

n/a

Notes

n/a

Right-to-Left Canvas for Calc

Page 7

/home/ft93697/Documents/Specs_CVS_root/g11n/Right-to-Left_Canvas_for_Calc/Right-to-Left_Canvas_for_Calc.sxw

Falko Tesch

2003-05-05T14:40:50