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

From Apache OpenOffice Wiki
Jump to: navigation, search
(Table Style Options: Table Style Options > Options)
 
(34 intermediate revisions by 2 users not shown)
Line 15: Line 15:
  
 
== Abstract ==
 
== 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.
+
Currently OpenOffice.org Impress and Draw 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 Draw 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.
+
  
 
__TOC__
 
__TOC__
Line 63: Line 62:
 
|-
 
|-
 
| '''Quality Assurance'''
 
| '''Quality Assurance'''
| Christian Guehnter
+
| Wolfram Garten
| christian.guehnter@sun.com
+
| wolfram.garten@sun.com
 
|-
 
|-
 
| '''Documentation'''
 
| '''Documentation'''
Line 71: Line 70:
 
|-
 
|-
 
| '''User Experience'''
 
| '''User Experience'''
| Matthias Mueller-Prove
+
| Frank Loehmann
| Matthias.Mueller-Prove@Sun.COM
+
| frank.loehmann@sun.com
 
|-
 
|-
 
|}
 
|}
Line 86: Line 85:
 
|}
 
|}
  
== Detailed Specification ==
+
== Table Model ==
 +
This section describes the model of a table shape inside impress and draw.
  
 
=== Table Contents ===
 
=== Table Contents ===
Line 97: Line 97:
  
 
==== Style ====
 
==== 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
+
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.
  
 
==== Formating properties ====
 
==== Formating properties ====
Line 103: Line 103:
 
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
 
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)
+
* cell properties (com.sun.star.drawing.CellProperties)
 
* character properties (com.sun.star.style.CharacterProperties, com.sun.star.style.CharacterPropertiesAsien, com.sun.star.style.CharacterPropertiesComplex )
 
* 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 )
 
* paragraph properties (com.sun.star.style.ParagraphProperties, com.sun.star.style.ParagraphPropertiesAsien, com.sun.star.style.ParagraphPropertiesComplex )
Line 110: Line 110:
 
==== Layout properties ====
 
==== 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.
 
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 ===
 
=== Row Properties ===
Line 173: Line 133:
  
 
==== Merged ====
 
==== Merged ====
All cells that are part of a range of merged cells, excluding the first cell, have this property set.
+
All cells that are part of a range of merged cells, excluding the first cell, have this property set to true.
  
 
=== Selection and Focus ===
 
=== Selection and Focus ===
Line 186: Line 146:
 
=== Table Designs ===
 
=== Table Designs ===
  
Table designs can be changed from the Table Design pane on the task panel.
+
Table designs can be changed from the Table Design pane on the task panel in impress or from the Table Design dialog in draw.
;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.
 
A Table Design is a set of predefined cell styles that are dynamically assigned to the cells of a table.
Line 224: Line 178:
 
filling and cell border formating.
 
filling and cell border formating.
  
=== Operations on Tables ===
+
== Operations on Tables ==
  
 
This section documents all the operations a user can apply to tables.
 
This section documents all the operations a user can apply to tables.
  
==== Insert ====
+
=== Insert ===
  
 
Tables can be inserted with the table slot from either the insert menu or the "Standard", "Insert" or "Table" tool bar.
 
Tables can be inserted with the table slot from either the insert menu or the "Standard", "Insert" or "Table" tool bar.
Line 236: Line 190:
 
[[image:Insert_Table_Preview.png|Inserting a table using the "Standard" tool bar and the mouse]]
 
[[image:Insert_Table_Preview.png|Inserting a table using the "Standard" tool bar and the mouse]]
  
==== Resizing ====
+
=== Resizing ===
 
When resizing a table shape the following constrains must be met
 
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 have at least a minimum with and height
Line 242: Line 196:
 
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.
 
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 ====
+
=== 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 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 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.
 
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.
 +
For tables, quick text editing is always used, regardless of the document settings.
  
==== Delete Columns ====
+
=== 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.
+
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. After deletion of columns, the width of the deleted columns is propagated to the remaining columns.
  
==== Delete Rows ====
+
=== 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.
+
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. After deleting rows, the height of the deleted rows is subtracted from the height of the table shape.
  
==== Insert Above ====
+
=== Insert Columns ===
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.
+
New columns are inserted right to the current selection. If there is no selection a new column is inserted right 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 right of the table. If more than one column is selected, the number of inserted columns is the number of selected columns. The width of the inserted columns is equal to the width of the selected columns. After insertion of columns the width of the inserted columns and selected columns is shrinked that the width of all columns still fit into the width of the table shape.
  
==== Insert Below ====
+
=== Insert Rows ===
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.
+
A new row is inserted after 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 appended to the last row of the table. If more than one row is selected, the number of inserted rows is the number of selected rows. The newly inserted rows will get the same height as the selected ones. After insertion of rows the height of all inserted rows will be added to the height of the table shape.
  
==== Insert Left ====
+
=== Merge Cells ===
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.
+
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 added to 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.
 
+
==== 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.
 
If there is no valid selection of more than one cell, this operation is disabled.
  
==== Split Cells ====
+
=== 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 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.
 
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.
 
Internally splitting a cell is done by adding new rows and or columns and merging adjacent cells.
  
==== Change Row Height ====
+
=== 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.
 
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 ====
+
=== 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.
 
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 ====
+
=== 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.
 
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 ====
+
=== 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.
 
This operation makes all columns the same width. This is the width of the table shape divided by the number of columns.
  
==== Select Row ====
+
=== Select Row ===
 
This operation adds all cells in one row to the current selection.
 
This operation adds all cells in one row to the current selection.
  
==== Select Column ====
+
=== Select Column ===
 
This operation adds cells in one column to the current selection.
 
This operation adds cells in one column to the current selection.
  
==== Select Cell ====
+
=== Select Cell ===
 
+
 
This operation adds one cell to the current selection.
 
This operation adds one cell to the current selection.
  
=== Keyboard interactions ===
+
== 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.
 
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 ====
+
=== 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.
 
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 =====
+
==== 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.
 
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 =====
+
==== 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.
 
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 =====
+
==== 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.
 
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 =====
+
==== 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.
 
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?
+
 
 +
=== 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.
 
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 =====
+
=== 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.
 
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 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.
 
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? =====
+
If the modifier SHIFT is used, 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.  
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.
 
If there is an active selection, the selection is changed that the focused cell now is a border of the selection rectangle.
  
===== Pos1 key =====
+
=== Pos1 key ===
 
If there is a text cursor, it is placed at the beginning of the text from the cell with the focus.
 
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 the modifier STRG is used, 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.
 
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 =====
+
If the modifier STRG is used, 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.
 
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? =====
+
If the modifier STRG is used, whole words are deleted instead of single characters.
Same Behavior as without modifier, expect that whole words are deleted instead of single characters.
+
  
===== Delete key =====
+
=== 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.
 
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? =====
+
If the modifier STRG is used, whole words are deleted instead of single characters.
Same Behavior as without modifier, expect that whole words are deleted instead of single characters.
+
  
===== A key and modifier STRG? =====
+
==== 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.
 
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? =====
+
==== 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.
+
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 ===
+
== Mouse interactions ==
 
If selected, a table shape becomes a border and handles for translation and resizing.
 
If selected, a table shape becomes a border and handles for translation and resizing.
  
==== Setting the focus ====
+
=== 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.
+
When the user clicks in the left border area of a cell, the whole cell is selected.
 +
When the user clicks inside a cell text area, 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 ====
 
==== 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).
 
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 ====
+
=== 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.
 
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 ====
+
=== 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.
 
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 ====
+
=== Mouse 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.
+
Mouse selection starts when the user mouse button is pressed down inside a cell and then the mouse is moved to another cell without releasing the mouse button.
 +
After releasing the mouse button, all cells in the rectangle formed by the cell where the mouse was pressed and the cell where the mouse was released will become selected.
  
==== Column selection ====
+
== User interface ==
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 ====
+
=== Table Design Panel ===
todo
+
  
=== Clipboard operations ===
+
The ''Table Design Panel'' is placed in the task pane in impress between the ''Layouts'' and the ''Custom Animations'' panels.
todo
+
 
 +
===== Styles =====
 +
 
 +
This section contains a value set with the available predefined table styles. The preview of the table styles is rendered according to the currently active
 +
table style options. Selecting one of the table styles while a table shape is selected assigns the table style to the table shape. When a table style is
 +
assigned in this way, all hard formating attributes will be removed from the table shape. If a table style is selected and there is no table shape selected
 +
than the [[#Insert Table dialog]] will pop up and a new table is inserted with the selected table style.
 +
 
 +
==== Show ====
 +
 
 +
This is the second section in the Table Design task pane. It contains check boxes select what part of the table style is used to format a table shape.
 +
 
 +
===== Header Row =====
 +
If checked, all cells of the first row are using the header row formating from the table style
 +
 
 +
===== Total Row =====
 +
If checked, all cells in the last row are using the total row formating from the table style
 +
 
 +
===== Banded Rows =====
 +
If checked, 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 =====
 +
If checked, 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 =====
 +
If checked, 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 =====
 +
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.
 +
 
 +
==== Preview ====
 +
 
 +
[[Image:table_design_panel.png|Table design panel inside impress tasks pane]]
 +
 
 +
==== Strings ====
 +
 
 +
{| border="2" cellpadding="4" cellspacing="0" style="margin: 1em 1em 1em 0;  border: 1px #cccccc solid; border-collapse: collapse; width: 100%"
 +
|+ Table design panel strings
 +
|- align="left"
 +
| colspan="2" bgcolor="#cccccc"  | '''UI Elements''' || bgcolor="#ffffcc" | '''comment'''
 +
|-
 +
| width="150" bgcolor="#e0e0e0" | '''Titel''' || Table Design || bgcolor="#ffffcc" | en-US
 +
|-
 +
| width="150" bgcolor="#e0e0e0" | '''Label''' || Styles || bgcolor="#ffffcc" | en-US
 +
|-
 +
| width="150" bgcolor="#e0e0e0" | '''Label''' || Show || bgcolor="#ffffcc" | en-US
 +
|-
 +
| width="150" bgcolor="#e0e0e0" | '''Checkbox''' || Header Row || bgcolor="#ffffcc" | en-US
 +
|-
 +
| width="150" bgcolor="#e0e0e0" | '''Checkbox''' || Total Row || bgcolor="#ffffcc" | en-US
 +
|-
 +
| width="150" bgcolor="#e0e0e0" | '''Checkbox''' || Banded Rows || bgcolor="#ffffcc" | en-US
 +
|-
 +
| width="150" bgcolor="#e0e0e0" | '''Checkbox''' || First Column || bgcolor="#ffffcc" | en-US
 +
|-
 +
| width="150" bgcolor="#e0e0e0" | '''Checkbox''' || Last Column || bgcolor="#ffffcc" | en-US
 +
|-
 +
| width="150" bgcolor="#e0e0e0" | '''Checkbox''' || Banded Columns || bgcolor="#ffffcc" | en-US
 +
|-
 +
|}
 +
 
 +
=== Table Design Dialog ===
 +
 
 +
The table design dialog is shown in draw when the entry ''Table Design'' from the table toolbar is executed.
 +
Since draw does not feature a task pane, the contents of the ''Table Design Panel'' is shown in this dailog
 +
to support this feature in draw also. The strings and resources are the same from the ''Table Design Panel''.
 +
 
 +
==== Preview ====
 +
 
 +
[[Image:table_design_dialog.png|Table design dialog for Draw]]
  
 
=== Table shape context menu ===
 
=== Table shape context menu ===
todo
+
 
 +
 
 +
==== Preview ====
 +
 
 +
[[Image:table_context.png|Table shape context menu]]
 +
 
 +
==== Strings ====
 +
 
 +
{| border="2" cellpadding="4" cellspacing="0" style="margin: 1em 1em 1em 0;  border: 1px #cccccc solid; border-collapse: collapse; width: 100%"
 +
|+ Table shape context menu strings
 +
|- align="left"
 +
| colspan="2" bgcolor="#cccccc"  | '''UI Elements''' || bgcolor="#ffffcc" | '''comment'''
 +
|-
 +
| width="150" bgcolor="#e0e0e0" | '''Menu''' || ~Table... || bgcolor="#ffffcc" | en-US
 +
|-
 +
| width="150" bgcolor="#e0e0e0" | '''Menu''' || ~Cell || bgcolor="#ffffcc" | en-US
 +
|-
 +
| width="150" bgcolor="#e0e0e0" | '''Menu''' || ~Merge || bgcolor="#ffffcc" | en-US
 +
|-
 +
| width="150" bgcolor="#e0e0e0" | '''Menu''' || ~Split.. || bgcolor="#ffffcc" | en-US
 +
|-
 +
| width="150" bgcolor="#e0e0e0" | '''Menu''' || Top || bgcolor="#ffffcc" | en-US
 +
|-
 +
| width="150" bgcolor="#e0e0e0" | '''Menu''' || Center || bgcolor="#ffffcc" | en-US
 +
|-
 +
| width="150" bgcolor="#e0e0e0" | '''Menu''' || Bottom || bgcolor="#ffffcc" | en-US
 +
|-
 +
| width="150" bgcolor="#e0e0e0" | '''Menu''' || ~Row || bgcolor="#ffffcc" | en-US
 +
|-
 +
| width="150" bgcolor="#e0e0e0" | '''Menu''' || Select || bgcolor="#ffffcc" | en-US
 +
|-
 +
| width="150" bgcolor="#e0e0e0" | '''Menu''' || Insert || bgcolor="#ffffcc" | en-US
 +
|-
 +
| width="150" bgcolor="#e0e0e0" | '''Menu''' || Delete || bgcolor="#ffffcc" | en-US
 +
|-
 +
| width="150" bgcolor="#e0e0e0" | '''Menu''' || Colu~mn || bgcolor="#ffffcc" | en-US
 +
|-
 +
|}
 +
 
 +
=== Insert Table Dialog ===
 +
 
 +
The ''Insert Table'' dialog lets the user select the initial number of rows and columns for new table shapes.
 +
 
 +
==== Preview ====
 +
 
 +
[[image:insert_table_dialog.png|A preview of the ''Insert Table'' dialog]]
 +
 
 +
==== Strings ====
 +
 
 +
{| border="2" cellpadding="4" cellspacing="0" style="margin: 1em 1em 1em 0;  border: 1px #cccccc solid; border-collapse: collapse; width: 100%"
 +
|+ Insert Table dialog strings
 +
|- align="left"
 +
| colspan="2" bgcolor="#cccccc"  | '''UI Elements''' || bgcolor="#ffffcc" | '''comment'''
 +
|-
 +
| width="150" bgcolor="#e0e0e0" | '''Titel''' || Insert Table || bgcolor="#ffffcc" | en-US
 +
|-
 +
| width="150" bgcolor="#e0e0e0" | '''Label''' || ~Number of columns: || bgcolor="#ffffcc" | en-US
 +
|-
 +
| width="150" bgcolor="#e0e0e0" | '''Label''' || Number ~of rows: || bgcolor="#ffffcc" | en-US
 +
|-
 +
|}
  
 
=== Split Cells Dialog ===
 
=== Split Cells Dialog ===
 +
 
The “Split Cells” dialog from the OpenOffice.org Writer application will be used.
 
The “Split Cells” dialog from the OpenOffice.org Writer application will be used.
  
Line 391: Line 470:
 
=== Table toolbar ===
 
=== Table toolbar ===
  
[[image:Table_Toolbar_Preview.png|A preview of the "Table" tool bar in impress]]
+
The Table toolbar is a context sensitive toolbar and is shown if exactly one table shape is selected.
  
 
* Insert Table
 
* Insert Table
Line 404: Line 483:
 
* Split Cells
 
* Split Cells
 
* Optimize --> Optimize Style: DropDownOnly
 
* Optimize --> Optimize Style: DropDownOnly
 +
** Distribute Columns Evenly
 +
** Distribute Rows Equally
 
* -------------
 
* -------------
 
* Top
 
* Top
Line 418: Line 499:
 
* Select Rows#
 
* Select Rows#
 
* ----------
 
* ----------
* AutoFormat
+
* Table Design
 
* Table Properties
 
* Table Properties
* -------------
 
* Sort...
 
* -------------
 
* Sum
 
  
 +
==== Preview ====
 +
[[image:Table_Toolbar_Preview.png|A preview of the "Table" tool bar in impress]]
 +
 +
==== Strings ====
 +
 +
{| border="2" cellpadding="4" cellspacing="0" style="margin: 1em 1em 1em 0;  border: 1px #cccccc solid; border-collapse: collapse; width: 100%"
 +
|+ Table toolbar strings
 +
|- align="left"
 +
| colspan="2" bgcolor="#cccccc"  | '''UI Elements''' || bgcolor="#ffffcc" | '''comment'''
 +
|-
 +
| width="150" bgcolor="#e0e0e0" | '''Item''' || ~Table... || bgcolor="#ffffcc" | en-US
 +
|-
 +
| width="150" bgcolor="#e0e0e0" | '''Item''' || Line Style || bgcolor="#ffffcc" | en-US
 +
|-
 +
| width="150" bgcolor="#e0e0e0" | '''Item''' || Line Color (of the border) || bgcolor="#ffffcc" | en-US
 +
|-
 +
| width="150" bgcolor="#e0e0e0" | '''Item''' || Border Style || bgcolor="#ffffcc" | en-US
 +
|-
 +
| width="150" bgcolor="#e0e0e0" | '''Item''' || Background Color Style || bgcolor="#ffffcc" | en-US
 +
|-
 +
| width="150" bgcolor="#e0e0e0" | '''Item''' || Merge Cells || bgcolor="#ffffcc" | en-US
 +
|-
 +
| width="150" bgcolor="#e0e0e0" | '''Item''' || Split Cells || bgcolor="#ffffcc" | en-US
 +
|-
 +
| width="150" bgcolor="#e0e0e0" | '''Item''' || Optimize || bgcolor="#ffffcc" | en-US
 +
|-
 +
| width="150" bgcolor="#e0e0e0" | '''Item''' || Top || bgcolor="#ffffcc" | en-US
 +
|-
 +
| width="150" bgcolor="#e0e0e0" | '''Item''' || Center ( vertical ) || bgcolor="#ffffcc" | en-US
 +
|-
 +
| width="150" bgcolor="#e0e0e0" | '''Item''' || Bottom || bgcolor="#ffffcc" | en-US
 +
|-
 +
| width="150" bgcolor="#e0e0e0" | '''Item''' || Insert Row || bgcolor="#ffffcc" | en-US
 +
|-
 +
| width="150" bgcolor="#e0e0e0" | '''Item''' || Insert Column || bgcolor="#ffffcc" | en-US
 +
|-
 +
| width="150" bgcolor="#e0e0e0" | '''Item''' || Delete Row || bgcolor="#ffffcc" | en-US
 +
|-
 +
| width="150" bgcolor="#e0e0e0" | '''Item''' || Delete Column || bgcolor="#ffffcc" | en-US
 +
|-
 +
| width="150" bgcolor="#e0e0e0" | '''Item''' || Select Table || bgcolor="#ffffcc" | en-US
 +
|-
 +
| width="150" bgcolor="#e0e0e0" | '''Item''' || Select Column || bgcolor="#ffffcc" | en-US
 +
|-
 +
| width="150" bgcolor="#e0e0e0" | '''Item''' || Select Rows || bgcolor="#ffffcc" | en-US
 +
|-
 +
| width="150" bgcolor="#e0e0e0" | '''Item''' || Table Design || bgcolor="#ffffcc" | en-US
 +
|-
 +
| width="150" bgcolor="#e0e0e0" | '''Item''' || Table Properties || bgcolor="#ffffcc" | en-US
 +
|-
 +
|}
 +
 +
== Clipboard operations ==
 +
 +
If a table shape or a range of selected cells are placed into clipboard, the format ''RTF'' for paste special.
 +
 +
=== From impress/draw to impress/draw ===
 +
 +
If the table shape is selected and copied to the clipboard, default pasting creates a clone of the copied table.
 +
If the table shape had selected cells, a table shape with only the selected cells is inserted.
 +
If during paste operation the focus is inside a table shape or if a table shape is selected with a cell selection, the contents of the table cells in clipboard are inserted into the selected table shape.
 +
 +
=== From impress/draw to writer/calc ===
 +
 +
When pasting a table shape into writer or calc, the ''RTF'' format will be used so that the cells are inserted.
  
 
  [[Specification_Template_Help#Detailed_Specification|Help]] | [[UI-Elements|User Interface Element Templates]] | [[Specification_Example|Example Spec]]
 
  [[Specification_Template_Help#Detailed_Specification|Help]] | [[UI-Elements|User Interface Element Templates]] | [[Specification_Example|Example Spec]]
Line 435: Line 577:
  
 
=== Loading new tables in older versions of OpenOffice.org ===
 
=== 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.
+
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. Older versions will load the new tables as vector graphic files. Therefore editing of the table contents will not be possible. If the older version saves documents that contained native tables the original tables will be lost and converted to vector graphic files, even if later loaded by newer versions.
 
+
  
 
== Configuration ==
 
== Configuration ==
Line 451: Line 592:
 
<State a bulleted list of issues Issue here>
 
<State a bulleted list of issues Issue here>
  
== Milestone Planning ==
 
 
<table border="0">
 
 
<tr bgcolor="#c0c0c0"><td>Task</td><td>Status</td><td>Milestone</td></tr>
 
 
<tr><td colspan="3">Core</td></tr>
 
 
<tr><td>Implement a table shape in the drawing layer</td><td bgcolor="#00ff00" colspan="2">Done</td></tr>
 
<tr><td>Implement XShape API for the table shape</td><td bgcolor="#00ff00" colspan="2">Done</td></tr>
 
<tr><td>Add support for multiple text objects per shape to drawing layer</td><td bgcolor="#00ff00" colspan="2">Done</td></tr>
 
<tr><td>Add mouse interaction for multiple text objects per shape to drawing layer</td><td bgcolor="#00ff00" colspan="2">Done</td></tr>
 
<tr><td>Add keyboard interaction for multiple text objects per shape to drawing layer</td><td bgcolor="#00ff00" colspan="2">Done</td></tr>
 
<tr><td>Add handles for table rows</td><td bgcolor="#00ff00" colspan="2">Done</td></tr>
 
<tr><td>Add handles for table columns</td><td bgcolor="#00ff00" colspan="2">Done</td></tr>
 
<tr><td>Render table structure with cell background and text</td><td bgcolor="#00ff00" colspan="2">Done</td></tr>
 
<tr><td>Selection of cells</td><td bgcolor="#00ff00" colspan="2">Done</td></tr>
 
<tr><td>Render table borders</td><td bgcolor="#00ff00">Done</td><td bgcolor="#c0c0ff">M1</td></tr>
 
<tr><td>Support for auto format styles</td><td bgcolor="#00ff00">Done</td><td bgcolor="#c0c0ff">M1</td></tr>
 
<tr><td>Add cell styles to sd</td><td bgcolor="#00ff00">Done</td><td bgcolor="#c0c0ff">M1</td></tr>
 
<tr><td>API support for cell styles in Sd</td><td bgcolor="#00ff00">Done</td><td bgcolor="#c0c0ff">M1</td></tr>
 
<tr><td>Clipboard support for single and multiple cells</td><td>planned</td><td bgcolor="#ffc0c0">M2</td></tr>
 
<tr><td>Clipboard support between sd and other OOo applications</td><td>planned</td><td bgcolor="#c0ffc0">M4</td></tr>
 
<tr><td colspan="3">User Interface</td></tr>
 
<tr><td>Add table toolbar in sd</td><td bgcolor="#00ff00" colspan="2">Done</td></tr>
 
<tr><td>* Line Style</td><td bgcolor="#00ff00">Done</td><td bgcolor="#c0c0ff">M1</td></tr>
 
<tr><td>* Border Line Color</td><td bgcolor="#00ff00">Done</td><td bgcolor="#c0c0ff">M1</td></tr>
 
<tr><td>* Borders</td><td bgcolor="#00ff00">Done</td><td bgcolor="#c0c0ff">M1</td></tr>
 
<tr><td>* Borders</td><td bgcolor="#00ff00" colspan="2">Done</td></tr>
 
<tr><td>* Background Filling</td><td bgcolor="#00ff00" colspan="2">Done</td></tr>
 
<tr><td>* Merge / Split Cells</td><td bgcolor="#00ff00">Done</td><td bgcolor="#ffc0c0">M2</td></tr>
 
<tr><td>* Optimize</td><td>planned</td><td bgcolor="#ffc0c0">M2</td></tr>
 
<tr><td>* Text Alignment</td><td>planned</td><td bgcolor="#ffc0c0">M2</td></tr>
 
<tr><td>* Insert/Delete Row/Column</td><td bgcolor="#00ff00" colspan="2">Done</td></tr>
 
<tr><td>* Select Table/Row/Column</td><td bgcolor="#00ff00" colspan="2">Done</td></tr>
 
<tr><td>* Auto format</td><td>planned</td><td bgcolor="#ffc0c0">M2</td></tr>
 
<tr><td>* Table Properties</td><td bgcolor="#00ff00" colspan="2">Done</td></tr>
 
<tr><td>* Sort</td><td>planned</td><td bgcolor="#ffc0ff">M3</td></tr>
 
<tr><td>* Sum</td><td>planned</td><td bgcolor="#ffc0ff">M3</td></tr>
 
<tr><td>Create cell property dialog for drawing layer cells</td><td bgcolor="#00ff00" colspan="2">Done</td></tr>
 
<tr><td>* Add font tab page</td><td bgcolor="#00ff00" colspan="2">Done</td></tr>
 
<tr><td>* Add font effect tab page</td><td bgcolor="#00ff00" colspan="2">Done</td></tr>
 
<tr><td>* Add Borders tab page</td><td bgcolor="#00ff00">Done</td><td bgcolor="#c0c0ff">M1</td></tr>
 
<tr><td>* Add Background tab page</td><td bgcolor="#00ff00" colspan="2">Done</td></tr>
 
<tr><td>Keyboard navigation in table</td><td bgcolor="#00ff00" colspan="2">Done</td></tr>
 
<tr><td>Add cell styles to stylist in sd</td><td bgcolor="#00ff00" colspan="2">Done</td></tr>
 
<tr><td>setting cell styles to selected cells</td><td bgcolor="#00ff00">Done</td><td bgcolor="#c0c0ff">M1</td></tr>
 
<tr><td>Support search&replace for text in tables</td><td bgcolor="#00ff00">Done</td><td bgcolor="#c0c0ff">M1</td></tr>
 
<tr><td>Support spell checking for text in tables</td><td bgcolor="#00ff00">Done</td><td bgcolor="#c0c0ff">M1</td></tr>
 
<tr><td>Enable table shape as presentation layout object</td><td>planned</td><td bgcolor="#ffc0c0">M2</td></tr>
 
<tr><td>User interface for auto format styles</td><td bgcolor="#00ff00">Done</td><td bgcolor="#ffc0c0">M2</td></tr>
 
<tr><td>xml load/store for predefined auto format styles</td><td>%50</td><td bgcolor="#ffc0c0">M2</td></tr>
 
<tr><td>define some predefined auto format styles</td><td bgcolor="#00ffff">Canceled</td><td bgcolor="#ffc0c0">M2</td></tr>
 
<tr><td>Undo for cell formatting</td><td>%80</td><td bgcolor="#ffc0c0">M2</td></tr>
 
<tr><td>Undo for table structure changes</td><td>%50</td><td bgcolor="#ffc0c0">M2</td></tr>
 
<tr><td>Undo for cell merges/split</td><td bgcolor="#00ff00">Done</td><td bgcolor="#ffc0c0">M2</td></tr>
 
 
<tr><td colspan="3">XML</td></tr>
 
<tr><td>Implement embedded cell structure export</td><td bgcolor="#00ff00" colspan="2">Done</td></tr>
 
<tr><td>Export cell content auto styles</td><td bgcolor="#00ff00">Done</td><td bgcolor="#c0c0ff">M1</td></tr>
 
<tr><td>Export cell styles</td><td bgcolor="#00ff00">Done</td><td bgcolor="#c0c0ff">M1</td></tr>
 
<tr><td>Export auto format styles</td><td bgcolor="#00ff00">Done</td><td bgcolor="#c0c0ff">M1</td></tr>
 
<tr><td>Implement embedded cell structure import</td><td bgcolor="#00ff00" colspan="2">Done</td></tr>
 
<tr><td>Implement external cell structure import</td><td>planned</td><td bgcolor="#ffc0ff">M3</td></tr>
 
<tr><td>Import cell styles</td><td bgcolor="#00ff00">Done</td><td bgcolor="#c0c0ff">M1</td></tr>
 
<tr><td>Import auto format styles</td><td bgcolor="#00ff00">Done</td><td bgcolor="#c0c0ff">M1</td></tr>
 
<tr><td>Implement backward compatibility strategies</td><td>planned</td><td bgcolor="#ffc0ff">M3</td></tr>
 
 
<tr><td colspan="3">I18N</td></tr>
 
<tr><td>Support for RTL languages in tables</td><td>planned</td><td bgcolor="#ffc0ff">M3</td></tr>
 
 
<tr><td colspan="3">Accesibility</td></tr>
 
 
<tr><td>Implement accessibility API for table shape</td><td>planned</td><td bgcolor="#c0ffc0">M4</td></tr>
 
 
<tr><td colspan="3">Interop</td></tr>
 
 
<tr><td>Add import support from ppt binary format</td><td>planned</td><td bgcolor="#ffc0ff">M3</td></tr>
 
<tr><td>Add export support to ppt binary format</td><td>planned</td><td bgcolor="#ffc0ff">M3</td></tr>
 
<tr><td>Add import support from ppt xml format</td><td>planned</td><td bgcolor="#c0ffc0">M4</td></tr>
 
</table>
 
 
<br>
 
 
<table>
 
<tr bgcolor="#c0c0c0"><td colspan=2>Milestone</td><td>Due</td></tr>
 
<tr><td bgcolor="#c0c0ff">M1</td><td>Basic User Interface</td><td>6. Aug. 2007</td></tr>
 
<tr><td bgcolor="#ffc0c0">M2</td><td>Advanced User Interface finishing, including feedback from Milestone 1 testing</td><td>2. Nov. 2007</td></tr>
 
<tr><td bgcolor="#ffc0ff">M3</td><td>XML Support</td><td>16. Nov. 2007</td></tr>
 
<tr><td bgcolor="#c0ffc0">M4</td><td>Interop and Finishing</td><td>30. Nov. 2007</td></tr>
 
<tr><td bgcolor="#ffc0c0">M5</td><td>Implement Feedback from testing/comunity/user exp.</td><td>21. Dez. 2007</td></tr>
 
</table>
 
 
=== 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...
 
  
 
[[Category:Specification]] [[Category:Impress]] [[Category:Draw]]
 
[[Category:Specification]] [[Category:Impress]] [[Category:Draw]]

Latest revision as of 14:30, 18 November 2009

Tables in Impress

Specification Status
Author Christian Lippka
Last Change
Status Preliminary Help

Abstract

Currently OpenOffice.org Impress and Draw 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 Draw and also how it should be accessible on the user interface. It also takes into account the interoperability requirements with other similar products.

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 Wolfram Garten wolfram.garten@sun.com
Documentation Uwe Fischer uwe.fischer@sun.com
User Experience Frank Loehmann frank.loehmann@sun.com

Acronyms and Abbreviations

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

Table Model

This section describes the model of a table shape inside impress and draw.

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.

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 (com.sun.star.drawing.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.

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 to true.

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 in impress or from the Table Design dialog in draw.

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. For tables, quick text editing is always used, regardless of the document settings.

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. After deletion of columns, the width of the deleted columns is propagated to the remaining columns.

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. After deleting rows, the height of the deleted rows is subtracted from the height of the table shape.

Insert Columns

New columns are inserted right to the current selection. If there is no selection a new column is inserted right 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 right of the table. If more than one column is selected, the number of inserted columns is the number of selected columns. The width of the inserted columns is equal to the width of the selected columns. After insertion of columns the width of the inserted columns and selected columns is shrinked that the width of all columns still fit into the width of the table shape.

Insert Rows

A new row is inserted after 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 appended to the last row of the table. If more than one row is selected, the number of inserted rows is the number of selected rows. The newly inserted rows will get the same height as the selected ones. After insertion of rows the height of all inserted rows will be added to the height of the table shape.

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 added to 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.

If the modifier SHIFT is used, 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.

If the modifier STRG is used, 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.

If the modifier STRG is used, 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.

If the modifier STRG is used, 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.

If the modifier STRG is used, 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 in the left border area of a cell, the whole cell is selected. When the user clicks inside a cell text area, 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.

Mouse selection

Mouse selection starts when the user mouse button is pressed down inside a cell and then the mouse is moved to another cell without releasing the mouse button. After releasing the mouse button, all cells in the rectangle formed by the cell where the mouse was pressed and the cell where the mouse was released will become selected.

User interface

Table Design Panel

The Table Design Panel is placed in the task pane in impress between the Layouts and the Custom Animations panels.

Styles

This section contains a value set with the available predefined table styles. The preview of the table styles is rendered according to the currently active table style options. Selecting one of the table styles while a table shape is selected assigns the table style to the table shape. When a table style is assigned in this way, all hard formating attributes will be removed from the table shape. If a table style is selected and there is no table shape selected than the #Insert Table dialog will pop up and a new table is inserted with the selected table style.

Show

This is the second section in the Table Design task pane. It contains check boxes select what part of the table style is used to format a table shape.

Header Row

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

Total Row

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

Banded Rows

If checked, 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

If checked, 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

If checked, 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

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.

Preview

Table design panel inside impress tasks pane

Strings

Table design panel strings
UI Elements comment
Titel Table Design en-US
Label Styles en-US
Label Show en-US
Checkbox Header Row en-US
Checkbox Total Row en-US
Checkbox Banded Rows en-US
Checkbox First Column en-US
Checkbox Last Column en-US
Checkbox Banded Columns en-US

Table Design Dialog

The table design dialog is shown in draw when the entry Table Design from the table toolbar is executed. Since draw does not feature a task pane, the contents of the Table Design Panel is shown in this dailog to support this feature in draw also. The strings and resources are the same from the Table Design Panel.

Preview

Table design dialog for Draw

Table shape context menu

Preview

Table shape context menu

Strings

Table shape context menu strings
UI Elements comment
Menu ~Table... en-US
Menu ~Cell en-US
Menu ~Merge en-US
Menu ~Split.. en-US
Menu Top en-US
Menu Center en-US
Menu Bottom en-US
Menu ~Row en-US
Menu Select en-US
Menu Insert en-US
Menu Delete en-US
Menu Colu~mn en-US

Insert Table Dialog

The Insert Table dialog lets the user select the initial number of rows and columns for new table shapes.

Preview

A preview of the Insert Table dialog

Strings

Insert Table dialog strings
UI Elements comment
Titel Insert Table en-US
Label ~Number of columns: en-US
Label Number ~of rows: en-US

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

The Table toolbar is a context sensitive toolbar and is shown if exactly one table shape is selected.

  • 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
    • Distribute Columns Evenly
    • Distribute Rows Equally
  • -------------
  • Top
  • Center
  • Bottom
  • -------------
  • Insert Row
  • Insert Column
  • Delete Row
  • Delete Column
  • ----------
  • Select Table#
  • Select Columns#
  • Select Rows#
  • ----------
  • Table Design
  • Table Properties

Preview

A preview of the "Table" tool bar in impress

Strings

Table toolbar strings
UI Elements comment
Item ~Table... en-US
Item Line Style en-US
Item Line Color (of the border) en-US
Item Border Style en-US
Item Background Color Style en-US
Item Merge Cells en-US
Item Split Cells en-US
Item Optimize en-US
Item Top en-US
Item Center ( vertical ) en-US
Item Bottom en-US
Item Insert Row en-US
Item Insert Column en-US
Item Delete Row en-US
Item Delete Column en-US
Item Select Table en-US
Item Select Column en-US
Item Select Rows en-US
Item Table Design en-US
Item Table Properties en-US

Clipboard operations

If a table shape or a range of selected cells are placed into clipboard, the format RTF for paste special.

From impress/draw to impress/draw

If the table shape is selected and copied to the clipboard, default pasting creates a clone of the copied table. If the table shape had selected cells, a table shape with only the selected cells is inserted. If during paste operation the focus is inside a table shape or if a table shape is selected with a cell selection, the contents of the table cells in clipboard are inserted into the selected table shape.

From impress/draw to writer/calc

When pasting a table shape into writer or calc, the RTF format will be used so that the cells are inserted.

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. Older versions will load the new tables as vector graphic files. Therefore editing of the table contents will not be possible. If the older version saves documents that contained native tables the original tables will be lost and converted to vector graphic files, even if later loaded by newer versions.

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>

Personal tools