ODF

From The Document Foundation Wiki
Jump to: navigation, search

This page is about the Open Document Format (ODF) for office applications, including the Open Document Format Formula (ODFF, OpenFormula).

For more technical information about ODF, see Development/ODF_Implementer_Notes

Intro

LibreOffice natively implements ODF versions 1.0/1.1, 1.2, or 1.2 with extensions. This includes (?) the OpenDocument Format Formula (OpenFormula a.k.a. ODFF) specifications as well.

LibreOffice typically adopts the latest stable version of ODF as published by OASIS.

ODF-related bugs

All bugs related to ODF interoperability have the "odf" whiteboard entry:

Bugs specifically about writing ODF files that fail to validate against the ODF schemas have the "odf_validation" whiteboard entry:

ODF Extensions

For in-depth information regarding LibreOffice extensions to ODF, see Development/ODF Implementer Notes

Why does LibreOffice save extended ODF by default?

In order to make good standards, OASIS requires to have three conforming implementations upon approval of a standard, preferably more (see the OASIS approval process section 3.4.1). As such, we make it a habit to implement our proposals, and default to saving an extended file format that allows us to serialize and use new features. Over time, as these new features are standardized and we ship new versions of LibreOffice, we (typically) transparently migrate our code to use the agreed standard while retaining support for our original implementations.

In fact, this workflow has been the normal practice of both OpenOffice.org and LibreOffice for many years, as is reflected in the source of the features below. Many core features require serialization in the document format, and delaying all such features for (sometimes) several years while the standards process catches up is not a very sensible approach.

ODF Version Choice

For most purposes, we suggest that people use the latest published version of ODF, currently v1.2.

UI

LibreOffice permits switching the version of ODF it writes. Open the Tools ▸ Options ▸ Load/Save ▸ General options page, and select the desired version (currently 1.0/1.1, 1.2, or 1.2 extended) from the "ODF format version" dropdown.

LibreOffice 3.6 adds a fourth option, labeled "1.2 extended (compat mode)", that writes out incorrect, but compatible-with-legacy-applications ODF.

ODF Validation

Validator Software

ODFValidator

The primary online validator available is the ODF Validator, made available online by the OpenDoc Society:

Office-o-tron

Quick instructions on building/running office-o-tron locally:

  • Download a ZIP of the code from the list (I grabbed v0.7.0)
  • Unzip the file
  • In the same directory as the build.xml file, run:
ant application   # You may need to install ant and java first
  • The useful JAR is in dist/. Run it like this:
java -jar dist/officeotron-0.7.0.jar ~/my-test-file.docx  # Takes ODF, OOXML, and ... more?

Older Validator (Deprecated)

There is an ODF 1.0-only validator available via the OpenDocumentFellowship's page, however the site is unmaintained and self-proclaimed "out of date", so we don't recommend it:

Validity of LibreOffice Documents

By default, LibreOffice ODF documents contain certain LibreOffice-specific extensions (as explained elsewhere on this page). In some many circumstances, this means that the documents may not pass certain Validators. If you would like to have a document that validates 100% as ODF, follow the instructions in the #UI section above and choose a non-extended format in the dropdown (latest is "ODF 1.2"). Of course, be aware that choosing a strict, non-extended format is not the default behavior for LibreOffice and may cause data loss.

If you save a document as "ODF 1.2" and it does not validate as correct, please let us know in a bug report. Remember, only submit a bug report if the file is formatted as ODF 1.2 (non-extended).

Thanks!

See Also