Calc Cell Property “Shrink To Fit”

OpenOffice.org 2.0

Document - ID	Specification Owner	Last Change	Status
	Daniel Rentz	2004-03-10	Final
Conforms to	StarOffice Specification Workflow v0.1, Aug 2003
Applies to	Calc, API
Task ID(s)	i6925, i22639, i22640, i22641, i22642, i22643
Category	Feature

Abstract

To increase compatibility to Microsoft Excel, Calc needs the new cell property “Shrink to fit”. It will shrink the cell content to fit into the current size of the cell.

This specification will define how Calc will implement this feature.

i-Team Members

	Name	E-mail Address
Specification Owner	Daniel Rentz (dr)	daniel.rentz@sun.com
User Experience	Falko Tesch (ft)	falko@sun.com
Development	Daniel Rentz (dr)	daniel.rentz@sun.com
Quality Assurance	Oliver Crämer (oc)	oliver.craemer@sun.com
Documentation	Frank Peters (fpe)	fpe@sun.com

Approved for Implementation

	Approved by	Date
User Experience	Falko Tesch	2003-12-16
Development	Daniel Rentz	2003-11-19
Quality Assurance	Oliver Crämer	2003-12-18
Documentation	Uwe Fischer (ufi)	2004-03-10
String Review	Elizabeth Matthis (em)	2004-03-09

Document Change History

Rev. Level	Change	Initials	Date
1.0	Initial version	dr	2003-11-19
1.1	First UE review	ft/dr	2003-12-04
1.2	Second UE review, QA review, Chart/Database additions	ft/oc/dr	2004-01-07
1.3	String review	em	2004-03-09

Contents

Abstract	1

i-Team Members	1

Approved for Implementation	1

Document Change History	1

Glossary	1

1	Motivation	1

2	Goals	1

3	Requirements and Dependencies	1

3.1	Requirements	1

3.2	Technical Dependencies	1

4	User Scenarios	1

5	Competitive Analyses	2

6	Detailed Specification	3

6.1	Functionality	3

6.2	User Interface	3

String List for “Format – Cell – Alignment” Tab Page	5

Notes	5

Redesign of the “Format – Cells – Borders” Tab Page	6

Changes in Chart Format Dialogs	7

Changes in Database Format Dialogs	7

Tab Order	7

Key Board Shortcuts	7

6.3	Error Conditions	7

7	Future Tasks	7

8	Legal Issues	7

9	Notes	8

10	References	8

Glossary

Term	Description

Motivation

Enhancing Ease-of-Use as well as easing the learning curve for MS Excel users and enhancing the user's abilities to use their MS Excel documents.

Goals

Interoperability with MS Excel documents.

Ease-of-Use with Excel. It is mandatory that the users finds a comparable interface within the same interface structure as in Excel.

Consistency. Although this feature should be Excel-user compatible it must fit seamlessly into the existing Calc user interface and naming conventions/glossary.

Requirements and Dependencies

Requirements

This feature will allow users to easily adopt their skills on working with MS Excel spreadsheets to migrate to Calc.

Technical Dependencies

None.

User Scenarios

A user that enabled this feature in Excel will get irritating results on his spreadsheet layout when opening his spreadsheet in Calc.

Another user who migrates from Excel to Calc might be used to format his cells the way to shrink its content to fit and will not find this feature in Calc. This will raise the reluctance to switch and adopt Calc in his day-to-day work.

Competitive Analyses

Microsoft Excel contains this option in the Format – Cells – Alignment tab page:

Illustration 1: The Alignment tab page in Microsoft Excel For technical details see chapter 6 “Detailed Specification“.

Detailed Specification

Functionality

Illustration 2: The new cell property “Shrink to fit” in action The new cell property “Shrink to fit” shrinks the cell contents until they fit into the current cell size. This is done by decreasing the font size. If one cell contains texts in different font sizes, they will shrink proportionally to each other. For instance: A cell containing text with 20pt and 16pt parts may shrink to 10pt and 8pt parts. Text will never be shrunken below a size of 1pt. If the text is still too long to fit into the cell, it will overlap it. The property will work for value and formula cells, and for single lined text cells. Cells with automatic line breaks or hard line breaks are not changed.

The “Shrink to fit” property will work together with rotated cells and vertically stacked cells.

User Interface

The new property will be represented by a check box labeled “Shrink to fit cell size” in the tab page “Format – Cells – Alignment”. The check box will only be enabled, if the “Automatic line break” check box is unchecked.

Illustration 3: Old design of the “Format – Cells – Alignment” tab page With the current layout of the “Alignment” tab page it would be hard to find space for a new check box in the “Properties” section. Therefore the entire tab page needs further redesign. The basic idea to make space is to move the “Spacing to grid lines” fields to the “Format – Cells – Borders” tab page. This would be an improvement of consistency between Calc and Writer, because the cell format dialog of Writer already shows these fields there (see below for details about that tab page).

In the following redesign there are additional changes in the “Text direction” section, shown with the green arrows. The toggle button “ABCD” has been replaced by a check box “Vertically stacked”. This replacement has several advantages:

Toggle buttons are rarely used and may cause confusion to the user.

A check box can represent the “don't know” state if two cells with different attributes are selected.

The “Use Asian vertical layout mode” can be placed indented to the “Vertically stacked” check box to show its dependency.

Illustration 4: Redesigned “Format – Cells – Alignment” tab page This leads to the other change in this section. The check box “Use Asian vertical layout mode” can be simplified to “Asian layout mode”, which makes it easier to realize.

Additionally, the fixed line “Text direction” changes to “Text orientation”, the check box “Automatic line break” changes to “Wrap text automatically”, and the list box label “Text flow” changes to “Text direction”.

Illustration 5: Enabling the new check box If the new “Shrink to fit cell size” check box is enabled, is dependent on the “Wrap text automatically” check box.

String List for “Format – Cell – Alignment” Tab Page

Item	English	German	Comments
New check box	Ve~rtically stacked	~Senkrecht gestapelt	Was old toggle button “ABCD”; also in Chart under Format – Title – [any title] – Alignment, Format – Axis – [any axis] – Label
Check box	Asian layout ~mode	Asiatischer ~Layoutmodus	Old text: “Use Asian vertical layout mode”
New check box	~Shrink to fit cell size	~An Zellgröße anpassen	
Group heading	Text orientation	Textorientierung	Was “Text direction” in Calc under Format – Cell - Alignment
Check box	Wrap text automatica~lly	Automatischer Zeilenumbru~ch	Was “Automatic ~line break” in Calc under Format – Cell – Alignment; Ease of use 47; German string unchanged
List box label	Te~xt direction	Te~xtrichtung	Was “Te~xt flow” (“Te~xtfluss”) in Calc under Format – Cell - Alignment

Notes

The “Asian layout mode” is only visible, if CJK support is switched on (in “Tools – Options – Languages”).

The “Text direction” list box is only visible, if CTL support is switched on (same place in the options dialog).

Redesign of the “Format – Cells – Borders” Tab Page

Illustration 6: Old design of the “Format – Cells – Border” tab page The border margin fields from the old Format – Cells – Alignment tab page will be moved to the Format – Cells – Borders tab page. Due to the new context the title of the fields will change from “Spacing to grid lines” to “Spacing to contents”. This will make this tab page look equally to the tab page used in the Writer table formatting dialog.

Illustration 7: Redesigned “Format – Cells – Border” tab page

Changes in Chart Format Dialogs

Two tab pages in chart dialogs have to be changed to keep consistency. These tab pages also contain a toggle button for stacked text. They will be changed the same way by using a check box.

Two chart tab pages are affected:

Format – Title – [any title] – Alignment

Format – Axis – [any axis] – Label

Changes in Database Format Dialogs

The Alignment tab page used in the database browser is the same as used for Calc cell formatting. The only purpose of the tab page is to set the horizontal alignment of a data column. All other functionality of the tab page is disabled, but the controls are not hidden. New behaviour will be to hide any control that is not used. Only the horizontal fixed line “Text alignment” at the top, and the “Horizontal” list box will be visible.

A possible way to reach this tab page is:

F4 – Bibliography – Tables – biblio – [select any column] – [context menu] – Column Format – Alignment.

Tab Order

New entries or entries with changed tab order are shown italic.

“Format – Cells – Alignment” tab page in Calc:

Horizontal – Indent – Vertical – Degrees – Reference edge – Vertically stacked – Asian layout mode – Wrap text automatically – Hyphenation – Shrink to fit cell size – Text direction.

“Format – Title – [any title] – Alignment” tab page in Chart:

Degrees – Vertically stacked.

“Format – Axis – [any axis] – Label” tab page in Chart:

Show labels – [other old unchanged controls] – Degrees – Vertically stacked.

“Column Format – Alignment” tab page in database browser:

Disabled controls are now hidden, no change in tab order.

Key Board Shortcuts

See shortcuts in the string list above. Other global shortcuts will not be added.

Error Conditions

None.

Future Tasks

None.

Legal Issues

None.

Notes

None.

References

OpenOffice.org issue: http://www.openoffice.org/issues/show_bug.cgi?id=6925

PCD-ID: MSInteroperability-8

Calc Cell Property “Shrink To Fit”

Page 8

http://specs.openoffice.org/calc/compatibility/shrinktofit.sxw

Calc Cell Property "Shrink To Fit"

Daniel Rentz

2003-09-24T12:39:05

Matthias Müller-Prove