Assigning Styles

OpenOffice.org 2.0

Document - ID	Specification Owner	Last Change	Status
	Frank Loehmann	2/17/05	Final
Conforms to	
Applies to	OpenOffice.org Writer, Calc, Draw, Impress
Task ID(s)	I20876, 81468
Category	Feature

Abstract

The Styles control of the Text Object Bar offers a set of common used styles – like Headings 1 to 3 – even if they are not currently used in the document. The Styles control can also be used to define new paragraph styles based on the current selection. The relation of the Styles control and the “Styles” tool window – which used to be the “Stylist” in OOo1.1) – is more tight. This is done by adding command items to the Styles control to open the “Styles” tool window. The commands to remove styles are aligned between Styles control and the Format menu, respectively the text context menu.

i-Team Members

	Name	E-mail Address
User Experience	Frank Loehmann (FL)	Frank.loehmann@sun.com
	Matthias Müller-Prove (MMP)	mprove@sun.com
Development	Oliver Specht (OS)	Oliver Specht
Quality Assurance	Stefan Baltzer (SBA)	Stefan.baltzer@sun.com
Documentation	Frank Peters	Fpe@sun.com

Approved for Implementation

	Approved by	Date
User Experience	Frank Loehmann	10/27/2003
Development	Oliver Specht	10/27/2003
Quality Assurance	Stefan Baltzer	10/27/2003
Documentation	Frank Peters	10/27/2003
String Review	Elizabeth Matthis	10/17/2003 preliminary review and back to FL for more information
String Review	Elizabeth Matthis	11/07/2003

Document Change History

Rev. Level	Change	Initials	Date
1.0	Convert specification into new layout	FL	09/11/2003
1.1	Review by MMP	MMP	09/15/03
1.2	Work on review comments and other small corrections	FL	09/16/03
1.3	Work on review comments from FPE	FL	09/17/03
1.4	Work on deatils for spelling text with objects within a sentence.	FL	09/19/03
1.5	Mention that Calc also has a styles drop down and will also get basic set of features	FL	21/09/03
1.6	Last changes, read for translation	FL	10/16/2003
1.7	Clear Formatting definition	FL	10/21/2003
	Review by MMP. several minor issues. New Abstract. Notes MMP-5	MMP	22.10.03
1.8	Work on comments from MMP	FL	10/23/03
1.9	Change Menu Entry and Clear Formatting behavior	FL	11/10/03
2.0	Removing Shortcut Definition	FL	05/24/04
2.1	Menu "Default Formatting" conforms to Format menu redesign.	MMP	02.08.04
2.2	Made some small corrections (see redlining)	FL	12/21/04
2.3	Add blooper description for new context in Format - Default Formatting behavior	FL	12/21/04
2.4	Made some corrections during spec. to implementation review	FL	01/05/05
2.5	Change German translation of Styles and Formatting to align with de.dev.ooo community decision	EM	02/17/05
2.6	Change shortcuts	FL	09/13/07
2.7	Add Ctrl+F11 shortcut to set focus in styles combo box	FL	09-05-08
2.8	New Shortcut for Standard Format (#88582)	FL	09-15-08

Contents

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	2

5	Competitive Analyses	2

5.1	Microsoft Word	2

6	Detailed Specification	3

6.1	Extended Set of Paragraph Styles in Writer	3

6.2	Extended Set of Cell Styles in Calc	4

6.3	Extended Features of Styles Control in Writer and Calc	4

6.4	New Format-Clear Formatting and Format - Default Formatting Behavior for Writer, Calc, Draw and Impress	5

6.4.1	Functional Description for Clear Formatting and Format Function for Writer:	5

6.4.2	Format - Default Formatting Function Works as Follows (#i39388):	5

6.4.3	Clear Formatting Function iWorks as Follows:	5

6.4.4	Functional Description for Calc, Draw and Impress	5

6.5	Main Menu Definition	6

6.6	Styles and Formatting Window /Styles and Formatting Function	6

6.7	Keyboard Shortcuts for Writer (BugId i29441)	7

7	Future Tasks	7

7.1	Keyboard Shortcuts for Writer (BugId i29441)	7

7.2	Not covered due to high effort:	7

7.3	Extended Set of Paragraph Styles in Writer (i39932)	7

8	Notes	7

8.1	Addressed Issues	8

9	References	9

Glossary

Term	Description
Style	Named collection of attributes for a certain object. One style could be assigned to more than one object, this enables the possibility of changing attributes centralized.
Styles control	A control field in OOo to apply styles to the selected object – either text in Writer or cells in Calc. The Styles control is a combo box control. It used to be a drop-down list box in OOo 1.1.
Styles and Formatting window	The Styles tool window of OOo

Motivation

Assigning and removing styles (mainly paragraph styles) is hard to find in OpenOffice.org Writer 1.1, because the Paragraph Styles control in the text object bar does not offer a preset of useful styles. The drop-down list of the control only shows styles which are already in use in the current document. Hence only the “Default” style is shown in a blank Writer document.

Competitor offers a set of most common templates in this control field. Furthermore it is an entry point to define new styles and to reset formatting (remove direct “hard” formatting).

Goals

The following goals have to be achieved:

Improve functionality and usability of toolbar functionality and styles

Centralization of style functionality in toolbar

Improve keyboard accessibility for Paragraph Styles control

Requirements and Dependencies

Requirements

Add keyboard shortcuts for

Heading 1 ... 3 paragraph style

Default paragraph style

Centralize formatting features in object bar

Adopt wording of competition

Technical Dependencies

The Styles control in the object bar is only present in Writer and Calc. In Calc it is even not visible by default, but it could be configured on demand.

Please note: Changes for the object bar behavior and definition are planned for Q. Owner of this feature is Christian Jansen (CJ). (see References)

Falko Tesch owns a Q-PCD task to develop a format paint brush for OOo 2.0.

Shortcuts should not be hard coded. Carsten Driesner is working on a new Tools-Configure dialog for OOo 2.0, but it is not sure if this will cover this functionality.

User Scenarios

User starts writing of a new document using a template or blank new document.

The user could not choose/assign a heading style in a GUI element already visible on the screen to start writing a structured document, because often the Styles and Formatting window had already been closed when it appeared on first program start of OO.org. The user does not know how to call the now needed Styles and Formatting window himself, nor that he is aware that he needs it to assign a paragraph style.

Furthermore the user is only used to choose a paragraph style via the Paragraph Style control in the object bar from competing products.

Even when writing documents without a structure, the user is not able to assign the Text Body style in the given standard UI when he once had closed the Styles and Formatting window. Due to this he has to work with empty paragraphs between paragraphs, because the default style does not define spacing between paragraphs and many users do not know how to adjust this.

User writes huge documentation and is used to assign paragraph styles via keyboard. OO.org does not offer this possibility and the only possibility to do so, is to write a macro which assigns the style and assign this macro to a shortcut. User is not used to write/record macros nor to assigns shortcuts to those.

Future task due to new possibility of assigning shortcuts to styles.

Competitive Analyses

Microsoft Word

This competitor offers a WYSIWYG preview of styles in the drop-down list of the paragraph styles control in the object bar. Furthermore “Clear Formatting” allows to remove hard/direct formats from a selection to reset to paragraph formats given in the assigned paragraph style. If no text is selected, the current paragraph will be set to the Normal paragraph style by choosing “Clear Formatting” from the control field.

A “More...” entry leads the user to a style pane, where the user could find more styles than already listed in the paragraph styles control field. Furthermore the style pane could be called by a button on the left side of the paragraph style control field. Hard attributes will be shown like “Normal + Bold” if they are valid for the complete paragraph. Word also allows more than one paragraph style in a paragraph. Then the paragraph style will be used as a character style.

Illustration 1 Word XP object bar with Styles control

Please note: OOo 1.1 already has a very similar function for removing hard (direct and character style based) formatting from paragraphs and text content. The following table gives a short overview about “Clear Formatting” (MS) and “Format – Standard” (OOo 1.1):

Selection	Word “ Clear Formatting”	OOo1.1 “Format-Default”
No selection	Set “Normal” paragraph style	Clear hard paragraph formatting and hard character formatting if cursor is placed in a word
Part of paragraph	Clear hard character formatting	Clear hard character formatting of current selection
Partly selection of more than one paragraph	Clear hard formatting in selection and set Normal paragraph style	Clear hard character formatting of selection and hard paragraph formatting of selected paragraphs
Complete paragraph	Clear hard formatting in selection and set Normal paragraph style	Clear hard paragraph and character formatting at once

Microsoft Word functionality is limited for advanced users using styles, but may have an advantage by setting the “normal” style for the normal user, because he might not be able to get rid of current assigned paragraph style (e.g. a heading).

Detailed Specification

This chapter specifies the changes between OOo 1.1 and OOo 2.0 for reaching the defined goals.

OOo supports one paragraph style per paragraph. Character styles and hard (direct) formatting could override paragraph style formats.

Extended Set of Paragraph Styles in Writer

The default set of styles in the Styles control in the text object bar is as follows (control content is sorted alphabetically):

Default

Heading 1

Heading 2

Heading 3

Text Body

+ all paragraph styles assigned in the current document.

Note: OOo 1.1 contains a bug. Due to this bug all parent styles of an assigned style will also be shown in the Styles control. This should no longer be the case for OOo 2.0.

Extended Set of Cell Styles in Calc

The following cell styles will be shown as default in Calc: (control content is sorted alphabetically)

Default

Heading

Heading1

Result

Result2

+ all cell styles assigned in the current spreadsheet and all styles which have been used in current document during current runtime regardless, if they are currently assigned to a cell.

Extended Features of Styles Control in Writer and Calc

The combo box control, “Clear Formatting” and “More...” feature is also valid for Calc. The shortcut CTRL+F11 set the focus into the combo box.

A new entry “Clear Formatting” will be added as the first entry in the Styles control, separated by a divider line. The functionality of this item is described in the next section.

Illustration 2 The Styles combo box in OO.org 2.0 offers an auto complete after user has entered a “D” via keyboard

At the end of the item list of the Styles control a new entry “More...” will be added. If chosen, the Styles and Formatting window will be opened and the style group will be set to paragraph styles. If the Styles and Formatting window was docked and hidden, it will we shown. This list entry is always visible, even if the Styles and Formatting window is already visible. Then the focus will be set to the Styles and Formatting window and the paragraph (or cell styles if Calc) section is activated as described before.

Furthermore the view selection drop-down list box, with the different available groups of styles, will be always set to “Automatic” to ensure that the user can choose from more paragraph styles than he could in the Styles control before.

The Styles control is a combo box, which means it is editable. If the user types in a new paragraph/cell style name and presses the Return key, a new paragraph/cell style with this name will be created. This style is hierarchically derived, so that it only contains hard attribute which were valid for the complete paragraph/cell and inherit attributes from parent paragraph style, which was previously assigned to the paragraph. The new created style is assigned to the paragraph/cell after the new style has been created.

Furthermore the combo box offers auto complete (like already used in the Font combo box) to help the user to select an already present style with the keyboard.

New Format-Clear Formatting and Format - Default Formatting Behavior for Writer, Calc, Draw and Impress

Functional Description for Clear Formatting and Format Function for Writer:

The new Clear Formatting function in the styles control works different from the already existing Format – Default Formatting function which will be left untouched for OOo 2.0, but will be extended for OO 3.0 as follows, because the functionality of only removing character formatting without dropping it's current direct paragraph formats is only available by pressing the cursor right key when the cursor is at the very last character position of the current paragraph. This functionality is now integrate into the new Format-Default Formatting function and could be called by the shortcut Ctrl+M.

Format - Default Formatting Function Works as Follows (#i39388):

Selection	Current OOo 1.1 and 2.0“Format-Default” Behavior	New OOo 3,0 “Format-Default Formatting” Behavior
No selection	Clear hard paragraph formatting
Part of paragraph	Clear hard character formatting
Partly selection of more than one paragraph	Clear hard character formatting
Complete paragraph	Clear hard paragraph and character formatting at once
(NEW for OOo 3.0) No Selection and cursor position at last character position of paragraph	(no action)	Clear hard character formatting, but keep hard paragraph formatting.

Clear Formatting Function iWorks as Follows:

Selection	“Clear Formatting” Function
No selection	Set “Default” paragraph style and do not clear hard character formats of current paragraph
Part of paragraph(s)	Clear hard character formatting of current selection and set “Default” paragraph style
Complete paragraph(s)	Clear hard character formats in current selection and set “Default” paragraph style

Functional Description for Calc, Draw and Impress

The current functionality will be left untouched.

The Styles and Formatting button moves from the Function bar to the Text Object bar to arrange similar functions in one area. Pressing the button only toggles the visibility of the Styles and Formatting window. The tip help of this button changes to Styles.

The tip help of the Paragraph Styles control will be kept as is (“Apply Style”).

Illustration 3 Styles and Formatting button moves to Paragraph Styles control

In the same step we have to adjust the length of the URL field, so that it fits with the right border of the font size combo box in the function tool bar. Please see screenshot above for details.

Please note: The width of the font list box will be redefined by Christian Jansen for OOo 2.0 and the URL control might be removed too.

Main Menu Definition

Format Menu

The menu entry Default does also not explain what this function really does (resetting of the current paragraph/selection to the style attributes), therefore it will be renamed to “Default Formatting” [Format Menu in Writer}, [Format Menu in Calc], [Format Menu in Impress], [Format Menu in Draw]. MS Office does not have this menu item in the main menu, but we have offered it for years in OO.org.

The term Stylist in this menu does not explain the function itself and furthermore the competition uses a different term. So we change the menu entry from “Stylist” to “Styles”. The keyboard shortcut will be kept. In this specification we will still talk about the Styles and Formatting window and not Styles to emphasize that the floating windows itself is meant.

String list

Item	English	German	Comments
Main Menu Entry and Window Title for Writer, Calc, Draw and Impress	St~yles and Formatting	Formatvorlagen	
Combo Box entry	Clear formatting	Formatierung löschen	
Combo Box entry	Heading 1	Überschrift 1	Naming is equal to already existing paragraph style
Combo Box entry	Heading 2	Überschrift 2	-””-
Combo Box entry	Heading 3	Überschrift 3	-””-
Combo Box entry	Default	Standard	-””-
Combo Box entry	Text body	Textkörper	-””-
Combo Box entry	More...	Weitere...	
Tip Help	Apply Style	Formatvorlage zuweisen	(tip help on Style combo box)
Tip Help	Styles and Formatting	Formatvorlagen	

Styles and Formatting Window /Styles and Formatting Function

Some very small adjustments to the Styles and Formatting window/Styles and Formatting function have to be made.

Enlarge the view selection drop-down list box in Styles and Formatting window from currently 5 to 7 entries

Save the chosen category regardless what happens in-between (task switching/mode switching). The only exception from this rule is the More... entry in the Paragraph style control, which calls the tool window and switches to Automatic as the view option.

Keyboard Shortcuts for Writer (BugId i29441)

Shifted to new child workspace due to new possibility to assign shortcuts to styles. New owner is Andreas Schlüns:

http://specs.openoffice.org/appwide/keyboard/assign_keyboard_shortcuts_to_styles.sxw

Future Tasks

Not covered due to high effort:

WYSIWYG preview in Paragraph Styles control in object bar

problem is how to display the formatting in the drop-down list (performance issue and high dev. effort)

This spec does not cover:

Styles and Formatting window (Styles) overwork

The “Automatic” setting for the view is not really predictable.

Future of the modal dialog “Style Catalog” is unclear (cf i63998)

Format paint brush incl. keyboard shortcuts (Ctrl + Shift C (FL: I am not sure that this one is needed, because format is always present in clipboard) and Ctrl + Shift + V)

Define custom keyboard shortcuts for styles

Notes

MMP-5 Clarification Issue/high: Please make clear what controls are affected by this spec. I found the Paragraph Styles control in Writer and the Cell Styles control in Calc. You also mention Draw and Impress...

FL: Style list box is available in Writer and Calc only.

FPE2: I don't think that it's a good idea to implement hard coded short cuts. Why not do it right? What happens if the hard coded shortcuts collide with the ones the user is used to or did indeed define for other purpose? We could provide macros that assign the styles. These can be assigned to short cuts easily (that's how I do it).

FL: Will ask Carsten Driesner about this issue.

FPE4:(Templates) Why do you stop at level 3 and don't go all the way? Shouldn't there also be a Text Body short cut? Why not use Ctrl+0 for clearing all formatting?

Addressed Issues

MMP-1 Issue/high ad 6.1Extended set of paragraph Styles: What is the order of all items in the list? Today everything is sorted alphabetically. I suggest to define a position in the list where custom styles are places.

FL: Done

MMP-2 Question/medium ad 6.2Extended Features Set of Style Combo Box: The illustration indicates that OOo2 offers “Clear Formatting” and “Default”. Is this intended? What is the difference?

FL: Default is a paragraph style and “Clear Formatting” is a function call.

MMP-2b: What is the difference between OOo-Default and MS-Normal?

FL: No difference, but today the name “Default” is preferred over MS “Normal” style.

MMP-3 Issue/high ad 6.2Extended Features Set of Style Combo Box: I suggest to always have and enable the item “More...” It can bring the Sylist to front (because it might be hidden under another tool window) and select the styles selection as you have described (because it can show something completely different, e.g. numbering styles).

FL-> Wil change that, but I was not sure about combo box entry which does not execute something visual on the screen.

MMP> The “bring to top if already visible” is not specified, yet.

FL: Done

MMP-4 Issue/medium ad 6.3Text Object Bar Definition: For the layout of the controls, please contact CJ, because he is working on a new toolbar concept.

FL: I will do so.

FPE1: I don't like the name “Clear Formatting”. I'd suppose: “Reset Format” because it really does not clear the formatting but resets it to the standard as defined in the style used.

FL: Sound reasonable. Has to be discussed with iTeam!!

EM: Let's keep “Clear formatting” because it is more regular language than “reset”.

FPE3: (Strg + Space like Word) Will this clear the formatting for the complete paragraph or only for the selected part? Is this undoable? It should be or otherwise the users will be frustrated when they erroneously press Ctrl+Space to insert a non breakable space and thereby clear all manual formatting.

FL: Will only reset paragraph formats to paragraph style and will remove direct formatting from current selection/word where cursor is placed in.

References

combo box & Combo Box Controls, Specification for OpenOffice.org 2.0. http://specs.openoffice.org/ui_in_general/controls/DropDownListBox_ComboBox.sxw

OpenOffice.org Toolbar Specification for OpenOffice.org 2.0. http://specs.openoffice.org/ui_in_general/toolbars/openoffice_org_toolbar_spec.sxw

Format Menu in Writer	http://specs.openoffice.org/writer/menus/FormatMenu.sxw#FormatMenuWriter

Format Menu in Calc	http://specs.openoffice.org/calc/menus/FormatMenu.sxw#FormatMenu

Format Menu in Impress	http://specs.openoffice.org/impress/menus/FormatMenu.sxw#FormatMenuImpress

Format Menu in Draw	http://specs.openoffice.org/impress/menus/FormatMenu.sxw#FormatMenuDraw

The current implementation is a little bit problematic, because there is no feedback shown to the user when this function is called and sometimes the function is executed without intention, because the user only wants to travel to the end of a paragraph by cursor keys.

<Required – This paragraphs gives the audience idea of what to aspect from this document. It should be described shortly what problem will be solved.>

The source of software product implementation and change is the I-Team (Implementation Team). I-Teams are typically comprised of people who have skills in the areas of Product Marketing, Development Engineering, Technical Publications, and Test Engineering. I-Teams define the features or set of changes (based on input from SCs, customers, Engineering, or Marketing), plan the implementation project, perform the implementation and testing...

<Required - Dialogs providing strings which have to be translated, have to be accompanied by a table containing the strings used in the image (English or German or both) Strings have to include mnemonics and the item for which the string is used. Mnemonics have to be visualized by a ~ - symbol in front of the letter which has to be displayed mnemonic.>

<Recommended - If there are features which couldn't be implemented but have to be implemented in the future. State these in here with a description why the feature couldn't be implemented right now.>

<Recommended - Questions will arise during the writing of the specification. State these in here.>

Assigning Styles

Page 9

http://specs.openoffice.org/writer/formatting/Assigning_Styles_in_Writer.sxw

Frank Loehmann

2003-09-11T17:25:26

Matthias Müller-Prove