Difference between revisions of "/Impress/Features/Tables"

From Apache OpenOffice Wiki
Jump to: navigation, search
(Table Style Options: strings)
(Table Style Options: Table Style Options > Options)
Line 119: Line 119:
 
This is the second section in the Table Design task pane
 
This is the second section in the Table Design task pane
 
;String, '''bold'''
 
;String, '''bold'''
   Table Style Options
+
   Options
  
 
==== Header Row ====
 
==== Header Row ====

Revision as of 10:55, 6 December 2007

Tables in Impress

Specification Status
Author Christian Lippka
Last Change
Status Preliminary Help

Abstract

Currently OpenOffice.org Impress lacks the native support for tables. It is possible to create tables by embedding a OpenOffice.org Calc object or by 'drawing' a table by using multiple shapes. Both methods are neither user friendly nor accessible. The user expects a native support for tables like it is available in the OpenOffice.org Writer application for example. This specification defines a feature set that a common user expects from a native table implementation in OpenOffice.org Impress and also how it should be accessible on the user interface. It also takes into account the interoperability requirements with other similar products. This specification only talks about tables in Impress. The same feature can and will be integrated in OpenOffice.org Draw. If there is a need for differences in the user interface for tables in Draw they will be documented either in a separate chapter in this specification or in another specification for tables in Draw.

Contents

References

Reference Document Check Location (URL)
Specification Process Entry Check [passed/failed] n/a
Product Requirement, RFE, Issue ID (required) available issue 68103
Product Concept Document [available/not available] <PLEASE ENTER LOCATION HERE>
Test case specification (required) [available/not available] <PLEASE ENTER LOCATION HERE>
IDL Specification [available/not available] <PLEASE ENTER LOCATION HERE>
Software Specification Rules n/a n/a

Contacts

Role Name E-Mail Address
Developer Christian Lippka christian.lippka@sun.com
Quality Assurance Christian Guehnter christian.guehnter@sun.com
Documentation Uwe Fischer uwe.fischer@sun.com
User Experience Matthias Mueller-Prove Matthias.Mueller-Prove@Sun.COM

Acronyms and Abbreviations

Acronym / Abbreviation Definition
<WYSIWYG> <What You See Is What You Get>

Detailed Specification

Table Contents

A table in impress is presented to the user as a shape. All patterns that apply to all generic shapes also apply to tables. A table shape is a rectangle area build of cells that are arranged in horizontal rows and vertical columns. All rows and columns are always completely visible inside the rectangle that defines the table. No scrolling is needed to see all tables if the table itself is completely visible. Resizing the table itself will also resize the containing cells so that all cells fit in the new rectangle. Adjacent cells can be merged so that the first merged cell occupies the area of all merged cells. All other merged cells will be invisible as long as they are part of a merge. A cell itself can contain text with multiple paragraphs.

Table Properties

Position & Size

As a shape, the table shape is placed on a slide and has a position and a size. Table shapes can not be rotated, so the position and size defines the rectangle area on the slide that is used to render all contained cells, excluding shadow and reflection. In contrast to using an embedded Calc object for tables, the position and size during editing a tables contents in Impress is always “what you see is what you get”.

Style

Each table shape will have a table style assigned that defines the formating properties for the cells if the properties are not hard set on the table or cell itself. Table styles are described in Change Me

Formating properties

Formating properties can be hard set on the table. They will override the formating properties from the table style and are used when the user creates new content like text or new cells. If the user sets new formating properties to a table, these properties will also be hard set to each cell in that table. The following properties are supported

  • cell properties (TODO: com.sun.star.text.CellProperties or com.sun.star.table.CellProperties)
  • character properties (com.sun.star.style.CharacterProperties, com.sun.star.style.CharacterPropertiesAsien, com.sun.star.style.CharacterPropertiesComplex )
  • paragraph properties (com.sun.star.style.ParagraphProperties, com.sun.star.style.ParagraphPropertiesAsien, com.sun.star.style.ParagraphPropertiesComplex )
  • fill properties (com.sun.star.drawing.FillProperties)

Layout properties

Layout properties are hard set on the table. They help define the overall layout of the table and how the table style is used on the containing cells.

Table Styles

This is the first section in the Table Design task pane

String, bold
 Table Styles

Table Style Options

This is the second section in the Table Design task pane

String, bold
 Options

Header Row

String
 Header row

If enabled, all cells of the first row are using the header row formating from the table style

Total Row

String
 Total row

If enabled, all cells in the last row are using the total row formating from the table style

Banded Rows

String
 Banded rows

If enabled, all cells from even rows are using the even horizontal banding formating from the table style. This excludes all cells that are affected from one of the layout properties defined above.

First Column

String
 First column

If enabled, all cells in the first column are using the first column formating from the table style. This excludes all cells that are affected from one of the layout properties defined above.

Last Column

String
 Last column

If enabled, all cells in the last column are using the last column formating from the table style. This excludes all cells that are affected from one of the layout properties defined above.

Banded Columns

String
 Banded columns

If enabled, all cells from even columns are using the even vertical banding formating from the table style. This excludes all cells that are affected from one of the layout properties defined above.

Row Properties

Height

If a row has an assigned height, this is the absolute height of that row. If no height is assigned, a best fit algorithm is used to calculate the height depending on the maximum text height of all cells in that row, the height of all other rows and the overall table height. The sum of all column heights must not exceed the height of the table shape. If this is designated than the height of the table shape must also be changed to fit all rows.

Column Properties

Width

Each column has an assigned with. The sum of all column width must be exactly the width of the table shape.

Cell Properties

Each cell supports all formatting properties that are also available on the table itself. All properties set on the cell directly override the properties from the table style. Which of the formatting options from the tables style is used depends on the tables layout properties. The default formatting option is the uneven horizontal banding formation. Formatting properties set directly on the table do not override the formatting properties on cells, they are only used when creating new cells or adding text to cells without text.

Horizontal Span

If a cell is the first cell in a horizontal range of merged cells, this property defines the number of horizontal cells that are merged.

Vertical Span

If a cell is the first cell in a vertical range of merged cells, this property defines the number of vertical cells that are merged.

Merged

All cells that are part of a range of merged cells, excluding the first cell, have this property set.

Selection and Focus

  • A selection consist of one or more selected cells.
  • If a selection is available there will be no text cursor visible.
  • If an operation creates the text cursor, all selected cells will be deselected.
  • A cell has the focus if there is a text cursor inside that cell.
  • If an operation needs a cell with a focus and no cell has the focus but there is an active selection, the first cell of that selection will become the focus.
  • There can only be either a text selection or selected cells, not both. Creating a text selection deselects all cells. Selecting cells deselects all selected text.

Table Designs

Table designs can be changed from the Table Design pane on the task panel.

String
 Table Design

- DISCUSS: Should this open automatic if a table is selected?

  • PRO: Feature is more visible to the user
  • CON: Assigning an effect to a table is harder to do, since the Custom Animation pane must be re selected by hand each time a table is selected.

A Table Design is a set of predefined cell styles that are dynamically assigned to the cells of a table. The styles available are

  • header row
  • total row
  • first column
  • last column
  • vertical banding
  • horizontal banding
  • default

For each individual table it can be customized which of the first six styles are used. If none of the first six styles is used or available, the default style of the Table Design will be used. The first style in the list that is available in the Table Design and used by the table is assigned to a cell. For example the top left cell will get the "header row" style if it is available and the table is formated to use the header row. If not, it gets the first column style, if that is available and the table is formated to use the first column. If not, vertical banding is checked, than horizontal banding and if nothing fits, the default is used.

The default style is also the parent style for all other styles of a table design. This means that all settings from the default style are also applied to the other styles, unless they are hard set in the other styles.

A cell style for a Table Design can contain text formating, background filling and cell border formating.

Operations on Tables

This section documents all the operations a user can apply to tables.

Insert

Tables can be inserted with the table slot from either the insert menu or the "Standard", "Insert" or "Table" tool bar. When using the tool bar a drop down floating window opens where the user can select the initial number of columns and rows.

Inserting a table using the "Standard" tool bar and the mouse

Resizing

When resizing a table shape the following constrains must be met

  • All cells must have at least a minimum with and height
  • All cells must be big enough to format and display all its text contents without clipping or over painting their borders.

If the user try to resize a table to a size that can not fulfill the above constrains the application will automatically increase the table shape width and height until all constrains are fulfilled. The application will give priority to the width and will only change height if possible.

Text editing

If text is added to a cell that does not fit to the width of the cell, automatic line breaking is performed to format the text inside the cells width. If the formatted text still does not fit the cell then the height of the row for that cell is increased until the formatted text fits both the fixed with and the new cell height. If text is removed from a cell and the size of the row is not fixed, the application automatically tries to reduce the height of the row until it has the minimum size to contain the contents of all cells in that row. If as a result of text editing, the height of a row is changed, the height of the table shape is also changed so it exactly fits the new sizes.

Delete Columns

If cells are selected, all columns that contain selected cells are deleted. If no cell is selected, the column with the cell that has the focus is deleted. If there is no selection and no cell has the focus, this operation is disabled.

Delete Rows

If cells are selected, all rows that contain selected cells are deleted. If no cell is selected, the row with the cell that has the focus is deleted. If there is no selection and no cell has the focus, this operation is disabled.

Insert Above

A new row is inserted before the current selection. If there is no selection a new row is inserted before the row with the cell that has the focus. If no selection is available and no cell has the focus, a new row is inserted before the first row of the table.

Insert Below

A new row is inserted after the current selection. If there is no selection a new row is inserted after the row with the cell that has the focus. If no selection is available and no cell has the focus, a new row is appended to the last row of the table.

Insert Left

A new column is inserted before the current selection. If there is no selection a new column is inserted before the column with the cell that has the focus. If no selection is available and no cell has the focus, a new column is inserted before the first column of the table.

Insert Right

A new column is inserted left to the current selection. If there is no selection a new column is inserted left to the cell that has the focus. If no selection is available and no cell has the focus, a new column is inserted at the left of the table.

Merge Cells

All selected cells are merged so that the first cell fills out the space of all other selected cells. All other selected cells become invisible. All text content of the selected cells is merged into the first cell. The first cell is the cell in the first selected row and the first selected column. Cells from different rows and columns can be merged, as long as the area defined by the rectangles of all cells contains no cells that will not be part of the merge. For example You can not merge Cell A1 with A3 as the merged rectangle would include A2. You can not merge A1 with A2 and B1 as the merged rectangle includes B2. You can not merge A1 with A2 if A2 is already merged with B2 as the merged rectangle would include B1. If there is no valid selection of more than one cell, this operation is disabled.

Split Cells

If this operation is executed, the “Split Cells Dialog” pops up and asks the user how many new columns and rows he wants for all selected cells. If that dialog is not canceled then all selected cells are split so that they each contain the new number of rows and cells in the same area of the old selected cells. If no cell is selected than this operation is performed only on the cell with the focus. If no cell is selected and there is no cell with the focus then this operation is disabled. If the newly created cells are smaller than the minimum defined cell width or height the table shape is automatically resized to fit the new cells with the minimum width or height. Internally splitting a cell is done by adding new rows and or columns and merging adjacent cells.

Change Row Height

If the user changes the height of a row, this row becomes fixed size. It can't be made smaller than the minimum cell height. If the height of a row is increased, the height of the table shape is also increased to fit the new row height.

Change Column Width

If the user changes the width of a column, the width of the next column will be reduced so that the width of the table stays constant. The width of a column can not be smaller than the minimum cell width. If a columns width can only be increased as long as the next columns width is bigger than the minimum cell width. If the last column is resized, the width of the table is resized to fit the new column width.

Distribute Rows Equally

This operation makes all rows the same height. This is the height of the table shape divided by the number of rows.

Distribute Columns Evenly

This operation makes all columns the same width. This is the width of the table shape divided by the number of columns.

Select Row

This operation adds all cells in one row to the current selection.

Select Column

This operation adds cells in one column to the current selection.

Select Cell

This operation adds one cell to the current selection.

Keyboard interactions

The keyboard interactions specified here are taking from observing the current keyboard interactions for tables in OpenOffice.org Writer. All keys not specified below will be used as normal text input and will be inserted at the position of the text cursor. If no cell has a focus, the first cell will become the focus.

Cursor keys

If a cell has the focus, the cursor keys are used to travel the text cursor in the containing text. If not text is contained or the start or end of the text is reached, the focus will be transferred to the corresponding adjacent cell, if available.

Cursor left

Travels the text cursor towards the beginning of the text in a cell, character by character. If no cell text is available or if the cursor is already at the beginning of the text, the focus is moved to the first visible cell left of the cell with the focus. If the cell with the current focus is the first visible cell in that row, the focus is transferred to the last visible cell in the previous row, if available.

Cursor right

Travels the text cursor towards the end of the text in a cell, character by character. If no text is available or if the text cursor is already at the end of the text, the focus is moved to the first visible cell in the same row after the cell with the focus, if available.

Cursor up

Travels the text cursor towards the begin of the text, line by line. If no text is available or if the text cursor is already at the begin of the text, the focus is moved to the cell in the prior row that is adjacent to the cell with the focus, if available.

Cursor down

Travels the text cursor towards the end of the text, line by line. If no text is available or if the text cursor is already at the begin of the text, the focus is moved to the cell in the next row that is adjacent to the cell with the focus, if available. Cursor keys and modifier key STRG? Only cursor left and cursor right are supported with this modifier. Behavior is the same, except text is traveled word by word instead of character by character.

Tab key

The focus is moved to the next visible cell in the the row with the cell that contains the focus. If there are no more visible cells in that row, the first visible cell in the next row gets the focus, if available. If there is no selection and no focus, nothing happens. If the tab key is used in the last visible cell of the last row, the operation “Insert Below” will be executed and the focus will be set to the first cell in the newly created row. If there is an active selection, the selection is changed that the focused cell now is a border of the selection rectangle.

Tab key and modifier SHIFT?

The focus is moved to the previous visible cell in the the row with the cell that contains the focus. If there are no more visible cells prior to the cell with the focus in that row, the last visible cell in the previous row gets the focus, if available. If there is an active selection, the selection is changed that the focused cell now is a border of the selection rectangle.

Pos1 key

If there is a text cursor, it is placed at the beginning of the text from the cell with the focus. Pos1 key and modifier STRG? The focus is set to the first cell.

End key

If there is a text cursor, it is placed at the end of the text from the cell with the focus. End key and modifier STRG? The focus is set to the last cell.

Backspace key

The character before the text cursor is deleted. If there are no characters before the text cursor, the focus is moved to the previous visible cell in the same row as the cell with the focus. If there is no previous visible cell in the same row, the last visible cell in the previous row will be used, if available. If the focus changes to another cell, the text cursor is placed at the end of the text in that cell.

Backspace key and modifier STRG?

Same Behavior as without modifier, expect that whole words are deleted instead of single characters.

Delete key

The character at the text cursor is deleted. If there are no characters at the text cursors, the focus is moved to the next visible cell in the same row as the cell with the focus. If there is no next visible cell in the same row, the first visible cell in the next row is used, if available.

Delete key and modifier STRG?

Same Behavior as without modifier, expect that whole words are deleted instead of single characters.

A key and modifier STRG?

If the cell with the focus contains text, the whole text of that cell is selected. If it is already selected or if there is no cell containing the focus, all cells are selected. If the cell with the focus contains no text, all cells are selected.

Selection and the modifier key SHIFT?

All keys used for traveling can be combined with the modifier key SHIFT?. In that case an existing selection is expanded to the cell with the focus. If no selection is available a new selection is spawned from the cell with the initial focus. Traveling inside text spawns a text selection. As soon as cells are selected or a text selection is spawned across cell borders, only whole cells will be traveled and selected.

Mouse interactions

If selected, a table shape becomes a border and handles for translation and resizing.

Setting the focus

When the user clicks inside a cell, the focus and text cursor is placed inside that cell. If the click was made inside text in a cell, the text cursor is placed directly at this position. If the table shape does not yet have the focus, it will get the focus and text edit will become active.

Context Menu

Right click into the table will set focus to the cell under the mouse pointer and create a context menu. If the text engine can provide a context menu for the given text selection or for the text under the mouse position, this context menu will be used. If not, the table shape context menu is shown (see 1.11).

Resizing Row Height

If the mouse is near the border between two rows, the mouse pointer will change to reflect that resizing the row height is now possible. When the user press the left mouse button, horizontal changes of the mouse will result in resizing the row height. See 1.7.11 for constrains.

Resizing Column Width

If the mouse is near the border between two rows and both the cell left and right to the mouse are not merged together, the mouse pointer will change to reflect that resizing the column width is possible. When the user press the left mouse button, vertical changes of the mouse will result in resizing the column width. See 1.7.12 for constrains.

Row selection

If the table shape has the focus and the mouse is near to the left side of a row, the mouse pointer will change to reflect that selecting the row is possible. If the left mouse is clicked, the old selection is removed and all cells in the row right to the mouse are selected.

Column selection

If the table shape has the focus and the mouse is near to the top side of a column, the mouse pointer will change to reflect that selecting the column is possible. If the left mouse is clicked, the old selection is removed and all cells in the column below the mouse are selected.

Mouse selection

todo

Clipboard operations

todo

Table shape context menu

todo

Split Cells Dialog

The “Split Cells” dialog from the OpenOffice.org Writer application will be used.

A preview of the "Split Cells" dialog

Table toolbar

A preview of the "Table" tool bar in impress

  • Insert Table
  • -------------
  • Line Style -> Style: DropDownOnly
  • Line Color (of the border) Style: DropDownOnly
  • -------------
  • Border Style: DropDownOnly
  • Background Color Style: DropDownOnly
  • -------------
  • Merge Cells
  • Split Cells
  • Optimize --> Optimize Style: DropDownOnly
  • -------------
  • Top
  • Center
  • Bottom
  • -------------
  • Insert Row
  • Insert Column
  • Delete Row
  • Delete Column
  • ----------
  • Select Table#
  • Select Columns#
  • Select Rows#
  • ----------
  • AutoFormat
  • Table Properties
  • -------------
  • Sort...
  • -------------
  • Sum


Help | User Interface Element Templates | Example Spec

Migration

Migrating old tables

Existing content where user draw their tables using shapes or the OpenOffice.org Calc application can not be converted to native tables. The user will have to re create the table and copy the textual contents to the new table via clipboard. The same applies to tables imported from Microsoft Powerpoint in versions that did not support native tables as the resulting group shape does not contain any information to re create the original table.

Loading new tables in older versions of OpenOffice.org

Older versions of OpenOffice.org that do not contain the feature of native tables in impress will not be able to work with the new tables as described in this specification. Currently there are two options. Either the new table shapes show not up in older versions at all after loading a document. Or we store the new tables the same way as we store embedded OpenOffice.org Calc objects. In that case the tables are visible in older applications with the short come that they may render a little different and the content is still editable but not as user friendly as with the new tables.


Configuration

<START TYPING HERE --- If this part is irrelevant state a reason for its absence.>

Help | Configuration Table Template

File Format

<START TYPING HERE --- If this part is irrelevant state a reason for its absence.> Help

Help | File Format Table Template

Open Issues

<State a bulleted list of issues Issue here>

Milestone Planning

TaskStatusMilestone
Core
Implement a table shape in the drawing layerDone
Implement XShape API for the table shapeDone
Add support for multiple text objects per shape to drawing layerDone
Add mouse interaction for multiple text objects per shape to drawing layerDone
Add keyboard interaction for multiple text objects per shape to drawing layerDone
Add handles for table rowsDone
Add handles for table columnsDone
Render table structure with cell background and textDone
Selection of cellsDone
Render table bordersDoneM1
Support for auto format stylesDoneM1
Add cell styles to sdDoneM1
API support for cell styles in SdDoneM1
Clipboard support for single and multiple cellsplannedM2
Clipboard support between sd and other OOo applicationsplannedM4
User Interface
Add table toolbar in sdDone
* Line StyleDoneM1
* Border Line ColorDoneM1
* BordersDoneM1
* BordersDone
* Background FillingDone
* Merge / Split CellsDoneM2
* OptimizeplannedM2
* Text AlignmentplannedM2
* Insert/Delete Row/ColumnDone
* Select Table/Row/ColumnDone
* Auto formatplannedM2
* Table PropertiesDone
* SortplannedM3
* SumplannedM3
Create cell property dialog for drawing layer cellsDone
* Add font tab pageDone
* Add font effect tab pageDone
* Add Borders tab pageDoneM1
* Add Background tab pageDone
Keyboard navigation in tableDone
Add cell styles to stylist in sdDone
setting cell styles to selected cellsDoneM1
Support search&replace for text in tablesDoneM1
Support spell checking for text in tablesDoneM1
Enable table shape as presentation layout objectplannedM2
User interface for auto format stylesDoneM2
xml load/store for predefined auto format styles%50M2
define some predefined auto format stylesCanceledM2
Undo for cell formatting%80M2
Undo for table structure changes%50M2
Undo for cell merges/splitDoneM2
XML
Implement embedded cell structure exportDone
Export cell content auto stylesDoneM1
Export cell stylesDoneM1
Export auto format stylesDoneM1
Implement embedded cell structure importDone
Implement external cell structure importplannedM3
Import cell stylesDoneM1
Import auto format stylesDoneM1
Implement backward compatibility strategiesplannedM3
I18N
Support for RTL languages in tablesplannedM3
Accesibility
Implement accessibility API for table shapeplannedM4
Interop
Add import support from ppt binary formatplannedM3
Add export support to ppt binary formatplannedM3
Add import support from ppt xml formatplannedM4


MilestoneDue
M1Basic User Interface6. Aug. 2007
M2Advanced User Interface finishing, including feedback from Milestone 1 testing2. Nov. 2007
M3XML Support16. Nov. 2007
M4Interop and Finishing30. Nov. 2007
M5Implement Feedback from testing/comunity/user exp.21. Dez. 2007

Status Changes

08/20/2007

  • Merge and Split operation took longer to implement then initially planned, shifting milestone M2 around two weeks
  • Due to unplanned workload with OOo 2.3 show stopper issues shift M2 one week
  • Since this now spans over my one week vacation in October, M4 is shifted one additional week

10/15/2007

  • Back from vacation, had to do some support for the presenter screen feature
  • Undo is more complicated than planed, have to adjust dates again
  • Talked about cell styles with MMP, having cell styles and table styles is confusing for the user.

Therefore we will only have table styles. Design of the user interface for table styles is currently unclear...

Personal tools