Saving Sheets Separately

From Apache OpenOffice Wiki
< Calc‎ | Performance
Revision as of 14:33, 29 September 2009 by Nn (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

(Note: This is a technical description, not a specification. To a normal user, all of this is meant to be transparent. Except for the needed time, a user should not notice a difference between normal and partial saving.)

When an ODF spreadsheet is loaded and later saved ("save", "save as" or automatic saving for AutoRecovery), only the modified sheets are saved normally. For unmodified sheets, a part of the old XML stream is copied instead (see exceptions below). "Modified" means modified since loading, not the last saving.

This is similar to the experiment with Incremental Saving, but based on sheets instead of cells.

If any sheets are copied this way, the names of automatic styles in these sheets have to be preserved, so they are not always named consecutively (ce1, ce2, ...) anymore. The formatted output for numbers that is written in <text:p> elements can depend on the system locale, so if the file was last saved with a different locale, the text for old and new sheets may be different.

If any of the following conditions is met, the whole file is saved normally:

  • The file is loaded or saved with a different filter than "ODF Spreadsheet".
  • The "content.xml" stream is not in UTF-8 encoding.
  • The "content.xml" stream uses different namespace prefixes from those used by OOo.
  • The loaded file is password protected.
  • The file is in shared mode.
  • The file is loaded from a remote URL (http, ftp, etc).

If any of the following conditions is met, the affected sheets are saved normally (as if they were modified):

  • A sheet contains shapes other than cell notes. This includes charts (but the chart content is separate anyway).
  • A sheet contains validity definitions.

After any of the following actions, all sheets are considered modified:

  • "Recalculate Hard" (shift-ctrl-F9).
  • If any shapes are manipulated in the document.
  • If sheets are inserted or deleted.

Sheets with formula results that depend on changes are also considered modified.

Implementation is in CWS DEV300 calcsheetdata  , Issue 102616 , integrated for OOo 3.2 in DEV300m58.

Personal tools