Writer/ToDo/Writer Refactoring/Automatic Styles

From Apache OpenOffice Wiki
< Writer‎ | ToDo
Jump to: navigation, search

Writer Icon.png

Writer Project

Please view the guidelines
before contributing.

Popular Subcategories:

Extension:DynamicPageList (DPL), version 2.3.0 : Warning: No results.

Internal Documentation:

Extension:DynamicPageList (DPL), version 2.3.0 : Warning: No results.

API Documentation:

Ongoing Efforts:

Extension:DynamicPageList (DPL), version 2.3.0 : Warning: No results.

Sw.OpenOffice.org

Reason/Goals

Performance of Load/Save will be improved if we got an efficient handling of automatic styles.

The Plan

We will create a property pool which contains all used combinations of hard attributes.

The Steps

Character properties
 Load: Construction of property sets during loading of documents
 Edit: Construction/destruction of property sets during editing the document (manually or by API).
 Format: Use of the property sets for formatting.
 Status: Use of property sets for status reporting(?). 
 Save: Save automatic styles during XML-export.
Ruby properties
 Use of a property pool for ruby attributes
Paragraph properties
 Use of a property pool for paragraph attributes
Other properties
 Use of property pool for other attributes (e.g. tables, graphic objects...)

ToDo FME

  • Portions in hints array OK
  • make Attribute stack aware of automatic styles OK
  • check undo functionality OK
  • Copy & Paste OK
  • New implementation of Merge function OK
  • handle special attributes correctly OK
  • SwTxtAttr flags: What do they mean OK
  • Expanding attributes OK
  • Toolbar should consider autofmt OK
  • Check redlining OK
  • use uno automatic style interface during export OK
  • export of mixed user styles and automatic styles OK
  • objects at/as character export OK
  • implement automatic paragraph styles in Writer core OK
  • use automatic paragraph styles on export OK

ToDo AMA

  • create style pool functionality in svtools: class StylePool OK
  • create style pool management at SwDoc: interface IStylePoolAccess OK
  • uno interface XAutoStyles OK
  • uno interface XAutoStyleFamily OK
  • uno interface XAutoStyle OK
  • test uno interface via BASIC makro OK
  • load and create automatic style during import OK
  • use automatic styles during import of content OK
  • notifying of XAutoStyle..classes during document destruction OK
  • export automatic styles to html OK
  • export automatic styles to rtf OK
  • export automatic styles to ww8 OK
  • use automatic paragraph styles during import OK

ToDo

  • Crash on loading shapes document from ConvWatch OK

Possible Optimizations

The following list shows some possible future tasks. But they will only implemented if our measurement shows that it is worth to do so.

  • Faster access by name of styles from style pool (cache, hashmap)
  • Remove unused styles from style pool
  • Automatic styles for header/footer content
  • Do not insert all automatic styles into Writer (CopyAutoStylesToDoc) at once, insert every needed style during loading of <body>

More

Automatic paragraph styles could contain properties (for EditEngine) which are unknown in Writer, e.g.

  • IsNumbering
Personal tools