Difference between revisions of "Writer/New Table Model"

From Apache OpenOffice Wiki
Jump to: navigation, search
Line 3: Line 3:
 
The most common table model (used in ODF, Word, HTML, etc.) bases on a table grid, with rowspan and colspan attributes set at the table cells. The Writer core table model currently uses a different approach: Writer core tables are defined recursively, i.e., a table call can contain one or more table rows. The goal of the project is to support the rowspan/colspan table model in the Writer core.
 
The most common table model (used in ODF, Word, HTML, etc.) bases on a table grid, with rowspan and colspan attributes set at the table cells. The Writer core table model currently uses a different approach: Writer core tables are defined recursively, i.e., a table call can contain one or more table rows. The goal of the project is to support the rowspan/colspan table model in the Writer core.
  
== How to achive this goal ==
+
== How to achieve this goal ==
  
 
For layout compatibility reasons we want to keep the old table layout algorithms for tables created with old office versions. Therefore we will introduce a new class SwTabFrm2. Since a couple of the member functions of the table model class SwTable, e.g., Split() and Merge(), can be simplyfied if they only have to deal with rowspan/colspan tables, we also want to introduce a new table model call SwTable2, with SwTable and SwTable2 inheriting from a common SwTableModel class. This allowes an easy code cleanup, once the old table model has been defined deprecated.
 
For layout compatibility reasons we want to keep the old table layout algorithms for tables created with old office versions. Therefore we will introduce a new class SwTabFrm2. Since a couple of the member functions of the table model class SwTable, e.g., Split() and Merge(), can be simplyfied if they only have to deal with rowspan/colspan tables, we also want to introduce a new table model call SwTable2, with SwTable and SwTable2 inheriting from a common SwTableModel class. This allowes an easy code cleanup, once the old table model has been defined deprecated.
 +
 +
== TODO ==
 +
 +
* Evaluate with functions of current SwTable should me made virtual at SwTableModel
 +
* Understand the current table import/export
 +
* Define an API for import/export of new tables
  
 
[[Category:Development]]
 
[[Category:Development]]
 
[[Category:Writer issues]]
 
[[Category:Writer issues]]

Revision as of 09:47, 22 September 2006

Reason/Goals

The most common table model (used in ODF, Word, HTML, etc.) bases on a table grid, with rowspan and colspan attributes set at the table cells. The Writer core table model currently uses a different approach: Writer core tables are defined recursively, i.e., a table call can contain one or more table rows. The goal of the project is to support the rowspan/colspan table model in the Writer core.

How to achieve this goal

For layout compatibility reasons we want to keep the old table layout algorithms for tables created with old office versions. Therefore we will introduce a new class SwTabFrm2. Since a couple of the member functions of the table model class SwTable, e.g., Split() and Merge(), can be simplyfied if they only have to deal with rowspan/colspan tables, we also want to introduce a new table model call SwTable2, with SwTable and SwTable2 inheriting from a common SwTableModel class. This allowes an easy code cleanup, once the old table model has been defined deprecated.

TODO

  • Evaluate with functions of current SwTable should me made virtual at SwTableModel
  • Understand the current table import/export
  • Define an API for import/export of new tables
Personal tools